[PATCH] D75120: [ValueLattice] Add new state for undef constants. (WIP)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 26 10:13:35 PST 2020
efriedma added a comment.
If you don't have all the relevant states represented in the ValueLattice, where are you storing the "possibly undef" bit? I think having all the states in the ValueLattice is simpler, at least conceptually.
================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:439
- // Undef values remain unknown.
- if (!isa<UndefValue>(V))
LV.markConstant(C); // Constants are constant
----------------
fhahn wrote:
> efriedma wrote:
> > Not sure about this change; do we not need to markUndef?
> markConstant used to be a no-op for UndefValue constants. I've updated it to use markUndefined for UndefValue constants, it might be clearer to do it explicitly here though?
Oh, right, that makes sense.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75120/new/
https://reviews.llvm.org/D75120
More information about the llvm-commits
mailing list