[PATCH] D67261: [NFC] Make the describeLoadedValue() hook return machine operand objects

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 8 07:03:50 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL371332: [NFC] Make the describeLoadedValue() hook return machine operand objects (authored by dstenb, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D67261?vs=219040&id=219265#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67261/new/

https://reviews.llvm.org/D67261

Files:
  llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h
  llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
  llvm/trunk/lib/Target/X86/X86InstrInfo.cpp


Index: llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h
===================================================================
--- llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h
+++ llvm/trunk/include/llvm/CodeGen/TargetInstrInfo.h
@@ -60,7 +60,7 @@
 
 template <class T> class SmallVectorImpl;
 
-using ParamLoadedValue = std::pair<const MachineOperand*, DIExpression*>;
+using ParamLoadedValue = std::pair<MachineOperand, DIExpression*>;
 
 //---------------------------------------------------------------------------
 ///
Index: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -655,12 +655,12 @@
     unsigned Reg = Defs[0];
 
     if (auto ParamValue = TII->describeLoadedValue(*I)) {
-      if (ParamValue->first->isImm()) {
-        unsigned Val = ParamValue->first->getImm();
+      if (ParamValue->first.isImm()) {
+        unsigned Val = ParamValue->first.getImm();
         DbgValueLoc DbgLocVal(ParamValue->second, Val);
         finishCallSiteParam(DbgLocVal, Reg);
-      } else if (ParamValue->first->isReg()) {
-        Register RegLoc = ParamValue->first->getReg();
+      } else if (ParamValue->first.isReg()) {
+        Register RegLoc = ParamValue->first.getReg();
         unsigned SP = TLI->getStackPointerRegisterToSaveRestore();
         Register FP = TRI->getFrameRegister(*MF);
         bool IsSPorFP = (RegLoc == SP) || (RegLoc == FP);
Index: llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
+++ llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
@@ -1129,10 +1129,10 @@
 
   if (isCopyInstr(MI, SrcRegOp, DestRegOp)) {
     Op = SrcRegOp;
-    return ParamLoadedValue(Op, Expr);
+    return ParamLoadedValue(*Op, Expr);
   } else if (MI.isMoveImmediate()) {
     Op = &MI.getOperand(1);
-    return ParamLoadedValue(Op, Expr);
+    return ParamLoadedValue(*Op, Expr);
   } else if (MI.hasOneMemOperand()) {
     int64_t Offset;
     const auto &TRI = MF->getSubtarget().getRegisterInfo();
@@ -1144,7 +1144,7 @@
 
     Expr = DIExpression::prepend(Expr, DIExpression::DerefAfter, Offset);
     Op = BaseOp;
-    return ParamLoadedValue(Op, Expr);
+    return ParamLoadedValue(*Op, Expr);
   }
 
   return None;
Index: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
@@ -7545,7 +7545,7 @@
     DIExpression::appendOffset(Ops, Offset);
     Expr = DIExpression::get(MI.getMF()->getFunction().getContext(), Ops);
 
-    return ParamLoadedValue(Op, Expr);;
+    return ParamLoadedValue(*Op, Expr);;
   }
   default:
     return TargetInstrInfo::describeLoadedValue(MI);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67261.219265.patch
Type: text/x-patch
Size: 2930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190908/cc59596e/attachment.bin>


More information about the llvm-commits mailing list