search for: idxlist

Displaying 8 results from an estimated 8 matches for "idxlist".

2017 Oct 13
2
Why does GEP allow src and destination type to have different address spaces?
The GEP constructor does not assert that the source and destination types match. Of course, this is incorrect and causes random failures somewhere down the line. Could I add general sanity checks to the GEP constructor? In general, is an Instruction allowed to be in an inconsistent state? If so, is there some well known method to "verify" whether an instruction is consistent or not?
2015 May 28
1
[LLVMdev] Passing ConstantDataArray to GetElementPtrInst
...ck: > Lexer.exe!llvm::ConstantExpr::getGetElementPtr(llvm::Constant * C, > llvm::ArrayRef<llvm::Value *> Idxs, bool InBounds, llvm::Type * > OnlyIfReducedTy) Line 2005 C++ Lexer.exe!llvm::ConstantFolder::CreateGetElementPtr(llvm::Constant * C, llvm::ArrayRef<llvm::Value *> IdxList) Line 133 C++ Lexer.exe!llvm::IRBuilder<1,llvm::ConstantFolder,llvm::IRBuilderDefaultInserter<1> >::CreateGEP(llvm::Value * Ptr, llvm::ArrayRef<llvm::Value *> IdxList, const llvm::Twine & Name) Line 1021 C++ Shockingly, I have been unable to find examples of anyone else...
2011 Feb 04
3
[LLVMdev] ConstantBuilder proposal
...--------------------------------------------------------------------===// // Constant GEPs //===--------------------------------------------------------------------===// static Constant *GetGEP( Constant *C, ///< Pointer to item being indexed Constant *const *IdxList, ///< List of indices unsigned NumIdx) { ///< Number of indices return ConstantExpr::getGetElementPtr(C, IdxList, NumIdx); } template<typename RandomAccessIterator> static Constant *GetGEP( Constant *C, ///< Pointer...
2012 Dec 02
3
[LLVMdev] GetElementPtrInst question
Hi all, How can I create an llvm::GetElementPtrInst in which the pointer and the index are in registers previously loaded with llvm::LoadInst ? I mean, the generated instruction will be like this: %1 = getelementptr i8* %myreg1, i32 %myreg2 here, %myreg1 and %myreg2 are previously created by load instructions (llvm::LoadInst). Please, let me know if there is an example of something similar.
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...der.CreateConstGEP2_32(cB, 0, 0); However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack: 815 Type *PtrTy = PointerType::get(checkGEPType( 816 getIndexedType(Ptr->getType(), IdxList)), 817 Ptr->getType()->getPointerAddressSpace()); Resulting in the debugger producing: (gdb) p PtrTy $19 = (llvm::Type *) 0x7fffffff63d0 (gdb) p PtrTy->dump() <unrecognized-type> $20 = void Is there something special which nee...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...cB, 0, 0); > > However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack: > > 815 Type *PtrTy = PointerType::get(checkGEPType( > 816 getIndexedType(Ptr->getType(), IdxList)), > 817 Ptr->getType()->getPointerAddressSpace()); > > Resulting in the debugger producing: > > (gdb) p PtrTy > $19 = (llvm::Type *) 0x7fffffff63d0 > (gdb) p PtrTy->dump() > <unrecognized-type> $20 = void...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...> However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack: > > > > 815 Type *PtrTy = PointerType::get(checkGEPType( > > 816 getIndexedType(Ptr->getType(), IdxList)), > > 817 Ptr->getType()->getPointerAddressSpace()); > > > > Resulting in the debugger producing: > > > > (gdb) p PtrTy > > $19 = (llvm::Type *) 0x7fffffff63d0 > > (gdb) p PtrTy->dump() > >...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack: > > > > > > 815 Type *PtrTy = PointerType::get(checkGEPType( > > > 816 getIndexedType(Ptr->getType(), IdxList)), > > > 817 Ptr->getType()->getPointerAddressSpace()); > > > > > > Resulting in the debugger producing: > > > > > > (gdb) p PtrTy > > > $19 = (llvm::Type *) 0x7fffffff63d0 > > >...