similar to: [LLVMdev] Darwin vs exceptions

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Darwin vs exceptions"

2007 Dec 09
0
[LLVMdev] Darwin vs exceptions
Hi Dale, > #include <cstdio> > class A { > public: > A() {} > ~A() {} > }; > void f() { > A a; > throw 5.0; > } > main() { > try { > f(); > } catch(...) { printf("caught\n"); } > } this example indeed shows the problem. Let me explain to see if we agree on what the problem is. Suppose we don't artificially
2007 Dec 10
3
[LLVMdev] Darwin vs exceptions
On Dec 9, 2007, at 1:01 PM, Duncan Sands wrote: > Hi Dale, > >> #include <cstdio> >> class A { >> public: >> A() {} >> ~A() {} >> }; >> void f() { >> A a; >> throw 5.0; >> } >> main() { >> try { >> f(); >> } catch(...) { printf("caught\n"); } >> } > > this example
2007 Dec 10
3
[LLVMdev] Darwin vs exceptions
On Dec 10, 2007, at 11:38 AM, Duncan Sands wrote: >>> ... If you force a "cleanup" by changing the selector call to: >>> %eh_select8.i = tail call i32 (i8*, i8*, ...)* >>> @llvm.eh.selector.i32( i8* %eh_ptr.i, i8* bitcast (i32 (...)* >>> @__gxx_personality_v0 to i8*), i32 0) >>> then it doesn't work either: the unwinder observes that
2010 Dec 07
0
[LLVMdev] RFC: Exception Handling Proposal Revised
Hi Bill, there are a couple of things I didn't understand about your proposal, for example how it interacts with inlining, whether it is feasible to do the "turn invoke-of-Unwind_Resume into a branch" optimization and also whether in "resumedest" you still plan to use _Unwind_Resume to continue unwinding up the stack. Could you please show what the LLVM IR would look like
2007 Dec 12
0
[LLVMdev] Darwin vs exceptions
Hi Dale, > No, I don't want to change the semantics of invoke, at least I don't > think so. > When inlining, I want the inlined throw to reach cleanup code as it > does. > But I want the Unwind_Resume call that ends the cleanup code to be > replaced with a control transfer to the handler (or cleanup) in the > calling > function, i.e. the inliner needs to know
2010 Dec 01
10
[LLVMdev] RFC: Exception Handling Proposal Revised
This is a revision of the second exception handling proposal I sent out. You can see it here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-November/036484.html After much discussion, there are some changes to the proposal – some significant and some minor. One major point, this proposal does not address the issue of catching an exception thrown from a non-invoke instruction. However if done
2007 Dec 10
0
[LLVMdev] Darwin vs exceptions
Hi Dale, > > ... Suppose we don't artificially add catch-alls to > > selectors. Then > > the above example compiles to: > > ... > I wasn't advocating this; agree it is wrong. it's maybe not as wrong as it seems since having an empty selector is equivalent to having a cleanup (IIRC) :) > > ... If you force a "cleanup" by changing the
2010 Dec 01
8
[LLVMdev] Alternative exception handling proposal
Here is an alternative proposal to Bill's. It is closer to what we already have (which can be seen as a good or a bad thing!), and is also closer to what gcc does. It is more incremental than Bill's and introduces fewer new concepts. Executive summary ----------------- Remove the personality and list of catches out of eh.selector and stick them directly on invoke instructions. The
2009 May 12
1
[LLVMdev] How distinguish Catch all llvm-IR from other catch type ?
Hi, catch_all.cpp: 1 int main() 2 { 3 try { 4 throw 34; 5 } 6 catch (...) {} 7 } llvm-gcc -O3 -S -emit-llvm catch_all.cpp -o catch_all.ll: 1 ; ModuleID = 'catch_all.cpp' 2 target datalayout =
2010 Dec 01
0
[LLVMdev] Alternative exception handling proposal
On Dec 1, 2010, at 1:37 PM, Duncan Sands wrote: > Executive summary > ----------------- > > Remove the personality and list of catches out of eh.selector and stick them > directly on invoke instructions. > > The invoke instruction > ---------------------- > > The invoke instruction is modified by adding extra catch info to it: > > <result> = invoke
2010 Dec 01
0
[LLVMdev] Alternative exception handling proposal
On Dec 1, 2010, at 1:37 PM, Duncan Sands wrote: > Inlining > -------- > > Many a plausible seeming exception handling scheme has fallen by the way-side > because it interacts poorly with inlining. > > Here is how inlining would work with this scheme. It's pretty close to how > it works right now. Suppose you have > > invoke void @foo() > to
2015 Feb 13
2
[LLVMdev] C++ exception handling
I’m not sure I understand what you are suggesting in terms of how this should be handled. I agree that the cleanup code is unlikely to be complex, but obviously we still need some way to handle any cases that unlikely but possible. I hadn’t even thought about what might be in a __finally block. I was thinking about destructors being inlined. Obviously that puts a practical limit on what will
2010 Dec 02
2
[LLVMdev] Alternative exception handling proposal
Hi John, >> Inlining >> -------- >> >> Many a plausible seeming exception handling scheme has fallen by the way-side >> because it interacts poorly with inlining. >> >> Here is how inlining would work with this scheme. It's pretty close to how >> it works right now. Suppose you have >> >> invoke void @foo() >>
2011 May 17
4
[LLVMdev] Exception Handling Proposal - Second round
Hi all, Following John's, Duncan's and Bill's proposals about exception handling, I thought I'd summarise what has been discussed so far. ** The problems we're trying to solve are: P1. Different languages have different EH concepts and IR needs to be agnostic (as possible) about that P2. Inlining and optimisations (currently) destroy the EH semantics and produce code that
2010 Dec 02
3
[LLVMdev] Alternative exception handling proposal
Hi Bill, > This is similar to my first proposal. yup, I still consider your first proposal to have been basically sound. But it also suffers from a major problem, > which stopped that proposal dead in its tracks. Namely, you have information in > one place which needs to be shared in two different, but possibly disjoint, > places: the type, filters, and personality information. In
2015 Feb 13
2
[LLVMdev] C++ exception handling
(Moving this discussion on list as this could be of general interest.) My current work-in-progress implementation is attempting to map out the blocks used by a landing pad before it starts outlining. It creates a table of catch and cleanup handlers with the block at which each one starts. During outlining I intend to have another mechanism to check to see if we’ve already outlined the handler
2014 Feb 15
2
[LLVMdev] [cfe-dev] Unwind behaviour in Clang/LLVM
I'd love to hear more details. Are you saying that this infinite loop is a limitation of EHABI table format, and not something that can be fixed in the compiler? Meanwhile, please notice that gcc behavior matches current clang behavior that I described above. We would not want to create an incompatibility. On Fri, Feb 14, 2014 at 8:42 PM, Logan Chien <tzuhsiang.chien at gmail.com>
2009 Nov 18
11
[LLVMdev] RFC: New Exception Handling Proposal
I've been looking into a new way to implement exception handling in LLVM. The current model has many disadvantages, in my opinion. I try to address them with this proposal. I also try to make exception handling much more understandable to the normal human reader. :-) Any new proposal will need to address all present and future languages' exception handling methodologies. I
2007 Dec 08
2
[LLVMdev] Darwin vs exceptions
Hi Chris, > ... Claiming that a function has a > > catch-all handler when it does > > not causes the unwinder to go into a loop. this is the bit I don't understand. Why does it go into a loop? How can the unwinder possibly know that the original code did not have a catch-all, since we tell it which catches there are and we say: there is a catch-all! > > -
2007 Dec 09
1
[LLVMdev] Darwin vs exceptions
Hi Dale, > > this is the bit I don't understand. Why does it go > > into a loop? How can the unwinder possibly know that > > the original code did not have a catch-all, since we > > tell it which catches there are and we say: there is > > a catch-all! > > The unwinder works by doing a stack crawl to find a handler. Since > we're telling it