#
a97a2c99 |
| 21-Jun-2011 |
Jay Foad <jay.foad@gmail.com> |
Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512).
llvm-svn: 133513
|
#
184f3b37 |
| 21-Jun-2011 |
Chad Rosier <mcrosier@apple.com> |
Revert r133435 and r133449 to appease buildbots.
llvm-svn: 133499
|
#
e03c05c3 |
| 20-Jun-2011 |
Jay Foad <jay.foad@gmail.com> |
Change how PHINodes store their operands.
Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses.
Note that this loses an optimization in SplitCriticalE
Change how PHINodes store their operands.
Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses.
Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors".
Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.)
llvm-svn: 133435
show more ...
|
#
5af84522 |
| 14-Jun-2011 |
John McCall <rjmccall@apple.com> |
Use IRBuilder to make our intrinsic calls in the inliner so that we pick up line info correctly.
llvm-svn: 132961
|
#
9711b5c7 |
| 14-Jun-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Use Value::stripPointerCasts instead of reinventing part of the wheel.
llvm-svn: 132954
|
#
f8e046b1 |
| 13-Jun-2011 |
Nick Lewycky <nicholas@mxc.ca> |
It's possible that an all-zero GEP may be used as the argument to lifetime intrinsics. In fact, we'll optimize a bitcast to that when possible. Detect it when looking for the lifetime intrinsics.
No
It's possible that an all-zero GEP may be used as the argument to lifetime intrinsics. In fact, we'll optimize a bitcast to that when possible. Detect it when looking for the lifetime intrinsics.
No test case, noticed by inspection.
llvm-svn: 132906
show more ...
|
#
fc1ca368 |
| 09-Jun-2011 |
John McCall <rjmccall@apple.com> |
SplitCriticalEdge can sometimes split the edge from an invoke to a landing pad, separating the exception and selector calls from the new lpad. Teaching it not to do that, or to properly adjust the C
SplitCriticalEdge can sometimes split the edge from an invoke to a landing pad, separating the exception and selector calls from the new lpad. Teaching it not to do that, or to properly adjust the CFG afterwards, is out of scope because it would require the other edges to the landing pad to be split as well (effectively). Instead, just recover from the most likely cases during inlining. The best long-term solution is to change the exception representation and commit to either requiring or not requiring the more complex edge-splitting logic; this is just a shorter-term hack.
llvm-svn: 132799
show more ...
|
#
729c35b6 |
| 09-Jun-2011 |
John McCall <rjmccall@apple.com> |
Teach the CallGraph to ignore calls to intrinsics.
llvm-svn: 132797
|
#
fca77862 |
| 01-Jun-2011 |
John McCall <rjmccall@apple.com> |
First, do no harm -- even if we can't find a selector for an enclosing landing pad, forward llvm.eh.resume calls to it instead of turning them invalidly into invokes.
llvm-svn: 132382
|
#
2c6d23fb |
| 29-May-2011 |
John McCall <rjmccall@apple.com> |
Fix this to work correctly with phis; test case to follow if this successfully fixes self-host.
llvm-svn: 132275
|
#
046c47e9 |
| 28-May-2011 |
John McCall <rjmccall@apple.com> |
Implement and document the llvm.eh.resume intrinsic, which is transformed by the inliner into a branch to the enclosing landing pad (when inlined through an invoke). If not so optimized, it is lower
Implement and document the llvm.eh.resume intrinsic, which is transformed by the inliner into a branch to the enclosing landing pad (when inlined through an invoke). If not so optimized, it is lowered DWARF EH preparation into a call to _Unwind_Resume (or _Unwind_SjLj_Resume as appropriate). Its chief advantage is that it takes both the exception value and the selector value as arguments, meaning that there is zero effort in recovering these; however, the frontend is required to pass these down, which is not actually particularly difficult.
Also document the behavior of landing pads a bit better, and make it clearer that it's okay that personality functions don't always land at landing pads. This is just a fact of life. Don't write optimizations that rely on pushing things over an unwind edge.
llvm-svn: 132253
show more ...
|
#
bd04b74b |
| 27-May-2011 |
John McCall <rjmccall@apple.com> |
Fix the inliner to maintain the current de facto invoke semantics: - the selector for the landing pad must provide all available information about the handlers, filters, and cleanups within tha
Fix the inliner to maintain the current de facto invoke semantics: - the selector for the landing pad must provide all available information about the handlers, filters, and cleanups within that landing pad - calls to _Unwind_Resume must be converted to branches to the enclosing lpad so as to avoid re-entering the unwinder when the lpad claimed it was going to handle the exception in some way This is quite specific to libUnwind-based unwinding. In an effort to not interfere too badly with other unwinders, and with existing hacks in frontends, this only triggers on _Unwind_Resume (not _Unwind_Resume_or_Rethrow) and does nothing with selectors if it cannot find a selector call for either lpad.
llvm-svn: 132200
show more ...
|
#
a68ec83b |
| 22-May-2011 |
Nick Lewycky <nicholas@mxc.ca> |
Teach the inliner to emit llvm.lifetime.start/end, to scope the local variables of the inlinee to the code representing the original function.
llvm-svn: 131838
|
#
0ab5e2cd |
| 15-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
Fix a ton of comment typos found by codespell. Patch by Luis Felipe Strano Moraes!
llvm-svn: 129558
|
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 |
|
#
20fca483 |
| 25-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
switch the inliner alignment enforcement stuff to use the getOrEnforceKnownAlignment function, which simplifies the code and makes it stronger.
llvm-svn: 122555
|
#
0f114952 |
| 20-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
when eliding a byval copy due to inlining a readonly function, we have to make sure that the reused alloca has sufficient alignment.
llvm-svn: 122236
|
#
00997445 |
| 20-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
pull byval processing out to its own helper function.
llvm-svn: 122235
|
#
7394680a |
| 20-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
fix PR8769, a miscompilation by inliner when inlining a function with a byval argument. The generated alloca has to have at least the alignment of the byval, if not, the client may be making assumpt
fix PR8769, a miscompilation by inliner when inlining a function with a byval argument. The generated alloca has to have at least the alignment of the byval, if not, the client may be making assumptions that the new alloca won't satisfy.
llvm-svn: 122234
show more ...
|
#
cd3af96a |
| 06-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
improve comment
llvm-svn: 120994
|
#
ddd1b7b8 |
| 20-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Simplify code. No change in functionality.
llvm-svn: 119908
|
#
9d9a4e2c |
| 17-Nov-2010 |
Duncan Sands <baldrick@free.fr> |
Have InlineFunction use SimplifyInstruction rather than hasConstantValue. I was leery of using SimplifyInstruction while the IR was still in a half-baked state, which is the reason for delaying the
Have InlineFunction use SimplifyInstruction rather than hasConstantValue. I was leery of using SimplifyInstruction while the IR was still in a half-baked state, which is the reason for delaying the simplification until the IR is fully cooked.
llvm-svn: 119494
show more ...
|
#
229e38f0 |
| 13-Oct-2010 |
Rafael Espindola <rafael.espindola@gmail.com> |
Be more consistent in using ValueToValueMapTy.
llvm-svn: 116387
|
Revision tags: llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2, llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0 |
|
#
ca26f790 |
| 26-Aug-2010 |
Dan Gohman <gohman@apple.com> |
Reapply r112091 and r111922, support for metadata linking, with a fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlin
Reapply r112091 and r111922, support for metadata linking, with a fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g).
This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class.
llvm-svn: 112190
show more ...
|