Skip to content

Commit d1343e7

Browse files
authored
Clear RP trackers at beginning of analysis. (llvm#777)
2 parents 3a6cd08 + 5e46032 commit d1343e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPURegPressAnalysis.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ AMDGPURegPressAnalysis::getPressure(const MachineBasicBlock *MBB) const {
3737
}
3838

3939
bool AMDGPURegPressAnalysis::runOnMachineFunction(MachineFunction &MF) {
40+
41+
// Reset trackers, or else they will carry across functions in a module.
42+
BlockPressure.clear();
43+
MaxPressure.clear();
44+
4045
if (skipFunction(MF.getFunction()))
4146
return false;
4247

0 commit comments

Comments
 (0)