Displaying 2 results from an estimated 2 matches for "mulinttoptr".
2012 Feb 29
2
[LLVMdev] getelementptr being lowered to ptrtoint/.../inttoptr?
...sses other
than my own. I'm writing a ModulePass.
I am observing a situation where I compile a C++ file with no optimization
and I get code as I would expect that uses getelementptr. However, if I
enable optimization with -O3, *some* of my getelementptr instructions are
lowered to ptrtoint/add-mulinttoptr sequences, but not others.
As far as I can tell, there is no advantage to what LLVM is doing here
(such as re-using pointer arithmetic computations).
The 'Often Misunderstood GEP page' makes it sound like optimization always
replaces pointer arithmetic with GEP instructions at the end, ev...
2012 Feb 29
0
[LLVMdev] getelementptr being lowered to ptrtoint/.../inttoptr?
...I'm writing a ModulePass.
>
> I am observing a situation where I compile a C++ file with no optimization
> and I get code as I would expect that uses getelementptr. However, if I
> enable optimization with -O3, *some* of my getelementptr instructions are
> lowered to ptrtoint/add-mulinttoptr sequences, but not others.
>
> As far as I can tell, there is no advantage to what LLVM is doing here (such
> as re-using pointer arithmetic computations).
>
> The 'Often Misunderstood GEP page' makes it sound like optimization always
> replaces pointer arithmetic with GEP...