[llvm-dev] Accessing global variables arrays result in inlined getelementptrs
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 25 08:07:18 PDT 2019
On Wed, 24 Jul 2019 at 23:02, Antonin Reitz via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> This is really something that would help having simpler static analysis,
> even if additional analysis of the code can be used as a (quite ugly)
> workaround.
Are you aware of the GEPOperator[*] class? It's designed to provide a
uniform interface to both GetElementPtrInst and a
GetElementPtrConstantExpr instances. It probably wouldn't be suitable
for all uses, but if it covers yours it would make the point moot.
Cheers.
Tim.
[*] https://llvm.org/doxygen/classllvm_1_1GEPOperator.html
More information about the llvm-dev
mailing list