summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfEHPrepare.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Pull the creation of the "RewindFunction" function out of the loop. It's onlyBill Wendling2009-09-141-14/+25
| | | | | | | created once, so shouldn't be stuck in the middle of the loop. Also early exit if there are no uses of UnwindInst in the function. llvm-svn: 81785
* If there's a calling convention attach it to the rewind function call.Eric Christopher2009-09-041-1/+3
| | | | llvm-svn: 80976
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-6/+9
| | | | llvm-svn: 78948
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | llvm-svn: 77516
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-2/+2
| | | | llvm-svn: 76702
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-2/+2
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-1/+2
| | | | llvm-svn: 75703
* More LLVMContext-ification.Owen Anderson2009-07-051-1/+1
| | | | llvm-svn: 74807
* Add a new codegen pass that normalizes dwarf exception handlingDuncan Sands2009-05-221-0/+397
code in preparation for code generation. The main thing it does is handle the case when eh.exception calls (and, in a future patch, eh.selector calls) are far away from landing pads. Right now in practice you only find eh.exception calls close to landing pads: either in a landing pad (the common case) or in a landing pad successor, due to loop passes shifting them about. However future exception handling improvements will result in calls far from landing pads: (1) Inlining of rewinds. Consider the following case: In function @f: ... invoke @g to label %normal unwind label %unwinds ... unwinds: %ex = call i8* @llvm.eh.exception() ... In function @g: ... invoke @something to label %continue unwind label %handler ... handler: %ex = call i8* @llvm.eh.exception() ... perform cleanups ... "rethrow exception" Now inline @g into @f. Currently this is turned into: In function @f: ... invoke @something to label %continue unwind label %handler ... handler: %ex = call i8* @llvm.eh.exception() ... perform cleanups ... invoke "rethrow exception" to label %normal unwind label %unwinds unwinds: %ex = call i8* @llvm.eh.exception() ... However we would like to simplify invoke of "rethrow exception" into a branch to the %unwinds label. Then %unwinds is no longer a landing pad, and the eh.exception call there is then far away from any landing pads. (2) Using the unwind instruction for cleanups. It would be nice to have codegen handle the following case: invoke @something to label %continue unwind label %run_cleanups ... handler: ... perform cleanups ... unwind This requires turning "unwind" into a library call, which necessarily takes a pointer to the exception as an argument (this patch also does this unwind lowering). But that means you are using eh.exception again far from a landing pad. (3) Bugpoint simplifications. When bugpoint is simplifying exception handling code it often generates eh.exception calls far from a landing pad, which then causes codegen to assert. Bugpoint then latches on to this assertion and loses sight of the original problem. Note that it is currently rare for this pass to actually do anything. And in fact it normally shouldn't do anything at all given the code coming out of llvm-gcc! But it does fire a few times in the testsuite. As far as I can see this is almost always due to the LoopStrengthReduce codegen pass introducing pointless loop preheader blocks which are landing pads and only contain a branch to another block. This other block contains an eh.exception call. So probably by tweaking LoopStrengthReduce a bit this can be avoided. llvm-svn: 72276
OpenPOWER on IntegriCloud