File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,10 @@ static cl::opt<unsigned> MaxVRegs("riscv-liveness-max-vregs",
5252 cl::desc (" Maximum VRegs to track" ),
5353 cl::init(1024 ), cl::Hidden);
5454
55+ static cl::opt<unsigned > VerifyLiveness (" riscv-liveness-verify" ,
56+ cl::desc (" Verify liveness information" ),
57+ cl::init(true ), cl::Hidden);
58+
5559namespace {
5660
5761// / LivenessInfo - Stores liveness information for a basic block
@@ -109,9 +113,12 @@ class RISCVLiveVariables : public MachineFunctionPass {
109113 // / Print liveness information for debugging
110114 void print (raw_ostream &OS, const Module *M = nullptr ) const override ;
111115
116+ // / Verify the computed liveness information against MBB live-ins.
117+ // / TODO: Extend verification to live-outs and instruction-level liveness.
112118 void verifyLiveness (MachineFunction &MF) const ;
113119
114120 // / Mark operands that kill a register
121+ // / TODO: Add and remove kill flags as necessary.
115122 bool markKills (MachineFunction &MF);
116123
117124private:
@@ -486,8 +493,9 @@ bool RISCVLiveVariables::runOnMachineFunction(MachineFunction &MF) {
486493 print (dbgs ());
487494 });
488495
489- verifyLiveness (MF);
490- // This is an analysis pass, it doesn't modify the function
496+ if (VerifyLiveness)
497+ verifyLiveness (MF);
498+
491499 return Changed;
492500}
493501
You can’t perform that action at this time.
0 commit comments