llvm-6502/lib/Transforms
Quentin Colombet 637582eaf7 When code size is the priority (Oz, MinSize attribute), help llvm
turning a code like this:

if (foo)
   free(foo)

into that:
free(foo)

Move a call to free from basic block FB into FB's predecessor, P,
when the path from P to FB is taken only if the argument of free is
not equal to NULL.

Some restrictions apply on P and FB to be sure that this code motion
is profitable. Namely:
1. FB must have only one predecessor P.
2. FB must contain only the call to free plus an unconditional
   branch to S.
3. P's successors are FB and S.

Because of 1., we will not increase the code size when moving the call
to free from FB to P.
Because of 2., FB will be empty after the move.
Because of 2. and 3., P's branch instruction becomes useless, so as FB
(simplifycfg will do the job).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171762 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 18:37:41 +00:00
..
Hello
InstCombine When code size is the priority (Oz, MinSize attribute), help llvm 2013-01-07 18:37:41 +00:00
Instrumentation
IPO Move TypeFinder.h into the IR tree, it clearly belongs with the IR library. 2013-01-07 15:43:51 +00:00
Scalar Sink AddrMode back into TargetLowering, removing one of the most 2013-01-07 15:14:13 +00:00
Utils Move TypeFinder.h into the IR tree, it clearly belongs with the IR library. 2013-01-07 15:43:51 +00:00
Vectorize Simplify LoopVectorize to require target transform info and rely on it 2013-01-07 11:12:29 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile