[PATCH] D23214: [MDA] Treat invariant.start as non-dependence

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 12:40:06 PDT 2016


Hi Daniel,

Daniel Berlin wrote:
 > I really want to say yes, but ....
 >
 > 1. Your argument is identical for the other intrisics right above it.
 > None of them touch memory in practice.
 > 2. MDA is deliberately returning it as a Dep so that things know where
 > the invariants start and end (again, same with lifetime markers).
 > I realize this is not ideal (and in fact, sucks), but things depend 
on it.
 >
 > 3. Without this, you will enable hoisting that is not allowed, if things
 > use MDA to perform hoisting.
 >
 > You cannot move the invariant start and end calls, and MDA saying they
 > are read-only will enable them to be moved.

Are you saying that they'll get speculated out of control flow?  That
does not seem safe -- how does LLVM know that they won't segfault?

 > We last tried this by saying they did not touch memory (which is
 > correct), and peter had to revert the set of changes that gave them "The
 > correct answer" because it broke on real code.

Do you happen to remember any relevant revision numbers / zilla bugs
for this?

-- Sanjoy


More information about the llvm-commits mailing list