diff options
author | Philip Reames <preames@rivosinc.com> | 2024-06-17 12:05:14 -0700 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2024-06-17 12:05:43 -0700 |
commit | 8756043467edbc6d62efd36af9985150b5781111 (patch) | |
tree | 8dd407b8933d45b2bd6ff45ebb77c12fb9f83657 /llvm/tools/llvm-cov/SourceCoverageView.cpp | |
parent | 1d028151c9cd79d76c1cda0bc3b4f10a2239d8b6 (diff) | |
download | llvm-8756043467edbc6d62efd36af9985150b5781111.zip llvm-8756043467edbc6d62efd36af9985150b5781111.tar.gz llvm-8756043467edbc6d62efd36af9985150b5781111.tar.bz2 |
[RISCV] Teach RISCVInsertVSETVLI to work without LiveIntervals
(Reapplying with corrected commit message)
We recently moved RISCVInsertVSETVLI from before vector register allocation
to after vector register allocation. When doing so, we added an unconditional
dependency on LiveIntervals - even at O0 where LiveIntevals hadn't previously
run. As reported in #93587, this was apparently not safe to do.
This change makes LiveIntervals optional, and adjusts all the update code to
only run wen live intervals is present. The only real tricky part of this
change is the abstract state tracking in the dataflow. We need to represent
a "register w/unknown definition" state - but only when we don't have
LiveIntervals.
This adjust the abstract state definition so that the AVLIsReg state can
represent either a register + valno, or a register + unknown definition.
With LiveIntervals, we have an exact definition for each AVL use. Without
LiveIntervals, we treat the definition of a register AVL as being unknown.
The key semantic change is that we now have a state in the lattice for which
something is known about the AVL value, but for which two identical lattice
elements do *not* neccessarily represent the same AVL value at runtime.
Previously, the only case which could result in such an unknown AVL was the
fully unknown state (where VTYPE is also fully unknown). This requires a
small adjustment to hasSameAVL and lattice state equality to draw this
important distinction.
The net effect of this patch is that we remove the LiveIntervals dependency
at O0, and O0 code quality will regress for cases involving register AVL values.
In practice, this means we pessimize code written with intrinsics at O0.
This patch is an alternative to #93796 and #94340. It is very directly
inspired by review conversation around them, and thus should be considered
coauthored by Luke.
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.cpp')
0 files changed, 0 insertions, 0 deletions