#
92651ec3 |
| 14-Apr-2011 |
Owen Anderson <resistor@mac.com> |
Fix an infinite alternation in JumpThreading where two transforms would repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded a
Fix an infinite alternation in JumpThreading where two transforms would repeatedly undo each other. The solution is to perform more aggressive constant folding to make one of the edges just folded away rather than trying to thread it. Fixes <rdar://problem/9284786>.
Discovered with CSmith.
llvm-svn: 129538
show more ...
|
Revision tags: llvmorg-2.9.0 |
|
#
52131344 |
| 30-Mar-2011 |
Jay Foad <jay.foad@gmail.com> |
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128537
|
#
e0938d8a |
| 30-Mar-2011 |
Jay Foad <jay.foad@gmail.com> |
(Almost) always call reserveOperandSpace() on newly created PHINodes.
llvm-svn: 128535
|
Revision tags: llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2, llvmorg-2.9.0-rc1 |
|
#
1a924e77 |
| 18-Feb-2011 |
Chris Lattner <sabre@nondot.org> |
prevent jump threading from merging blocks when their address is taken (and used!). This prevents merging the blocks (invalidating the block addresses) in a case like this:
#define _THIS_IP_ ({ __
prevent jump threading from merging blocks when their address is taken (and used!). This prevents merging the blocks (invalidating the block addresses) in a case like this:
#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
void foo() { printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); printf("%p\n", _THIS_IP_); }
which fixes PR4151.
llvm-svn: 125829
show more ...
|
#
9bbe849f |
| 16-Dec-2010 |
Frits van Bommel <fvbommel@gmail.com> |
Fix a bug in the loop in JumpThreading::ProcessThreadableEdges() where it could falsely produce a MultipleDestSentinel value if the first predecessor ended with an 'indirectbr'. If that happened, it
Fix a bug in the loop in JumpThreading::ProcessThreadableEdges() where it could falsely produce a MultipleDestSentinel value if the first predecessor ended with an 'indirectbr'. If that happened, it caused an unnecessary FindMostPopularDest() call. This wasn't a correctness problem, but it broke the fast path for single-predecessor blocks.
llvm-svn: 121966
show more ...
|
#
3d180349 |
| 15-Dec-2010 |
Frits van Bommel <fvbommel@gmail.com> |
Teach jump threading to "look through" a select when the branch direction of a terminator depends on it. When it sees a promising select it now tries to figure out whether the condition of the select
Teach jump threading to "look through" a select when the branch direction of a terminator depends on it. When it sees a promising select it now tries to figure out whether the condition of the select is known in any of the predecessors and if so it maps the operands appropriately.
llvm-svn: 121859
show more ...
|
#
73a58627 |
| 13-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
simplify code and reduce indentation
llvm-svn: 121670
|
#
d2f4b09e |
| 07-Dec-2010 |
Frits van Bommel <fvbommel@gmail.com> |
Remove some dead code from the jump threading pass.
The last uses of these functions were removed in r113852 when LazyValueInfo was permanently enabled and removed the need for them.
llvm-svn: 1211
Remove some dead code from the jump threading pass.
The last uses of these functions were removed in r113852 when LazyValueInfo was permanently enabled and removed the need for them.
llvm-svn: 121133
show more ...
|
#
d9df6eaa |
| 06-Dec-2010 |
Frits van Bommel <fvbommel@gmail.com> |
Implement jump threading of 'indirectbr' by keeping track of whether we're looking for ConstantInt*s or BlockAddress*s.
llvm-svn: 121066
|
#
76244867 |
| 05-Dec-2010 |
Frits van Bommel <fvbommel@gmail.com> |
Refactor jump threading. Should have no functional change other than the order of two transformations that are mutually-exclusive and the exact formatting of debug output. Internally, it now stores t
Refactor jump threading. Should have no functional change other than the order of two transformations that are mutually-exclusive and the exact formatting of debug output. Internally, it now stores the ConstantInt*s as Constant*s, and actual undef values instead of nulls.
llvm-svn: 120946
show more ...
|
#
5e75ef4a |
| 05-Dec-2010 |
Frits van Bommel <fvbommel@gmail.com> |
Remove trailing whitespace.
llvm-svn: 120945
|
#
6c18d1aa |
| 19-Oct-2010 |
Owen Anderson <resistor@mac.com> |
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly.
llvm-svn: 116820
show more ...
|
#
8ac477ff |
| 12-Oct-2010 |
Owen Anderson <resistor@mac.com> |
Begin adding static dependence information to passes, which will allow us to perform initialization without static constructors AND without explicit initialization by the client. For the moment, pas
Begin adding static dependence information to passes, which will allow us to perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future.
llvm-svn: 116334
show more ...
|
#
df7a4f25 |
| 07-Oct-2010 |
Owen Anderson <resistor@mac.com> |
Now with fewer extraneous semicolons!
llvm-svn: 115996
|
Revision tags: llvmorg-2.8.0, llvmorg-2.8.0-rc3 |
|
#
99c985c3 |
| 29-Sep-2010 |
Owen Anderson <resistor@mac.com> |
Fix PR8247: JumpThreading can cause a block to become unreachable while still having predecessor, if it is part of a self-loop. Because of this, we cannot use the Simplify* APIs, as they can assert-f
Fix PR8247: JumpThreading can cause a block to become unreachable while still having predecessor, if it is part of a self-loop. Because of this, we cannot use the Simplify* APIs, as they can assert-fail on unreachable code. Since it's not easy to determine if a given threading will cause a block to become unreachable, simply defer simplifying simplification to later InstCombine and/or DCE passes.
llvm-svn: 115082
show more ...
|
Revision tags: llvmorg-2.8.0-rc2 |
|
#
d361aac3 |
| 14-Sep-2010 |
Owen Anderson <resistor@mac.com> |
Remove the option to disable LazyValueInfo in JumpThreading, as it is now on by default and has received significant testing.
llvm-svn: 113852
|
Revision tags: llvmorg-2.8.0-rc1 |
|
#
e6214557 |
| 05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
Change lower atomic pass to use IntrinsicInst to simplify it a bit.
llvm-svn: 113114
|
#
05ef361b |
| 05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
eliminate some non-obvious casts. UndefValue isa Constant.
llvm-svn: 113113
|
Revision tags: llvmorg-2.8.0-rc0 |
|
#
6778149f |
| 02-Sep-2010 |
Duncan Sands <baldrick@free.fr> |
Reapply commit 112699, speculatively reverted by echristo, since I'm sure it is harmless. Original commit message: If PrototypeValue is erased in the middle of using the SSAUpdator then the SSAUpdat
Reapply commit 112699, speculatively reverted by echristo, since I'm sure it is harmless. Original commit message: If PrototypeValue is erased in the middle of using the SSAUpdator then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway.
llvm-svn: 112810
show more ...
|
#
73f988ca |
| 01-Sep-2010 |
Owen Anderson <resistor@mac.com> |
JumpThreading keeps LazyValueInfo up to date, so we don't need to rerun it if we schedule another LVI-using pass afterwards.
llvm-svn: 112722
|
#
a5d315c6 |
| 01-Sep-2010 |
Eric Christopher <echristo@apple.com> |
Speculatively revert 112699 and 112702, they seem to be causing self host errors on clang-x86-64.
llvm-svn: 112719
|
#
f7b18437 |
| 01-Sep-2010 |
Duncan Sands <baldrick@free.fr> |
If PrototypeValue is erased in the middle of using the SSAUpdator then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway
If PrototypeValue is erased in the middle of using the SSAUpdator then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway.
llvm-svn: 112699
show more ...
|
#
3c84ecb0 |
| 31-Aug-2010 |
Owen Anderson <resistor@mac.com> |
More cleanups of my JumpThreading transforms, including extracting some duplicated code into a helper function.
llvm-svn: 112634
|
#
6fdcb172 |
| 31-Aug-2010 |
Owen Anderson <resistor@mac.com> |
Add an RAII helper to make cleanup of the RecursionSet more fool-proof.
llvm-svn: 112628
|
#
cd4de7f3 |
| 31-Aug-2010 |
Owen Anderson <resistor@mac.com> |
Refactor my fix for PR5652 to terminate the predecessor lookups after the first failure.
llvm-svn: 112620
|