@@ -818,16 +818,15 @@ void DstStatePrinter::print(raw_ostream &OS, const DstState &S) const {
818818// / version for functions without reconstructed CFG.
819819class DstSafetyAnalysis {
820820public:
821- DstSafetyAnalysis (BinaryFunction &BF,
822- const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
821+ DstSafetyAnalysis (BinaryFunction &BF, ArrayRef<MCPhysReg> RegsToTrackInstsFor)
823822 : BC(BF.getBinaryContext()), NumRegs(BC.MRI->getNumRegs ()),
824823 RegsToTrackInstsFor(RegsToTrackInstsFor) {}
825824
826825 virtual ~DstSafetyAnalysis () {}
827826
828827 static std::shared_ptr<DstSafetyAnalysis>
829828 create (BinaryFunction &BF, MCPlusBuilder::AllocatorIdTy AllocId,
830- const ArrayRef<MCPhysReg> RegsToTrackInstsFor);
829+ ArrayRef<MCPhysReg> RegsToTrackInstsFor);
831830
832831 virtual void run () = 0;
833832 virtual const DstState &getStateAfter (const MCInst &Inst) const = 0;
@@ -1030,7 +1029,7 @@ class DataflowDstSafetyAnalysis
10301029public:
10311030 DataflowDstSafetyAnalysis (BinaryFunction &BF,
10321031 MCPlusBuilder::AllocatorIdTy AllocId,
1033- const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
1032+ ArrayRef<MCPhysReg> RegsToTrackInstsFor)
10341033 : DstSafetyAnalysis(BF, RegsToTrackInstsFor), DFParent(BF, AllocId) {}
10351034
10361035 const DstState &getStateAfter (const MCInst &Inst) const override {
@@ -1114,7 +1113,7 @@ class CFGUnawareDstSafetyAnalysis : public DstSafetyAnalysis {
11141113public:
11151114 CFGUnawareDstSafetyAnalysis (BinaryFunction &BF,
11161115 MCPlusBuilder::AllocatorIdTy AllocId,
1117- const ArrayRef<MCPhysReg> RegsToTrackInstsFor)
1116+ ArrayRef<MCPhysReg> RegsToTrackInstsFor)
11181117 : DstSafetyAnalysis(BF, RegsToTrackInstsFor), BF(BF), AllocId(AllocId) {
11191118 StateAnnotationIndex =
11201119 BC.MIB ->getOrCreateAnnotationIndex (" CFGUnawareDstSafetyAnalysis" );
@@ -1157,7 +1156,7 @@ class CFGUnawareDstSafetyAnalysis : public DstSafetyAnalysis {
11571156std::shared_ptr<DstSafetyAnalysis>
11581157DstSafetyAnalysis::create (BinaryFunction &BF,
11591158 MCPlusBuilder::AllocatorIdTy AllocId,
1160- const ArrayRef<MCPhysReg> RegsToTrackInstsFor) {
1159+ ArrayRef<MCPhysReg> RegsToTrackInstsFor) {
11611160 if (BF.hasCFG ())
11621161 return std::make_shared<DataflowDstSafetyAnalysis>(BF, AllocId,
11631162 RegsToTrackInstsFor);
@@ -1391,7 +1390,7 @@ void FunctionAnalysis::findUnsafeDefs(
13911390}
13921391
13931392void FunctionAnalysis::augmentUnsafeDefReports (
1394- const ArrayRef<BriefReport<MCPhysReg>> Reports) {
1393+ ArrayRef<BriefReport<MCPhysReg>> Reports) {
13951394 SmallVector<MCPhysReg> RegsToTrack = collectRegsToTrack (Reports);
13961395 // Re-compute the analysis with register tracking.
13971396 auto Analysis = DstSafetyAnalysis::create (BF, AllocatorId, RegsToTrack);
0 commit comments