OSDN Git Service

Make jump threading substantially more powerful, in the following ways:
authorChris Lattner <sabre@nondot.org>
Thu, 27 Nov 2008 05:07:53 +0000 (05:07 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 27 Nov 2008 05:07:53 +0000 (05:07 +0000)
commit69e067fdd86d34cb81ccdffb82415b4f89144218
treed46bd6e3e971ab351b6c1d2cd5fa268d3da580bd
parentdc52cf48dc8f790de2634dcc5b4f6fe203f4c765
Make jump threading substantially more powerful, in the following ways:

1. Make it fold blocks separated by an unconditional branch.  This enables
   jump threading to see a broader scope.
2. Make jump threading able to eliminate locally redundant loads when they
   feed the branch condition of a block.  This frequently occurs due to
   reg2mem running.
3. Make jump threading able to eliminate *partially redundant* loads when
   they feed the branch condition of a block.  This is common in code with
   lots of loads and stores like C++ code and 255.vortex.

This implements thread-loads.ll and rdar://6402033.

Per the fixme's, several pieces of this should be moved into Transforms/Utils.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60148 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/thread-loads.ll [new file with mode: 0644]