[PATCH] D63928: [ARM][SCEV][LSR] Prevent using undefined value in binops
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 04:02:12 PDT 2019
evgeny777 added a comment.
> so maybe we could try to introduce a map of updated values so that we don't reuse 'dead' instructions?
I tried this initially but the problem is that previous result of `expand` could be invalidated by subsequent call:
Value *A = expand(Op1);
Value *B = expand(Op2);
// A may become invalid at this point
There are lot of such potential "points of failure" in SCEVExpander and I don't easy way to address them all.
On the other hand it's much easier to strip extra IR cast instructions in SCEVExpander::clear (doing RAUW and eraseFromParent), but they will be eliminated by machine passes anyway,
so I wonder if it's worth doing
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63928/new/
https://reviews.llvm.org/D63928
More information about the llvm-commits
mailing list