[PATCH] D71974: [Attributor][WIP] Connect AAIsDead with AAUndefinedBehavior
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 10 11:50:58 PST 2020
baziotis added a comment.
Sorry for being late, this is an exam period so time is very limited. I saw again the problem and it changed a bit but it's similar. To be sure we're on the same page:
In this:
define i32 @example(i1* %alloc) {
%cond = load i1, i1* %alloc
br i1 %cond, label %t, label %e
t:
ret i32 1
e:
ret i32 2
}
The block of `br` initially is assumed live, but `AAIsDeadFunction::updateImpl()` is called, which, because the `br` is assumed UB, removes the block from the `AssumedLiveBlocks`.
`AAUB` looks only live instructions and the `br` now will never be live (also maybe the fact that we're removing - and it's the only place - messes with the monotony).
I think one solution is to only remove a block if it is known UB.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71974/new/
https://reviews.llvm.org/D71974
More information about the llvm-commits
mailing list