[PATCH] D99814: [JumpThreading] Change asserts for WantInteger into actual checks
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 5 13:40:20 PDT 2021
paquette added a comment.
In D99814#2668722 <https://reviews.llvm.org/D99814#2668722>, @nikic wrote:
> From someone who isn't very familiar with this code: Why do we need the preference flag in the first place? As indirectbr isn't particularly common, can't we check whether the result is a BlockAddress after the fact?
I'm not hugely familiar with this code either, so I can't really say why it exists. It seems like it's mostly only used for `getKnownConstant`.
I think it might be possible to refactor. It's nice that we can stop the recursive search in `computeValueKnownInPredecessorsImpl` early by using it though. I'm a little surprised that it wasn't used in that way before.
I don't really have strong opinions either way, WDYT?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99814/new/
https://reviews.llvm.org/D99814
More information about the llvm-commits
mailing list