[PATCH] D98843: [Evaluator] Look through invariant.group intrinsics
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 23:52:35 PDT 2021
aeubanks created this revision.
Herald added subscribers: hiraditya, Prazek.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Turning on -fstrict-vtable-pointers in Chrome caused an extra global
initializer. Turns out that a llvm.strip.invariant.group intrinsic was
causing GlobalOpt to fail to step through some simple code.
We can treat *.invariant.group uses as simply their operand. This should
be safe because the Evaluator does not skip memory accesses due to
invariants.
However, we don't want to leak that we've ignored *.invariant.group
calls to users of Evaluator, so we bail out if we evaluate to a pointer
constant, since we may have looked through *.invariant.group calls.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98843
Files:
llvm/include/llvm/Transforms/Utils/Evaluator.h
llvm/lib/Transforms/Utils/Evaluator.cpp
llvm/test/Transforms/GlobalOpt/invariant.group.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98843.331472.patch
Type: text/x-patch
Size: 8782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/759ff62a/attachment.bin>
More information about the llvm-commits
mailing list