summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfEHPrepare.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-3/+3
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-0/+1
| | | | llvm-svn: 128535
* There are some situations which can cause the URoR hack to infinitely recurseBill Wendling2011-03-151-6/+8
| | | | | | | | | | | | | and then go kablooie. The problem was that it was tracking the PHI nodes anew each time into this function. But it didn't need to. And because the recursion didn't know that a PHINode was visited before, it would go ahead and call itself. There is a testcase, but unfortunately it's too big to add. This problem will go away with the EH rewrite. <rdar://problem/8856298> llvm-svn: 127640
* This may be an ARM target, so check for _Unwind_SjLj_Resume.Bill Wendling2010-10-291-11/+15
| | | | llvm-svn: 117643
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | 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
* Reapply commit 112702 which was speculatively reverted by echristo.Duncan Sands2010-09-031-82/+80
| | | | | | | | | | Original commit message: Use the SSAUpdator to turn calls to eh.exception that are not in a landing pad into uses of registers rather than loads from a stack slot. Doesn't touch the 'orrible hack code - Bill needs to persuade me harder :) llvm-svn: 112952
* Speculatively revert 112699 and 112702, they seem to be causingEric Christopher2010-09-011-80/+82
| | | | | | self host errors on clang-x86-64. llvm-svn: 112719
* Use the SSAUpdator to turn calls to eh.exception that are not in aDuncan Sands2010-09-011-82/+80
| | | | | | | | landing pad into uses of registers rather than loads from a stack slot. Doesn't touch the 'orrible hack code - Bill needs to persuade me harder :) llvm-svn: 112702
* Stop using the dom frontier in DwarfEHPrepare by not promoting alloca'sDuncan Sands2010-08-311-86/+9
| | | | | | | | any more. I plan to reimplement alloca promotion using SSAUpdater later. It looks like Bill's URoR logic really always needs domtree, so the pass now always asks for domtree info. llvm-svn: 112597
* revert 112457, it looks like it broke selfhost.Chris Lattner2010-08-291-133/+23
| | | | llvm-svn: 112459
* rewrite DwarfEHPrepare to use SSAUpdater to promote its allocasChris Lattner2010-08-291-23/+133
| | | | | | | | instead of PromoteMemToReg. This allows it to stop using DF and DT, eliminating a computation of DT and DF from clang -O3. Clang is now down to 2 runs of DomFrontier. llvm-svn: 112457
* inline function into its only caller.Chris Lattner2010-08-291-13/+6
| | | | llvm-svn: 112455
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Using llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.Bill Wendling2010-07-261-4/+4
| | | | llvm-svn: 109462
* A block dominates itself, by definition.Dan Gohman2010-07-261-1/+1
| | | | llvm-svn: 109402
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-221-5/+5
| | | | llvm-svn: 109103
* Use the catch-all selectors we already found when converting them to use theBill Wendling2010-06-301-16/+23
| | | | | | | correct catch-all value. This saves having to iterate through all of the selectors in the program again. llvm-svn: 107345
* It seems clear that this should return Changed.Duncan Sands2010-06-291-1/+1
| | | | llvm-svn: 107141
* use ArgOperand APIsGabor Greif2010-06-291-3/+3
| | | | llvm-svn: 107132
* simplify: we have solid argument iterator rangeGabor Greif2010-06-281-7/+4
| | | | llvm-svn: 107014
* use ArgOperand accessorsGabor Greif2010-06-251-9/+14
| | | | | | | | | | and CallInst for getting hold of the intrinsic's arguments simplify along the way (at least for me this is much more legible now) Bill, Baldrick or Anton, please review\! llvm-svn: 106838
* use ArgOperand API (the simple part)Gabor Greif2010-06-251-2/+2
| | | | llvm-svn: 106837
* Loosen up the requirements in the Horrible Hack(tm) to include all selectorsBill Wendling2010-06-241-30/+10
| | | | | | | | which don't have a catch-all associated with them not just clean-ups. This fixes the SingleSource/Benchmarks/Shootout-C++/except.cpp testcase that broke because of my change r105902. llvm-svn: 106772
* Eliminate unnecessary uses of getZExtValue().Dan Gohman2010-06-181-1/+1
| | | | llvm-svn: 106279
* When performing the Horrible Hack(tm-Duncan) on the EH code to convert aBill Wendling2010-06-121-26/+49
| | | | | | | | clean-up to a catch-all after inlining, take into account that there could be filter IDs as well. The presence of filters don't mean that the selector catches anything. It's just metadata information. llvm-svn: 105872
* Code that needs a TargetMachine should have access to one directly, ratherDan Gohman2010-04-191-5/+7
| | | | | | than just getting one through a TargetLowering. llvm-svn: 101802
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-5/+5
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-5/+5
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-5/+5
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-5/+5
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* typosGabor Greif2010-04-151-2/+2
| | | | llvm-svn: 101371
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-5/+5
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-5/+5
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Skip debug info when looking for existing EH calls at theDale Johannesen2010-04-021-2/+2
| | | | | | beginning of a block. llvm-svn: 100230
* Re-add back in the slow way of determining of a clean-up should become aBill Wendling2010-03-291-0/+135
| | | | | | | catch-all. The "dominates" way won't catch all of the selectors which must be changed. llvm-svn: 99850
* A more general (and simpler!) implementation of r99671. It performs a similarBill Wendling2010-03-291-122/+59
| | | | | | | | | | | transform. I.e., if a clean-up eh.selector call dominates the invoke of an _Unwind_Resume_or_Rethrow, then we convert the eh.selector into a catch-all. This patch, however, uses the DominatorTree information, and doesn't go through the whole rigmarole of starting at the eh.exception call, finding the corresponding URoR and eh.selector calls, and trying to trace through any number of instruction types to get to them. llvm-svn: 99846
* Return if we changed anything or not.Bill Wendling2010-03-271-11/+9
| | | | llvm-svn: 99695
* If a selector has a call to ".llvm.eh.catch.all.value" that we haven'tBill Wendling2010-03-271-8/+38
| | | | | | converted, then use the initializer, since using the name itself won't work. llvm-svn: 99692
* If we mark clean-ups as clean-ups, then it could break when inlining through anBill Wendling2010-03-261-7/+215
| | | | | | | | | | | | | | | | | | | | | | | | | 'invoke' instruction. You will get a situation like this: bb: %ehptr = eh.exception() %sel = eh.selector(%ehptr, @per, 0); ... bb2: invoke _Unwind_Resume_or_Rethrow(%ehptr) %normal unwind to %lpad lpad: ... The unwinder will see the %sel call as a clean-up and, if it doesn't have a catch further up the call stack, it will skip running it. But there *is* another catch up the stack -- the catch for the %lpad. However, we can't see that. This is fixed in code-gen, where we detect this situation, and convert the "clean-up" selector call into a "catch-all" selector call. This gives us the correct semantics. llvm-svn: 99671
* SjLj EH introduces can introduce an additional edge to a landing pad and padJim Grosbach2010-01-201-0/+13
| | | | | | normalization needs to take this into account. llvm-svn: 94046
* Pull LLVMContext out of PromoteMemToReg.Nick Lewycky2009-11-231-1/+1
| | | | llvm-svn: 89645
* Don't put in these EH changes.Bill Wendling2009-10-291-291/+35
| | | | llvm-svn: 85460
* Reverting r85338 for now. It's causing a bootstrap failure on PPC darwin9.Bill Wendling2009-10-291-35/+291
| | | | | | | | --- Reverse-merging r85338 into '.': U lib/CodeGen/SimpleRegisterCoalescing.cpp U lib/CodeGen/SimpleRegisterCoalescing.h llvm-svn: 85454
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-1/+1
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-2/+2
| | | | llvm-svn: 82355
* Expand on comment.Eric Christopher2009-09-151-1/+4
| | | | llvm-svn: 81928
OpenPOWER on IntegriCloud