[PATCH] D76574: [MCInstPrinter] Pass `Address` parameter to MCOI::OPERAND_PCREL typed operands

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 02:39:49 PDT 2020


jhenderson added a comment.

What, if any, are the actual behaviour changes in this patch? I don't see any test updates, but the patch isn't labelled NFC.



================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp:1350
 
-void AArch64InstPrinter::printAlignedLabel(const MCInst *MI, unsigned OpNum,
+void AArch64InstPrinter::printAlignedLabel(const MCInst *MI, uint64_t Address,
+                                           unsigned OpNum,
----------------
`Address` is unused. Is this going to cause an unused variable warning?


================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp:1366
       dyn_cast<MCConstantExpr>(MI->getOperand(OpNum).getExpr());
-  int64_t Address;
-  if (BranchTarget && BranchTarget->evaluateAsAbsolute(Address)) {
+  int64_t Address1;
+  if (BranchTarget && BranchTarget->evaluateAsAbsolute(Address1)) {
----------------
`Address1` doesn't clearly distinguish to me why the passed-in address cannot be used instead. Perhaps you need to change the name of this variable here.


================
Comment at: llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h:41
   void printPCRelImm(const MCInst *MI, unsigned OpNo, raw_ostream &O);
+  void printPCRelImm(const MCInst *MI, uint64_t Address, unsigned OpNo,
+                     raw_ostream &O) {
----------------
`Address` is unused here.


================
Comment at: llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp:159
+void SystemZInstPrinter::printPCRelTLSOperand(const MCInst *MI,
+                                              uint64_t Address, int OpNum,
                                               raw_ostream &O) {
----------------
Ditto.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76574





More information about the llvm-commits mailing list