1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Transforms/InstCombine
Quentin Colombet 994ef807c2 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).

llvm-svn: 171762
2013-01-07 18:37:41 +00:00
..
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
InstCombine.h When code size is the priority (Oz, MinSize attribute), help llvm 2013-01-07 18:37:41 +00:00
InstCombineAddSub.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineAndOrXor.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineCalls.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineCasts.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineCompares.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineLoadStoreAlloca.cpp switch from pointer equality comparison to MDNode::getMostGenericTBAA 2013-01-05 16:44:07 +00:00
InstCombineMulDivRem.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombinePHI.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineSelect.cpp Use the new script to sort the includes of every file under lib. 2012-12-03 16:50:05 +00:00
InstCombineShifts.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineSimplifyDemanded.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstCombineVectorOps.cpp [InstCombine] Teach InstCombine how to handle an obfuscated splat. 2012-10-16 21:29:38 +00:00
InstCombineWorklist.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
InstructionCombining.cpp When code size is the priority (Oz, MinSize attribute), help llvm 2013-01-07 18:37:41 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00