search for: getinsertpoint

Displaying 10 results from an estimated 10 matches for "getinsertpoint".

Did you mean: setinsertpoint
2016 Mar 30
0
LSR/SCEV problem/question
...is safe, since it always sets BB and IP in sync with each other. So I think we basically need to sync things at restoreIP() (which is called only once in the file) and at places that potentially move insertion points (like hoistIVInc) using something like "Builder.SetInsertPoint(&*Builder.GetInsertPoint())". Are there any other places that need to be fixed too? We should also add a LSRInserter that asserts that the basic block we're inserting into is the same as the insertee's parent. -- Sanjoy
2017 Jun 11
2
Force casting a Value*
...lue* vo = store_inst->getValueOperand(); uint64 var_value = /* cast vo to unsigned int 64 bit */ // Pass on this value to external function IRBuilder<> builder(&I); builder.SetInsertPoint(&B, ++builder.GetInsertPoint()); Constant *func = F.getParent()->getOrInsertFunction("instrument_store", Type::getVoidTy(Ctx), Type::getInt8PtrTy(Ctx), NULL); Value* args[] = {var_value}; builder.CreateCall(func, args); } ==============================...
2017 Apr 28
2
How to get the address of a global variable in LLVM?
...; Constant *instrument_func = F.getParent()->getOrInsertFunction("func", Type::getVoidTy(Ctx), Type::getInt32Ty(Ctx), NULL); IRBuilder<> builder(&I); builder.SetInsertPoint(&B, ++builder.GetInsertPoint()); Value* args[] = {po}; builder.CreateCall(instrument_func, args); } } The result of running `opt` is : Call parameter type does not match function signature! i32* @a i32 call void...
2017 Jun 12
2
Force casting a Value*
...uint64 var_value = /* cast vo to unsigned int 64 bit >> */ >> >> // Pass on this value to external function >> IRBuilder<> builder(&I); >> builder.SetInsertPoint(&B, >> ++builder.GetInsertPoint()); >> Constant *func = F.getParent()->getOrInsertFunc >> tion("instrument_store", >> >> Type::getVoidTy(Ctx), Type::getInt8PtrTy(Ctx), NULL); >> Value* args[] = {var_value}; >> builder.Crea...
2018 May 03
0
SCEVExpander and IRBuilder
Hey, Alternatively, expose a SCEVExpander::getInsertPoint? This would proxy the underlying IRbuilder, with no real state sharing, other than the current insert point. This will be less ugly than recieving the expanded SCEV value, casting to an instruction, and feeding this to the IRBuilder. Cheers, siddharth On Thu 3 May, 2018, 15:36 Philip Pfaffe via...
2015 Jul 13
2
[LLVMdev] Problem with InsertPointGuard ABI?
...oreover, if I start printing the guard from InsertPointGuard constructor it shows different data layout. LLDB also crashes after step out and printing the guard again. 195 public: 196 InsertPointGuard(IRBuilderBase &B) 197 : Builder(B), Block(B.GetInsertBlock()), Point(B.GetInsertPoint()), -> 198 DbgLoc(B.getCurrentDebugLocation()) {} 199 200 ~InsertPointGuard() { 201 Builder.restoreIP(InsertPoint(Block, Point)); (lldb) p *this (llvm::IRBuilderBase::InsertPointGuard) $6 = { Builder = 0x00007fff5fbf4440 Block = { llvm::ValueHandleBase = {...
2018 May 03
2
SCEVExpander and IRBuilder
Hi Alex, Sanjoy, exposing the internal IRBuilder to users of SCEVExpander violates information hiding, and encourages the tight coupling that makes code bases such as Polly so hard to maintain. SCEVExpander::expandCodeFor returns a Value that (if it's an instruction) can be used to update the insert point of the client's IRBuilder. Is that not enough? No hidden state, no hidden state
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 11:32, Nikodemus Siivola <nikodemus at random-state.net> wrote: > On Sun, Jun 11, 2017 at 7:49 PM, Dipanjan Das via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> >> >> On 11 June 2017 at 07:53, David Blaikie <dblaikie at gmail.com> wrote: >> >>> Sounds like you're looking for reinterpret_cast: http://en.cp
2016 Mar 23
6
LSR/SCEV problem/question
Hi All, I've run into what appears to be a bug in ScalarEvolution, but I'm not sure if it is instead caused by me missing an implicit assumption between LSR and SCEV. This issue is caused by the change D18001 <http://reviews.llvm.org/D18001> , which is an attempt to increase SCEV-inserted instruction re-use by picking a more canonical insertion position in the case where a new
2020 Feb 27
3
How to set DebugLoc when using IRBuilder's CreateCall ?
Hi I want to insert some functions into the llvm bitcode ir files. So I use IRBuilder and CreateCall(). But it how error : inlinable function call in a function with debug info must have a !dbg location. I don't know what DebugLoc should I give the new CallInst to setDebugLoc. I Create this CallInst , so this CallInst doesn't hava so-called "DebugLoc" mapping to the source