Displaying 15 results from an estimated 15 matches for "inttoptrinst".
2011 Mar 26
2
[LLVMdev] How to read memory data througn adress of unsigned long
...stantInt::get(getIntegerType(64), v)
####################
Then I try to use LoadInstr to get a load instruction of ir as the following:
############################
Value* data = new LoadInst(addr, "", false, bb);
encounter segmentation fault.
########################
I also try to use IntToPtrInstr to do some transform as the following:
################################
Type const *intptr_type =
cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX());
Value* ptr = new IntToPtrInst(v, intptr_type, "", bb);
Value* data = new LoadInst(ptr...
2015 Aug 19
5
creating a callinst to an external function
Dear All
I'm making an instrumentation pass. The pass is supposed to modify the given IR in a specefic way. One of the required modifications is to insert a call to a function at a specific location.
This is the signature of the called function:
void myclass::foo(Function *f, BasicBlock* b)
This function's prototype is in an foofile.h file in include/llvm
And the function
2011 Mar 26
0
[LLVMdev] How to read memory data througn adress of unsigned long
...;
> encounter segmentation fault.
> ########################
>
Perhaps you should use a debug build of LLVM so you get an assert
message instead of a segfault. Here you're trying to load from an
integer without first casting it to a pointer, which you do next.
> I also try to use IntToPtrInstr to do some transform as the following:
> ################################
> Type const *intptr_type =
> cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX());
> Value* ptr = new IntToPtrInst(v, intptr_type, "", bb);
> Value* d...
2011 Mar 14
2
[LLVMdev] How to load a data from the address of unsiged long type
...0), "", bb);
Value* data = new LoadInst(addr, "", false, bb);
Error:
Bitcast requires types of same width
3. Code:
Type const *intptr_type =
cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX());
Value* ptr = new IntToPtrInst(a, intptr_type, "", bb);
Value* data = new LoadInst(ptr, "", false, bb);
Error:
Segmentation fault
Any person can give me some hints for my case?
Thanks
MK
--
www.skyeye.org
2011 Mar 14
0
[LLVMdev] How to load a data from the address of unsiged long type
...lue* data = new LoadInst(addr, "", false, bb);
> Error:
> Bitcast requires types of same width
> 3. Code:
> Type const *intptr_type =
> cpu->dyncom_engine->exec_engine->getTargetData()->getIntPtrType(_CTX());
> Value* ptr = new IntToPtrInst(a, intptr_type, "", bb);
> Value* data = new LoadInst(ptr, "", false, bb);
> Error:
> Segmentation fault
>
>
> Any person can give me some hints for my case?
>
> Thanks
> MK
>
2011 Nov 19
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...ntext.CurRegion, AccessFunction, *SE, BaseValue))
> + if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)&& !AllowNonAffine)
> INVALID(AffFunc, "Bad memory address "<< *AccessFunction);
> +
>
> // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca instructions
> // created by IndependentBlocks Pass.
> Index: lib/Analysis/TempScopInfo.cpp
> ===================================================================
> --- lib/Analysis/TempScopInfo.cpp (revision 144978)
> +++ lib/Analysis/TempScopInfo.cpp (working...
2012 Jul 31
0
[LLVMdev] rotate
Oh, no. I should have been more clear. The patch was not rejected, just
lost in the daily shuffle.
I already have my employer's approval to send this upstream, so I will
prepare a patch against trunk this morning.
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> > Parts of my patch did make it into trunk about a year after, but others
> > did not.
2012 Jul 31
4
[LLVMdev] rotate
On Monday, July 30, 2012 12:16 AM, Cameron McInally wrote:
> Hey Andy,
>
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> Parts of my patch did make it into trunk about a year after, but others
> did not.
>
> At that time, my solution was to add a binary operator to the IRBuilder,
> since LCS fits in nicely with the other shift operators. But,
2012 Jul 31
3
[LLVMdev] rotate
...FP , SIToFPInst ) // SInt -> floating point
-HANDLE_CAST_INST(40, FPTrunc , FPTruncInst ) // Truncate floating point
-HANDLE_CAST_INST(41, FPExt , FPExtInst ) // Extend floating point
-HANDLE_CAST_INST(42, PtrToInt, PtrToIntInst) // Pointer -> Integer
-HANDLE_CAST_INST(43, IntToPtr, IntToPtrInst) // Integer -> Pointer
-HANDLE_CAST_INST(44, BitCast , BitCastInst ) // Type cast
- LAST_CAST_INST(44)
+ FIRST_CAST_INST(34)
+HANDLE_CAST_INST(34, Trunc , TruncInst ) // Truncate integers
+HANDLE_CAST_INST(35, ZExt , ZExtInst ) // Zero extend integers
+HANDLE_CAST_INST(36, SExt...
2011 Nov 14
1
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...AccessFunction, *SE, BaseValue))
> + // INVALID(AffFunc, "Bad memory address "<< *AccessFunction);
Can you leave this and add a command line option
'-polly-allow-nonaffine' to allow non affine access functions.
> + }
>
> // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca instructions
> // created by IndependentBlocks Pass.
> --- ./lib/Analysis/ScopInfo.cpp 2011-11-13 02:38:06.000000000 +0100
> +++ ../llvm2/tools/polly/./lib/Analysis/ScopInfo.cpp 2011-11-13 02:36:12.000000000 +0100
> @@ -310,9 +310,13 @@
> Type = Access.isR...
2011 Nov 18
5
[LLVMdev] How to make Polly ignore some non-affine memory accesses
2011/11/15 Marcello Maggioni <hayarms at gmail.com>:
> 2011/11/14 Tobias Grosser <tobias at grosser.es>:
>> On 11/14/2011 02:45 PM, Marcello Maggioni wrote:
>>>
>>> 2011/11/14 Tobias Grosser<tobias at grosser.es>:
>>>>
>>>> On 11/14/2011 01:24 AM, Marcello Maggioni wrote:
>>>>>
>>>>> Hi Tobias.
2011 Nov 20
2
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...tion, *SE, BaseValue))
>> + if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)&&
>> !AllowNonAffine)
>> INVALID(AffFunc, "Bad memory address "<< *AccessFunction);
>> +
>>
>> // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca
>> instructions
>> // created by IndependentBlocks Pass.
>> Index: lib/Analysis/TempScopInfo.cpp
>> ===================================================================
>> --- lib/Analysis/TempScopInfo.cpp (revision 144978)
>> +++ lib/...
2011 Nov 14
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...gt;> + // INVALID(AffFunc, "Bad memory address "<< *AccessFunction);
>
> Can you leave this and add a command line option
> '-polly-allow-nonaffine' to allow non affine access functions.
>
>> + }
>>
>> // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca
>> instructions
>> // created by IndependentBlocks Pass.
>> --- ./lib/Analysis/ScopInfo.cpp 2011-11-13 02:38:06.000000000 +0100
>> +++ ../llvm2/tools/polly/./lib/Analysis/ScopInfo.cpp 2011-11-13
>> 02:36:12.000000000 +0100
>> @@ -310,9 +...
2011 Nov 02
5
[LLVMdev] How to make Polly ignore some non-affine memory accesses
Mmm I found out a very strange behavior (to me) of the SCEV analysis
of the loop bound of the external loop I posted.
When in ScopDetection it gets the SCEV of the external loop bound in
the "isValidLoop()" function with:
const SCEV *LoopCount = SE->getBackedgeTakenCount(L);
It returns a SCEVCouldNotCompute, but if I change the "if" block
inside the loop from:
if
2011 Nov 21
0
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
...tion, *SE, BaseValue))
>> + ?if (!isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)&&
>> ?!AllowNonAffine)
>> ? ? ?INVALID(AffFunc, "Bad memory address "<< ?*AccessFunction);
>> +
>>
>> ? ?// FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca
>> instructions
>> ? ?// created by IndependentBlocks Pass.
>> Index: lib/Analysis/TempScopInfo.cpp
>> ===================================================================
>> --- lib/Analysis/TempScopInfo.cpp ? ? ? (revision 144978)
>> +++ lib/...