aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-06-17 12:01:51 -0700
committerGitHub <noreply@github.com>2024-06-17 12:01:51 -0700
commit111507ed4ce49bbb8cfbf36a3e143bb25f0f13c0 (patch)
tree8dd407b8933d45b2bd6ff45ebb77c12fb9f83657 /llvm/tools/llvm-cov
parent7439072289f41d46d563763509d5d0d0cb62f3a0 (diff)
downloadllvm-111507ed4ce49bbb8cfbf36a3e143bb25f0f13c0.zip
llvm-111507ed4ce49bbb8cfbf36a3e143bb25f0f13c0.tar.gz
llvm-111507ed4ce49bbb8cfbf36a3e143bb25f0f13c0.tar.bz2
[RISCV] Teach RISCVInsertVSETVLI to work without LiveIntervals (#94686)
Stacked on https://github.com/llvm/llvm-project/pull/94658. 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* necessarily 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. This patch is an alternative to https://github.com/llvm/llvm-project/pull/93796 and https://github.com/llvm/llvm-project/pull/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')
0 files changed, 0 insertions, 0 deletions