search for: createentryblockalloca

Displaying 4 results from an estimated 4 matches for "createentryblockalloca".

2012 Mar 29
2
[LLVMdev] Alloca instructions in NON-entry block?
The Kaleidoscope example here: http://llvm.org/docs/tutorial/LangImpl7.html#adjustments defines a CreateEntryBlockAlloca() helper function that "ensures that the allocas are created in the entry block of the function." It's kid of implied, but I thought I'd ask explicitly: *must* alloca instructions be created in the entry block of a function? - Paul
2012 Mar 29
0
[LLVMdev] Alloca instructions in NON-entry block?
On 3/29/12 11:32 AM, Paul J. Lucas wrote: > The Kaleidoscope example here: > > http://llvm.org/docs/tutorial/LangImpl7.html#adjustments > > defines a CreateEntryBlockAlloca() helper function that "ensures that the allocas are created in the entry block of the function." > > It's kid of implied, but I thought I'd ask explicitly: *must* alloca instructions be created in the entry block of a function? I believe that an alloca can occur in any bas...
2012 Apr 05
0
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
...har const *obj_name, Type *obj_type, > Function *ctor, vector<Value*> &ctor_args, > Function *dtor ) { > > // Allocate object's storage and insert 'this' ptr into ctor args. > AllocaInst *const obj_ptr = createEntryBlockAlloca( fn, obj_name, obj_type ); > Value *const void_obj_ptr = builder.CreateBitCast( obj_ptr, void_ptr_type ); > ctor_args.insert( ctor_args.begin(), void_obj_ptr ); > > // Call object's constructor. > BasicBlock *const normal_blk = BasicBlock::Create( ctx, "normal&quo...
2012 Mar 23
2
[LLVMdev] Catching C++ exceptions, cleaning up, rethrowing
On Mar 23, 2012, at 4:29 PM, Paul J. Lucas wrote: > On Mar 23, 2012, at 3:25 PM, Bill Wendling wrote: > >> Let's take your example. You will have code that looks like this: >> >> extern "C" void thunk_item_M_delete( void *v_that ) { >> item *that = 0; >> try { >> that = static_cast<item*>( v_that ); >>