Displaying 3 results from an estimated 3 matches for "capture_block".
2015 Jan 27
2
[LLVMdev] RFC: Native Windows C++ exception handling
I was thinking about this last night, and I came up with a third alternative which I think looks very promising. It’s basically a re-working of the previous alternative to use the landingpad concept rather than arbitrary fake logic, but it uses a single landing pad for the entire function that mimics the logic of the personality function to dispatch unwinding calls and catch handlers.
I believe
2015 Jan 27
2
[LLVMdev] RFC: Native Windows C++ exception handling
...oted to stack allocations. Unlike SjLj, to allow access from outlined landing pad code, the stack memory will be part of the @llvm.frameallocate block.
Here's how _Z4testv would look after preparation:
define void @_Z4testv() #0 {
entry:
%frame_alloc = call i8* @llvm.frameallocate(i32 2)
%capture_block = bitcast i8* %frame_alloc to %captures._Z4testv*
%outer = getelementptr %captures._Z4testv* %capture_block, i32 0, i32 0
%inner = getelementptr %captures._Z4testv* %capture_block, i32 0, i32 1
invoke void @_ZN5OuterC1Ev(%struct.Outer* %outer)
to label %invoke.cont unwind label %lpa...
2014 Nov 24
1
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
...that transforms the above IR to this:
%struct.do_some_thing.captureblock = type { %class.Outer, %class.Middle, %class.Inner, %i32* }
; Uncaught exception cleanup for lpad, lpad1 and lpad4
define void @do_some_thing_cleanup0(i8* %eh_ptrs, i8* %rbp) #0 {
entry:
%capture.block = call @llvm.eh.get_capture_block(@_Z13do_some_thingRi , %rbp)
%outer = getelementptr inbounds %struct.do_some_this.captureblock* %capture.block, i32 0, i32 0
invoke void @_ZN5OuterD1Ev(%class.Outer* %outer)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont:
ret void
terminate.lpad:...