search for: insertpt

Displaying 16 results from an estimated 16 matches for "insertpt".

Did you mean: insertps
2016 Sep 05
2
LLVM 3.8.0 - Adding new instruction to a basic block
...w_inst); >> [where both I and new_inst are Instruction*] >> >> In LLVM 3.8 however, the SymbolTableList was created as a wrapper over >> iplist. >> Could anyone please tell me how I can do the same type of insertion in >> LLVM 3.8? >> > > auto InsertPt = I->getIterator(); > BB->getInstList().insert(InsertPt, new_inst); > > Thanks, Daniel! In your example, isn't "insert" inserting "new_inst" *before* instruction "I"? As I would like to insert the "new_inst" instruction after "I&...
2016 Sep 05
2
LLVM 3.8.0 - Adding new instruction to a basic block
...] >>>> >>>> In LLVM 3.8 however, the SymbolTableList was created as a wrapper over >>>> iplist. >>>> Could anyone please tell me how I can do the same type of insertion in >>>> LLVM 3.8? >>>> >>> >>> auto InsertPt = I->getIterator(); >>> BB->getInstList().insert(InsertPt, new_inst); >>> >>> >> Thanks, Daniel! >> >> In your example, isn't "insert" inserting "new_inst" *before* instruction >> "I"? >> As I woul...
2016 Sep 04
2
LLVM 3.8.0 - Adding new instruction to a basic block
Hello, I'm trying to add a new instruction after a given instruction in a basic block. Until LLVM 3.7, I was using the following code: BB->getInstList().insertAfter(I, new_inst); [where both I and new_inst are Instruction*] In LLVM 3.8 however, the SymbolTableList was created as a wrapper over iplist. Could anyone please tell me how I can do the same type of insertion in LLVM 3.8?
2016 Mar 24
0
LSR/SCEV problem/question
...r::hoistIVInc(). This in turn makes the SCEVExpander When is the insert position moved? IOW, what is the "timeline" of events? There are two calls to hoistIVInc in SCEVExpander, in getAddRecExprPHILiterally and in replaceCongruentIVs -- which one is the problematic case? > Builder InsertPt inconsistent (the instruction and block end up not > matching), which leads to an invalid instruction being inserted (with its > parent != its containing block). -- Sanjoy
2011 Oct 06
0
[LLVMdev] How to create arguments CallInst
...think you misunderstood me. You need to *insert* an LLVM cast instruction. For example, you might insert the following code: Value *para = ConstantInt::get(IntegerType::get(getGlobalContext(),32), 0); Value * Val2 = CastInst::CreateZExtOrBitCast (para, arg_iti->getType(), "test", InsertPt) ... where InsertPt is an Instruction * specifying where to insert the cast instruction. Having said that, if all you're doing is inserting zero values of the appropriate type, it might be easier to use: Value * Val2 = Constant::getNullValue (arg_iti->getType()); -- John T. > >...
2016 Mar 23
6
LSR/SCEV problem/question
...position in the case where a new insert position block is not found. The problem I have run into with this change is that it causes an insert position instruction to be chosen which is later hoisted into a different block by SCEVExpander::hoistIVInc(). This in turn makes the SCEVExpander Builder InsertPt inconsistent (the instruction and block end up not matching), which leads to an invalid instruction being inserted (with its parent != its containing block). Does anyone more familiar with the design of the LSR/SCEV interaction have an opinion on what the right approach to fixing this is? The...
2011 Oct 06
2
[LLVMdev] How to create arguments CallInst
virtual std::vector<Value *> getESetArgumentosFunc(Function *F){ std::vector<Value *> varg_list; varg_list.clear(); for(Function::arg_iterator arg_iti = F->getArgumentList().begin(), arg_ite = F->getArgumentList().end(); arg_iti != arg_ite; ++arg_iti){ Value *para = ConstantInt::get(IntegerType::get(getGlobalContext(),32), 0); *Value *val2 = cast<*
2014 Sep 04
2
[LLVMdev] How to deal with wider Integer type?
Hi, I am currently working on an opencl project based on LLVM, the target device is 32bit. I met a problem that some llvm passes like GVN SROA will generate some IR operating on wide integer types like i128 or i512. But the device does not support such kind of data type. Is there any idea on how to lower this kind of IR to only operate on i32 or vector of i32? Or is there any existing code handle
2014 Sep 04
2
[LLVMdev] How to deal with wider Integer type?
Some code in GVN.cpp: static Value *CoerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy, Instruction *InsertPt, const DataLayout &DL) { .... // Convert vectors and fp to integer, which can be manipulated. if (!StoredValTy->isIntegerTy()) { StoredValTy = IntegerType::get(StoredValTy->getContext(), StoreSize); StoredVal = new BitCastInst(Store...
2016 Mar 23
0
LSR/SCEV problem/question
...tion in the case where a new insert position block is not found. > The problem I have run into with this change is that it causes an insert position instruction to be chosen which is later hoisted into a different block by SCEVExpander::hoistIVInc(). This in turn makes the SCEVExpander Builder InsertPt inconsistent (the instruction and block end up not matching), which leads to an invalid instruction being inserted (with its parent != its containing block). > > Does anyone more familiar with the design of the LSR/SCEV interaction have an opinion on what the right approach to fixing this i...
2015 Jul 13
2
[LLVMdev] Problem with InsertPointGuard ABI?
...= check) (lldb) p _builder (llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >) $4 = { llvm::IRBuilderBase = { CurDbgLocation = { Loc = { Ref = { MD = 0x0000000000000000 } } } BB = 0x000000010642ecf0 InsertPt = { NodePtr = 0x000000010642ed00 } Context = 0x000000010642d170 DefaultFPMathTag = 0x0000000000000000 FMF = (Flags = 0) } Folder = {} } (lldb) p guard (llvm::IRBuilderBase::InsertPointGuard) $5 = { Builder = 0x00007fff5fbf46d8 Block = { ThePtr = 0x0000000107800398...
2016 Apr 24
2
Retrieving numeric value of instruction operand
...gt;getOperand(0); > > The variable Va points to the object representing the first operand of the > instruction (in your case, %a). You can then create new instructions that > use this value as an operand: > > BinaryOperator * Sub = BinaryOperator::CreateNeg (Va, "name", InsertPt); > > The above would create the following instruction (which is an integer > negation instruction): > > %name = sub 0, %a > > Regards, > > John Criswell > > > On Apr 24, 2016 7:18 AM, "John Criswell" <jtcriswel at gmail.com> wrote: > >>...
2016 Apr 24
2
Retrieving numeric value of instruction operand
hey john, yes indeed, that's what I'm trying, retreiving the values of %a and %b in an LLVM pass, sorry about the confusion. On Apr 24, 2016 7:18 AM, "John Criswell" <jtcriswel at gmail.com> wrote: > Dear Ammar, > > It is not clear what you are asking. %a and %b in your code below are not > constants; there is no way, at compile time, to determine what
2010 Apr 08
4
[LLVMdev] How to Load a Value?
Hello, I have a problem of generating a load instruction. The LLVM bytecode is: ------------------------ entry: ... %2 = call i32 (...)* @atoi(i8*%1) nounwind /*<- Insertpos*/ ... -- bb1: .. %5 = icmp sgt i32 %2, %i.0 ... ----------------- Now I have pb: pointer to the Value object of *%2* of bb1. Here, I want to generate a load instruction and I did it as: new LoadInst(pb,
2008 Jul 31
0
[LLVMdev] Sparc assembly syntax
...cRegisterInfo.cpp (working copy) @@ -137,7 +137,7 @@ if (NumBytes >= -4096) { BuildMI(MBB, MBB.begin(), TII.get(SP::SAVEri), - SP::O6).addImm(NumBytes).addReg(SP::O6); + SP::O6).addReg(SP::O6).addImm(NumBytes); } else { MachineBasicBlock::iterator InsertPt = MBB.begin(); // Emit this the hard way. This clobbers G1 which we always know is Should I file a bug report? -Rich
2008 Jul 31
4
[LLVMdev] Sparc assembly syntax
On Jul 31, 2008, at 9:57 AM, Dale Johannesen wrote: > > On Jul 31, 2008, at 4:52 AMPDT, Richard Pennington wrote: > >> Any code that I generate for the Sparc fails at assembly time using a >> gas assembler built for the Sparc. >> >> I get code like the following from the code generator: >> >> save -96, %o6, %o6 >> >> and get a syntax