Displaying 20 results from an estimated 93 matches for "lpad".
Did you mean:
load
2016 Mar 01
3
[RFC] lifetime.end metadata
...ame stack
slot for all of them to save stack space. However, clang/llvm currently
allocates separate slots for each of the three variables because clang
doesn't insert lifetime.end markers after the objects are destructed (for
example, the destructor of the first string is called in block "lpad" in
line 71 of the attached bitcode f1.ll, but there is no lifetime.end marker
inserted).
If we want to insert the missing lifetime.end markers for the strings,
we'll have to insert them at the beginning of lpad's successors, %eh.resume
and %terminate.lpad, because the destructor call...
2014 Nov 24
1
[LLVMdev] RFC: How to represent SEH (__try / __except) in LLVM IR
...alloca i8*
%ehselector.slot = alloca i32
%inner = alloca %class.Inner, align 1
%en = alloca i32, align 4
store i32* %i, i32** %i.addr, align 8
call void @_ZN5OuterC1Ev(%class.Outer* %outer)
invoke void @_ZN6MiddleC1Ev(%class.Middle* %middle)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%0 = load i32** %i.addr, align 8
%1 = load i32* %0, align 4
%cmp = icmp eq i32 %1, 1
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %invoke.cont
invoke void @_Z12do...
2007 Dec 09
0
[LLVMdev] Darwin vs exceptions
...Let me explain to see if we agree on what
the problem is. Suppose we don't artificially add catch-alls to selectors. Then
the above example compiles to:
define void @_Z1fv() {
...
invoke void @__cxa_throw( something ) noreturn
to label %somewhere unwind label %lpad
...
lpad:
%eh_ptr = tail call i8* @llvm.eh.exception( )
%eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*))
tail call i32 (...)* @_Unwind_Resume( i8* %eh_ptr )
unreachable
...
}
defi...
2007 Dec 12
0
[LLVMdev] Darwin vs exceptions
...mple:
class A {}; class B {};
int i;
extern void f();
void g() { try { f(); } catch(A) { i = 1; } }
void h() { try { g(); } catch(B) { i = 2; } }
Without catch-alls this compiles to something like:
define void @_Z1gv() {
entry:
invoke void @_Z1fv( )
to label %UnifiedReturnBlock unwind label %lpad
...
lpad: ; preds = %entry
%eh_ptr = tail call i8* @llvm.eh.exception( )
%eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i32 (...)* @__gxx_personality_v0, i8* A)
%eh_typeid = tail call i32 @llvm.eh.typeid.for.i32( i8* A )
%tmp15 = icmp eq i32 %eh_select, %eh_typ...
2007 Dec 09
3
[LLVMdev] Darwin vs exceptions
(Mail system seems to have eaten this, sorry if it's a repeat)
On Dec 8, 2007, at 12:48 AM, Duncan Sands wrote:
> Hi Dale,
>
>> - Why was C++ claiming that every selector has a catch-all handler?
>
> this is easy: because the semantics of invoke require it. Yes,
> really.
> If unwinding reaches an invoke then control is required to jump to the
> unwind basic
2010 Dec 01
1
[LLVMdev] RFC: Exception Handling Proposal Revised
...s by not calling the empty constructors. bb1, bb2, and bb3 are the normal calls to the d'tors that we expect.
> 2. In catch.handlers, the resume label is to %onto.catch.handlers, right?
>
Oh…I forgot to fill that in. It should to go %yikes.
> 3. In onto.catch.handlers you resume to %lpad. Which basic-block is
> this? Shouldn't this be a "resume_unwinding" call of some sort (if Q2
> is right)?
>
This was necessary to keep the invariant that only resume or unwind edges may jump to a landing pad (%lpad in this instance). Otherwise, I would have the invoke in a....
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
2009 Apr 28
3
[LLVMdev] how to resolve llvm exception IR?
...o i32* ; <i32*> [#uses=1]
50 store i32 78, i32* %1, align 4
51 invoke void @__cxa_throw(i8* %0, i8* bitcast
(%struct.__fundamental_type_info_pseudo* @_ZTIi to i8*), void (i8*)*
null) noreturn
52 to label %invcont unwind label %lpad
53
54 invcont: ; preds = %entry
55 unreachable
56
57 bb: ; preds = %lpad
58 %2 = tail call i8* @__cxa_begin_catch(i8* %eh_ptr)
nounwind ; <i8*> [#uses=0]
59 %3 = invoke
%"struct.std::basic_ost...
2006 Mar 10
2
adding to has_many on create and edit
...currently accomplish my aims in the controller like so:
-----------
class AdminUnitsController < ApplicationController
#snip
def create
@unit = Unit.new(params[:unit])
@unit.prices.create("price" => params[:price])
@levels = Level.find(:all, :order => "LPAD
(`levels`.`elevator_number`,5,\"0\") ASC")
@unit_types = UnitType.find(:all, :order => "`unit_types`.`name`
ASC")
if @unit.save
Unit.find(@unit.id).update_attributes(params[:unit])
flash[:notice] = ''Unit was successfully created.'&...
2009 Sep 03
2
[LLVMdev] Non-local DSE optimization
...; preds = %entry
> br i1 undef, label %bb4, label %bb5
>
> bb4: ; preds = %bb3
> unreachable
>
> bb5: ; preds = %bb3
> invoke void undef()
> to label %invcont unwind label %lpad
>
> invcont: ; preds = %bb5
> %0 = invoke i8 @system__tasking__async_delays__enqueue_duration(i64
> undef, %struct.system__tasking__async_delays__delay_block* undef)
> to label %bb8 unwind label %lpad ; <i8> [#uses=0]...
2015 Apr 16
2
[LLVMdev] Exception filter IR model
...}
}
__except (x = 1) {
}
}
The IR for the path from "x = 2" to the load of x in the __finally (via the exception edge) looks like so:
store i32 2, i32* %x, align 4
invoke void bitcast (void (...)* @may_throw to void ()*)() #4
to label %invoke.cont unwind label %lpad
lpad: ; preds = %entry
%1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
cleanup
catch i8* bitcast (i32 (i8*, i8*)* @"\01?filt$0 at 0@foo@@" to i8*)
%2 = extractvalue { i8*, i...
2015 Jan 27
2
[LLVMdev] RFC: Native Windows C++ exception handling
...;;;;;;;;;;;;;;;;;;;;
; Function Attrs: uwtable
define void @_Z4testv() #0 {
entry:
%outer = alloca %class.Outer, align 1
%inner = alloca %class.Inner, align 1
call void @llvm.eh.setehstate(i32 0)
invoke void @_ZN5OuterC1Ev(%class.Outer* %outer)
to label %invoke.cont unwind label %lpad
invoke.cont:
call void @llvm.eh.setehstate(i32 1)
call void @llvm.eh.setehstate(i32 2)
invoke void @_ZN5InnerC1Ev(%class.Inner* %inner)
to label %invoke.cont1 unwind label %lpad
invoke.cont.1:
call void @llvm.eh.setehstate(i32 3)
invoke void @_Z14do_inner_thingv()
to...
2010 Dec 01
10
[LLVMdev] RFC: Exception Handling Proposal Revised
....ca:
%t6 = call i8* @__cxa_begin_catch(i8* %eh_ptr) nounwind
%t7 = call i32 @puts(i8* getelementptr inbounds ([9 x i8]* @.str2, i64 0, i64 0))
call void @__cxa_end_catch()
ret void
;; C's d'tor
c.dtor:
invoke void @_ZN1CD1Ev(%struct.C* %c)
to label %b.dtor unwind label %lpad.c.dtor
;; B's d'tor
b.dtor:
invoke void @_ZN1BD1Ev(%struct.B* %b)
to label %a.dtor unwind label %lpad.b.dtor
;; A's d'tor
a.dtor: landingpad
invoke void @_ZN1AD1Ev(%struct.A* %a)
to label %onto.catch.handlers unwind label %lpad.a.dtor
onto.catch.handlers:...
2011 Aug 05
0
[LLVMdev] RFC: Exception Handling Rewrite
On Aug 5, 2011, at 10:57 AM, Peter Lawrence wrote:
> However it seems that if a landingpad-block has multiple predecessors (often the case,
> multiple InvokeInst in the main body of a try-statement all go to the same landingpad-
> block), then you cannot move the LandingpadInst in order to break a critical edge unless
> you do it for _all_ landingpad-block predecessor edges
2009 Sep 06
0
[LLVMdev] Non-local DSE optimization
...1 undef, label %bb4, label %bb5
>>
>> bb4: ; preds = %bb3
>> unreachable
>>
>> bb5: ; preds = %bb3
>> invoke void undef()
>> to label %invcont unwind label %lpad
>>
>> invcont: ; preds = %bb5
>> %0 = invoke i8 @system__tasking__async_delays__enqueue_duration(i64
>> undef, %struct.system__tasking__async_delays__delay_block* undef)
>> to label %bb8 unwind label %lpad ; &...
2009 May 12
1
[LLVMdev] How distinguish Catch all llvm-IR from other catch type ?
...o i32* ; <i32*> [#uses=1]
12 store i32 34, i32* %1, align 4
13 invoke void @__cxa_throw(i8* %0, i8* bitcast
(%struct.__fundamental_type_info_pseudo* @_ZTIi to i8*), void (i8*)*
null) noreturn
14 to label %invcont unwind label %lpad
15
16 invcont: ; preds = %entry
17 unreachable
18
19 lpad: ; preds = %entry
20 %eh_ptr = tail call i8* @llvm.eh.exception()
; <i8*> [#uses=2]
21 %eh_select = tail call i32 (i8*, i8*, ...)*
@llvm.eh.selector.i32...
2010 Dec 01
1
[LLVMdev] RFC: Exception Handling Proposal Revised
responses to the Exception Handling Proposal are "all over the map",
including at least....
1. what are the semantics of the various high level languages, and
how are these constructs
to be lowered into an IR
2. what should the IR be
3. what should the final output code format and layout be, and to
what extent can/should
this be compatible with any existing runtime environments
2009 Sep 08
2
[LLVMdev] Non-local DSE optimization
...l %bb5
>>>
>>> bb4: ; preds = %bb3
>>> unreachable
>>>
>>> bb5: ; preds = %bb3
>>> invoke void undef()
>>> to label %invcont unwind label %lpad
>>>
>>> invcont: ; preds = %bb5
>>> %0 = invoke i8
>>> @system__tasking__async_delays__enqueue_duration(i64 undef,
>>> %struct.system__tasking__async_delays__delay_block* undef)
>>> to label...
2010 Dec 09
0
[LLVMdev] Inlining and exception handling in LLVM and GCC
...landing
pad. Given this important distinction it may make sense to make landing pad
blocks special in the IR to facility detecting misuse (both pragmatically
and visually).
The following pseudo-IR tries to demonstrate the validity of assignments:
main:
%a = no_fail_instruction
test: unwind to lpad
%r = possible_failing_comparison %a, 0
br %r == 0, label true_block, label false_block
true_block: unwind to lpad
%c = no_fail_instruction
%d = potentially_failing_instruction %c
br label either_block
false_block: unwind to lpad
%e = no_fail_instruction
%f = potentially_faili...
2011 Jul 23
0
[LLVMdev] RFC: Exception Handling Rewrite
...i8] c"caught integer %d\0A\00", align 1
> @.str1 = private unnamed_addr constant [18 x i8] c"caught double %g\0A\00", align 1
>
> define i32 @_Z3foov() uwtable optsize ssp {
> entry:
> invoke void @_Z3barv() optsize
> to label %try.cont unwind label %lpad
>
> invoke.cont7:
> %tmp0 = tail call i8* @__cxa_begin_catch(i8* %exn) nounwind
> %tmp1 = bitcast i8* %tmp0 to i32*
> %exn.scalar = load i32* %tmp1, align 4
> %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([19 x i8]* @.str, i64 0, i64 0),
>...