llvm.org GIT mirror llvm / d9e9828
[CodeGen] Use const MBBs in the opt remark diagnostics. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296010 91177308-0d34-0410-b5e6-96231b3b80d8 Ahmed Bougacha 3 years ago
1 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
2828 public:
2929 DiagnosticInfoMIROptimization(enum DiagnosticKind Kind, const char *PassName,
3030 StringRef RemarkName, const DebugLoc &DLoc,
31 MachineBasicBlock *MBB)
31 const MachineBasicBlock *MBB)
3232 : DiagnosticInfoOptimizationBase(Kind, DS_Remark, PassName, RemarkName,
3333 *MBB->getParent()->getFunction(), DLoc),
3434 MBB(MBB) {}
4141 const MachineBasicBlock *getBlock() const { return MBB; }
4242
4343 private:
44 MachineBasicBlock *MBB;
44 const MachineBasicBlock *MBB;
4545 };
4646
4747 /// Diagnostic information for applied optimization remarks.
5353 /// DLoc is the debug location and \p MBB is the block that the optimization
5454 /// operates in.
5555 MachineOptimizationRemark(const char *PassName, StringRef RemarkName,
56 const DebugLoc &DLoc, MachineBasicBlock *MBB)
56 const DebugLoc &DLoc, const MachineBasicBlock *MBB)
5757 : DiagnosticInfoMIROptimization(DK_MachineOptimizationRemark, PassName,
5858 RemarkName, DLoc, MBB) {}
5959
7676 /// remark. \p DLoc is the debug location and \p MBB is the block that the
7777 /// optimization operates in.
7878 MachineOptimizationRemarkMissed(const char *PassName, StringRef RemarkName,
79 const DebugLoc &DLoc, MachineBasicBlock *MBB)
79 const DebugLoc &DLoc,
80 const MachineBasicBlock *MBB)
8081 : DiagnosticInfoMIROptimization(DK_MachineOptimizationRemarkMissed,
8182 PassName, RemarkName, DLoc, MBB) {}
8283
100101 /// optimization operates in.
101102 MachineOptimizationRemarkAnalysis(const char *PassName, StringRef RemarkName,
102103 const DebugLoc &DLoc,
103 MachineBasicBlock *MBB)
104 const MachineBasicBlock *MBB)
104105 : DiagnosticInfoMIROptimization(DK_MachineOptimizationRemarkAnalysis,
105106 PassName, RemarkName, DLoc, MBB) {}
106107