[llvm-dev] Loss (?) of AA on function inlining
Emil Hammarström via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 31 04:01:23 PST 2018
Hello,
I have written a pass that utilizes an alias analysis to check if an
instruction reads a memory location. Here's that check in source code:
https://github.com/eHammarstrom/llvm-dbds/blob/dbds/lib/Transforms/Scalar/BlockDuplicator.cpp#L640
This check seems to fail when not supplying `-fno-inline-functions` to
`MAKEOPT` in LNT. This results in what seems like a massive memory leak.
When passing the aforementioned flag all tests pass and we may measure
performance.
When only running `clang -O3` on small test cases I see that illegal
optimizations are applied without the use of `-fno-inline-functions` --
i.e. the previously mentioned check fails. The pass is statically linked to
the function simplification pass here:
https://github.com/eHammarstrom/llvm-dbds/blob/2ec7e32c8026f8ae2c8540e9040b3043e6d30429/lib/Transforms/IPO/PassManagerBuilder.cpp#L416
Why is the alias analysis seemingly lost on function inlining?
BR,
Emil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181231/5cf0eef0/attachment-0001.html>
More information about the llvm-dev
mailing list