[llvm] r346273 - [PATCH] [AArch64] Refactor helper functions (NFC)

Evandro Menezes via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 6 14:17:14 PST 2018


Author: evandro
Date: Tue Nov  6 14:17:14 2018
New Revision: 346273

URL: http://llvm.org/viewvc/llvm-project?rev=346273&view=rev
Log:
[PATCH] [AArch64] Refactor helper functions (NFC)

Refactor helper functions in AArch64InstrInfo to be static methods.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
    llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.h

Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp?rev=346273&r1=346272&r2=346273&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp Tue Nov  6 14:17:14 2018
@@ -758,7 +758,7 @@ bool AArch64InstrInfo::isAsCheapAsAMove(
   llvm_unreachable("Unknown opcode to check as cheap as a move!");
 }
 
-bool AArch64InstrInfo::isExynosResetFast(const MachineInstr &MI) const {
+bool AArch64InstrInfo::isExynosResetFast(const MachineInstr &MI) {
   unsigned Reg, Imm, Shift;
 
   switch (MI.getOpcode()) {
@@ -829,7 +829,7 @@ bool AArch64InstrInfo::isExynosResetFast
   }
 }
 
-bool AArch64InstrInfo::isExynosLdStExtFast(const MachineInstr &MI) const {
+bool AArch64InstrInfo::isExynosLdStExtFast(const MachineInstr &MI) {
   unsigned Imm;
   AArch64_AM::ShiftExtendType Ext;
 
@@ -894,7 +894,7 @@ bool AArch64InstrInfo::isExynosLdStExtFa
   }
 }
 
-bool AArch64InstrInfo::isExynosShiftExtFast(const MachineInstr &MI) const {
+bool AArch64InstrInfo::isExynosShiftExtFast(const MachineInstr &MI) {
   unsigned Imm, Shift;
   AArch64_AM::ShiftExtendType Ext;
 
@@ -963,7 +963,7 @@ bool AArch64InstrInfo::isExynosShiftExtF
   }
 }
 
-bool AArch64InstrInfo::isFalkorShiftExtFast(const MachineInstr &MI) const {
+bool AArch64InstrInfo::isFalkorShiftExtFast(const MachineInstr &MI) {
   switch (MI.getOpcode()) {
   default:
     return false;

Modified: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.h?rev=346273&r1=346272&r2=346273&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.h (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.h Tue Nov  6 14:17:14 2018
@@ -256,16 +256,16 @@ public:
   bool shouldOutlineFromFunctionByDefault(MachineFunction &MF) const override;
   /// Returns true if the instruction sets a constant value that can be
   /// executed more efficiently.
-  bool isExynosResetFast(const MachineInstr &MI) const;
+  static bool isExynosResetFast(const MachineInstr &MI);
   /// Returns true if the load or store has an extension that can be executed
   /// more efficiently.
-  bool isExynosLdStExtFast(const MachineInstr &MI) const;
+  static bool isExynosLdStExtFast(const MachineInstr &MI);
   /// Returns true if the instruction has a constant shift left or extension
   /// that can be executed more efficiently.
-  bool isExynosShiftExtFast(const MachineInstr &MI) const;
+  static bool isExynosShiftExtFast(const MachineInstr &MI);
   /// Returns true if the instruction has a shift by immediate that can be
   /// executed in one cycle less.
-  bool isFalkorShiftExtFast(const MachineInstr &MI) const;
+  static bool isFalkorShiftExtFast(const MachineInstr &MI);
   /// Return true if the instructions is a SEH instruciton used for unwinding
   /// on Windows.
   static bool isSEHInstruction(const MachineInstr &MI);




More information about the llvm-commits mailing list