summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SjLjEHPrepare.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* fix the varargs version of StructType::get to not require an LLVMContext, ↵Chris Lattner2011-06-181-2/+1
| | | | | | | | making usage much cleaner. llvm-svn: 133364
* Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmpBill Wendling2011-05-111-1/+1
| | | | | | | | intrinsic call. This prevents it from being reordered so that it appears *before* the setjmp intrinsic (thus making it completely useless). <rdar://problem/9409683> llvm-svn: 131174
* The default of the dispatch switch statement was to branch to a BB that executedBill Wendling2011-04-111-7/+8
| | | | | | | | | | | | | | | | | | | | the 'unwind' instruction. However, later on that instruction was converted into a jump to the basic block it was located in, causing an infinite loop when we get there. It turns out, we get there if the _Unwind_Resume_or_Rethrow call returns (which it's not supposed to do). It returns if it cannot find a place to unwind to. Thus we would get what appears to be a "hang" when in reality it's just that the EH couldn't be propagated further along. Instead of infinitely looping (or calling `unwind', which none of our back-ends support (it's lowered into nothing...)), call the @llvm.trap() intrinsic instead. This may not conform to specific rules of a particular language, but it's rather better than infinitely looping. <rdar://problem/9175843&9233582> llvm-svn: 129302
* Revamp the SjLj "dispatch setup" intrinsic.Bill Wendling2011-04-051-8/+5
| | | | | | | | | | | | It needed to be moved closer to the setjmp statement, because the code directly after the setjmp needs to know about values that are on the stack. Also, the 'bitcast' of the function context was causing a dead load. This wouldn't be too horrible, except that at -O0 it wasn't optimized out, and because it wasn't using the correct base pointer (if there is a VLA), it would try to access a value from a garbage address. <rdar://problem/9130540> llvm-svn: 128873
* Early exit if we don't have invokes. The 'Unwinds' vector isn't modified unlessBill Wendling2011-01-071-219/+219
| | | | | | we have invokes, so there is no functionality change here. llvm-svn: 122990
* Prune includes.Benjamin Kramer2010-11-061-6/+5
| | | | llvm-svn: 118342
* Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do anyJim Grosbach2010-10-191-3/+14
| | | | | | | setup they require. Use this for ARM/Darwin to rematerialize the base pointer from the frame pointer when required. rdar://8564268 llvm-svn: 116879
* 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
* Handle array and vector typed parameters in sjljehprepare like we doJim Grosbach2010-06-301-4/+4
| | | | | | structs. rdar://8145832 llvm-svn: 107332
* use ArgOperand APIGabor Greif2010-06-251-1/+1
| | | | llvm-svn: 106835
* add FIXMEJim Grosbach2010-06-161-0/+3
| | | | llvm-svn: 106126
* fix namingJim Grosbach2010-06-151-3/+3
| | | | llvm-svn: 106024
* Add a FIXMEJim Grosbach2010-06-011-0/+2
| | | | llvm-svn: 105282
* When processing function arguments when splitting live ranges across invokes,Jim Grosbach2010-06-011-10/+27
| | | | | | | handle structs passed by value via an extract/insert pair, as a bitcast won't work on a struct. rdar://7742824 llvm-svn: 105280
* Update the saved stack pointer in the sjlj function context following eitherJim Grosbach2010-05-271-14/+50
| | | | | | an alloca() or an llvm.stackrestore(). rdar://8031573 llvm-svn: 104900
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-1/+1
| | | | | | | 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-1/+1
| | | | | | | | | | | | | 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-1/+1
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-1/+1
| | | | | | | | | | | | | 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
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-1/+1
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-1/+1
| | | | | | | | | | 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
* For SJLJ exception handling, make sure that all calls that are not markedJim Grosbach2010-03-041-31/+36
| | | | | | | | as nounwind are marked with a -1 call-site value. This is necessary to, for example, correctly process exceptions thrown from within an "unexpected" execption handler (see SingleSource/Regression/C++/EH/expection_spec_test.cpp). llvm-svn: 97757
* Update of 94055 to track the IR level call site information via an intrinsic.Jim Grosbach2010-01-281-5/+6
| | | | | | | This allows code gen and the exception table writer to cooperate to make sure landing pads are associated with the correct invoke locations. llvm-svn: 94726
* back this out for now. Growing Function is not good.Jim Grosbach2010-01-211-3/+1
| | | | llvm-svn: 94097
* Make sure that landing pad entries in the EH call site table are in the properJim Grosbach2010-01-211-1/+3
| | | | | | order for SjLj style exception handling. llvm-svn: 94055
* Fix 80 column violations and clean up whitespaceJim Grosbach2010-01-151-5/+4
| | | | llvm-svn: 93484
* 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
* I don't see any point in having both eh.selector.i32 and eh.selector.i64,Duncan Sands2009-10-141-6/+3
| | | | | | | | | | | | | so get rid of eh.selector.i64 and rename eh.selector.i32 to eh.selector. Likewise for eh.typeid.for. This aligns us with gcc, which always uses a 32 bit value for the selector on all platforms. My understanding is that the register allocator used to assert if the selector intrinsic size didn't match the pointer size, and this was the reason for introducing the two variants. However my testing shows that this is no longer the case (I fixed some bugs in selector lowering yesterday, and some more today in the fastisel path; these might have caused the original problems). llvm-svn: 84106
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-4/+4
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* PR4747Jim Grosbach2009-08-311-34/+20
| | | | | | | | | | | | | Shared landing pads run into trouble with SJLJ, as the dispatch table is mapped to call sites, and merging the pads will throw that off. There needs to be a one-to-one mapping of landing pad exception table entries to invoke call points. Detecting the shared pad during lowering of SJLJ info insn't sufficient, as the dispatch function may still need separate destinations to properly handle phi-nodes. llvm-svn: 80530
* SJLJ pass needs to punt if there's no personality function available.Jim Grosbach2009-08-231-23/+27
| | | | llvm-svn: 79858
* Check for shared landing pads when assigning call site values. Invokes whichJim Grosbach2009-08-201-20/+34
| | | | | | share a landing pad should also use the same call site value. llvm-svn: 79501
* cleanups per review. Mostly cosmetic, plus use SmallVector in place of ↵Jim Grosbach2009-08-171-24/+16
| | | | | | std::vector. llvm-svn: 79287
* Fix build warning.Daniel Dunbar2009-08-171-1/+1
| | | | llvm-svn: 79262
* Move the sjlj exception handling conversions to a back-end pass where theyJim Grosbach2009-08-171-0/+527
more properly belong. This allows removing the front-end conditionalized SJLJ code, and cleans up the generated IR considerably. All of the infrastructure code (calling _Unwind_SjLj_Register/Unregister, etc) is added by the SjLjEHPrepare pass. llvm-svn: 79250
OpenPOWER on IntegriCloud