[PATCH] D127731: WIP: [MachineVerifier] Try harder to verify analyses
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 03:11:40 PDT 2022
foad created this revision.
Herald added subscribers: jsji, kosarev, jsilvanus, hsmhsm, mstorsjo, kerbowa, pengfei, kbarton, hiraditya, tpr, nhaehnle, jvesely, nemanjai, arsenm, MatzeB.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Change MachineVerifier to call AnalysisUsage::addUsedIfAvailable for
analyses like LiveIntervals that it can verify.
Before this change, if pass P1 <https://reviews.llvm.org/P1> is the last user of analysis A1, the
legacy pass manager will free A1 after running P1 <https://reviews.llvm.org/P1> and *before* running
the machine verifier, so the analysis will not be verified even if P1 <https://reviews.llvm.org/P1>
claimed to preserve it.
After this change, the machine verifier will be seen as a user of A1, so
it will not be freed until after the verifier has run and verified it.
The effect of this is that analyses are verified in more places than
they were before, which shows up some problems:
- AMDGPU's SIOptimizeExecMaskingPreRA claimed to preserve all analyses but apparently does not preserve LiveIntervals
- HexagonExpandCondsets claimed to preserve LiveIntervals but apparently does not
- PPCTLSDynamicCall claimed to preserve LiveIntervals but apparently does not
- Many (mostly X86) tests still fail because TwoAddressInstruction does not preserve LiveVariables
There are also some codegen differences, presumably because optional
analyses are no longer available in some places where they were
available before.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127731
Files:
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.intersect_ray.ll
llvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll
llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
llvm/test/CodeGen/AMDGPU/sdiv64.ll
llvm/test/CodeGen/AMDGPU/si-lower-control-flow.mir
llvm/test/CodeGen/AMDGPU/undefined-subreg-liverange.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127731.436721.patch
Type: text/x-patch
Size: 38918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220614/74614dda/attachment.bin>
More information about the llvm-commits
mailing list