Displaying 2 results from an estimated 2 matches for "float_handl".
Did you mean:
float_handler
2015 Feb 12
2
[LLVMdev] RFC: Native Windows C++ exception handling
> We'd have to hoist a + b to somewhere that dominates L1 and L2. I think the only BB in your program that dominates is the entry block
I don't follow. What path do you see from entry to either L1 or L2 that doesn't pass through the indirectbr? In order to reach either L1 or L2, the call to maybe_throw() must raise an exception (else we'd return 0 from foo), the exception must
2015 Feb 13
2
[LLVMdev] RFC: Native Windows C++ exception handling
...de effects (better)
3. Sink the add past the catch handlers and past the notional indirectbr into the blocks referenced by the handler return result
Number 3 is probably the best, and it would look like:
define i8* @int_handler(i8*, i8*) {
ret i8* basicblockaddr(@func, %catch_int)
}
define i8* @float_handler(i8*, i8*) {
ret i8* basicblockaddr(@func, %catch_float)
}
define i32 @foo(i32 %a, i32 %b) {
entry:
invoke void @maybe_throw()
to label %ret unwind label %lpad
ret:
ret i32 0 ; The return case
lpad:
%ehvals = landingpad { i8*, i32 } personality ...
catch ... ; typeinfo for int...