Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] x86 unwind support"
2009 Jul 16
0
[LLVMdev] x86 unwind support
Kenneth Uildriks wrote:
> 3. Perhaps a pass that lowers unwinds to an EH intrinsic? Would that
> map well without adding more overhead than the current setjmp/longjmp
> lowering pass?
In the past there have been suggestions that a good approach would be to
target the libunwind (http://www.nongnu.org/libunwind/) library
interface in a lowering pass. This could provide both low
2008 Jul 31
2
[LLVMdev] Unwinds Gone Wild
On Thu, Jul 31, 2008 at 2:19 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi,
>
> > Can anyone tell me if invoke/unwind is stable in 2.3? I'm seeing some
> > really weird stuff -- unwinds are ending up in seemingly arbitrary
> places...
> > definitely not inside the caller's unwind block My target is x86.
>
> codegen doesn't know how to
2009 Jul 20
4
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
> probably there should be a switch to choose whether codegen should turn
> unwind/invoke into dwarf or setjmp/longjmp style code.
There is, but it happens before codegen and is slow.
-enable-correct-eh-support will translate invoke/unwind into
setjmp/longjmp pairs for the correct behavior. See:
http://llvm.org/docs/Passes.html#lowerinvoke
Nick
>
> Ciao,
>
> Duncan.
>
2009 Jul 20
6
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Mark Shannon wrote:
> Andrew Haley wrote:
>> Mark Shannon wrote:
>>> Andrew Haley wrote:
>>>> Mark Shannon wrote:
>>>>> Nick Johnson wrote:
>>>>>>> probably there should be a switch to choose whether codegen should turn
>>>>>>> unwind/invoke into dwarf or setjmp/longjmp style code.
>>>>> It seems
2009 Jul 20
2
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Mark Shannon wrote:
> Nick Johnson wrote:
>>> probably there should be a switch to choose whether codegen should turn
>>> unwind/invoke into dwarf or setjmp/longjmp style code.
>
> It seems to me that there is an implicit, and undocumented, assumption
> that unwinding needs to handle stack-allocated objects.
>
> In languages without stack-allocated objects
2009 Jul 20
0
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Nick Johnson wrote:
>> probably there should be a switch to choose whether codegen should turn
>> unwind/invoke into dwarf or setjmp/longjmp style code.
It seems to me that there is an implicit, and undocumented, assumption
that unwinding needs to handle stack-allocated objects.
In languages without stack-allocated objects (ie. most languages that
support exceptions) there is no
2008 Dec 26
2
[LLVMdev] Unwinds gone missing
Jon Harrop wrote:
>
> Is it? I was just reading the documentation about LLVM's exception
> handling
> and it sounded ideal for my needs. How much of it does not work as the
> docs
> imply?
>
Jon, I ran into this issue in September and re-ignited this discussion in
another thread, here:
http://www.nabble.com/Unwinds-Gone-Wild-td18747589.html
2009 Jul 18
3
[LLVMdev] x86 unwind support
According to this page:
http://lwn.net/Articles/252125/
data coming from L1 is only about three times as expensive as data
coming from a register. So putting a register check after *every*
call is probably not going to be profitable, compared to a
thread-local global variable check after every invoke... if they
happen often on a thread, that variable will probably be in cache, and
if they
2009 Jul 16
3
[LLVMdev] x86 unwind support
1. Which ones? I know that Windows uses it for the "this" pointer.
Anyway, unless the callee is required to preserve it in a given
calling convention, that doesn't preclude us using it for a *return*
value. It would be checked after calls return, and wouldn't affect
the use of the register for passing values in before the call is made.
The callee would set it right before
2005 Apr 20
2
[LLVMdev] setjmp, longjmp and unwind
I'm trying to get unwind to work.
I was unable to get an unwind example to work directly,
so I decided to compile a c program that uses setjmp
and longjmp and work backwards.
I keep running into a "Abort trap" problem, whatever "Abort trap" is.
Anyway, here's an example of a C program that compiles
and works properly under normal gcc, but that fails with
an
2009 Jun 20
1
[LLVMdev] unwind/invoke design
Florian Weimer wrote:
> * Wesley W. Terpstra:
>
>> The documentation of unwind/invoke is quite clear and does exactly
>> what I need: unwinding the stack. I don't need it to carry an object
>> back. I don't need it to figure out what the type of the object is or
>> what catch() blocks it matches. I just need it to unwind the stack.
>
> You can use your
2009 Jul 20
0
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Andrew Haley wrote:
> Mark Shannon wrote:
>> Nick Johnson wrote:
>>>> probably there should be a switch to choose whether codegen should turn
>>>> unwind/invoke into dwarf or setjmp/longjmp style code.
>> It seems to me that there is an implicit, and undocumented, assumption
>> that unwinding needs to handle stack-allocated objects.
>>
>>
2008 Dec 26
0
[LLVMdev] Unwinds gone missing
From what I understand, the unwind instruction is implemented only
for the interpreter: there is a -lowerunwind pass for compiling to
other systems which will either lower unwind and invoke to setjmp/
longjmp (slow) or turn invokes into calls and unwinds into abort()s.
On 26 Dec 2008, at 15:19, Matt Giuca wrote:
>
>
> Jon Harrop wrote:
>>
>> Is it? I was just reading
2015 Oct 13
2
MachineSink optimization in code containing a setjmp
Hello LLVM-dev,
I think I've found an issue with the MachineSink optimization on a program
that uses setjmp. It looks like MachineSink will happily move a machine
instruction into a following machine basic block (not necessarily a
successor), even when that later block can be reached through a setjmp.
Here is some example debug output from llc that I'm seeing:
Sinking along critical
2005 Apr 20
0
[LLVMdev] setjmp, longjmp and unwind
On Wed, 20 Apr 2005, Greg Pettyjohn wrote:
> I'm trying to get unwind to work.
>
> I was unable to get an unwind example to work directly,
> so I decided to compile a c program that uses setjmp
> and longjmp and work backwards.
>
> I keep running into a "Abort trap" problem, whatever "Abort trap" is.
>
> Anyway, here's an example of a C
2005 Apr 20
1
[LLVMdev] setjmp, longjmp and unwind
First I try it with bytecodes:
~/compiler/temp$ llvmgcc sjmp01.c -o sjmp01
~/compiler/temp$ ./sjmp01
Hello World!
Abort trap
Same results for lli sjmp01.bc
Now I try converting to native code:
~/compiler/temp$ llc sjmp01.bc -enable-correct-eh-support -o sjmp01.s
~/compiler/temp$ gcc sjmp01.s -o sjmp01.native
~/compiler/temp$ ./sjmp01.native
Hello World!
Bus error
~/compiler/temp$
On Apr 20,
2008 Dec 26
1
[LLVMdev] Unwinds gone missing
Alastair Lynn wrote:
>
> From what I understand, the unwind instruction is implemented only
> for the interpreter: there is a -lowerunwind pass for compiling to
> other systems which will either lower unwind and invoke to setjmp/
> longjmp (slow) or turn invokes into calls and unwinds into abort()s.
>
Ah cheers, Alastair. That could be very useful (at least for me
2009 Jul 20
2
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
Hi,
Can I interject something at this point.
Can I suggest that invoke/unwind be renamed DWARF_invoke/DWARF_unwind to
warn the unwary that if they want lightweight exception handling in
their Python/ML/whatever implementation they should use some other method.
PS.
Kenneth, why don't you just use setjmp/longjmp directly.
Or, if you want, I can email you my lightweight versions if you want,
2009 Feb 26
0
[LLVMdev] Question LowerSetJmp
Hi zhangzw,
> In llvm src the file llvm/lib/Transforms/IPO/LowerSetJmp.cpp, it
> seems for sjlj-eh ?
it's not for sjlj-eh. The problem with setjmp/longjmp is that they
can jump from one part of a function to any other part, which means
that the control-flow graph is pointless; this makes everything more
complicated. So how to deal with this? LLVM does have constructs
that allow
2009 Feb 26
2
[LLVMdev] Question LowerSetJmp
Hi
In llvm src the file llvm/lib/Transforms/IPO/LowerSetJmp.cpp, it
seems for sjlj-eh ? but this pass has no effect about c++ sjlj-eh.
this pass is for future extend?
zhangzw