This patch prepares ValueLatticeElement to be used by SCCP, by:
- making the mark* functions public
- make the mark* functions return a bool indicating if the value has changed.
Paths
| Differential D60581
[ValueLattice] Make mark* functions public, return if value changed. ClosedPublic Authored by fhahn on Apr 11 2019, 1:55 PM.
Details Summary This patch prepares ValueLatticeElement to be used by SCCP, by:
Diff Detail
Event TimelineComment Actions I'm not necessarily sure I like this. It's simply spreading in a general framework a concept that shouldn't exist to begin with. I'd rather remove forced constant from SCCP, even though it might result in us losing some optimization power. fhahn added a child revision: D60582: [IPSCCP] Use ValueLatticeElement instead of LatticeVal (NFCI).Apr 11 2019, 2:04 PM Comment Actions
Right, I am happy to go in that direction as well. Comment Actions I've put up a commit removing forcedconstant on top of the integer range support: D61314. This is mostly to have an easy way to compare the impact of forcedconstant and could be folded in the integer range support. But maybe it is easier to review/commit/test as separate steps. Comment Actions Unit tests: pass. 61085 tests passed, 0 failed and 728 were skipped. clang-tidy: pass. clang-format: pass. Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml fhahn retitled this revision from [ValueLattice] Add forceconstant, for SCCP. to [ValueLattice] Make mark* functions public, return if value changed..Feb 9 2020, 12:02 PM fhahn added a child revision: D73240: [ValueLattice] Update markConstantRange to return false for subset ranges..Feb 9 2020, 12:05 PM fhahn removed a child revision: D60582: [IPSCCP] Use ValueLatticeElement instead of LatticeVal (NFCI). fhahn added inline comments. Comment Actions Address comments: remove unnecessary assert, undo unnnecessary changes in getCompare. This revision is now accepted and ready to land.Feb 11 2020, 5:13 AM Comment Actions Thanks for taking a look. I plan to land this, once D60582 has been accepted as well. Closed by commit rGaa5ebfdf205d: [ValueLattice] Make mark* functions public, return if value changed. (authored by fhahn). · Explain WhyFeb 15 2020, 11:56 AM This revision was automatically updated to reflect the committed changes. fhahn removed a child revision: D73240: [ValueLattice] Update markConstantRange to return false for subset ranges..Feb 15 2020, 12:14 PM
Revision Contents
Diff 194750 llvm/include/llvm/Analysis/ValueLattice.h
llvm/lib/Analysis/ValueLattice.cpp
|
I believe this assert is useless after the isa<>. Can either be dropped or the previous order restored (not sure why it was changed?)