[PATCH] [AArch64] Refactor helper functions (NFC)

Refactor helper functions in AArch64InstrInfo to be static methods.

llvm-svn: 346273
This commit is contained in:
Evandro Menezes 2018-11-06 22:17:14 +00:00
parent 24994d77b8
commit f1a0d93b1d
2 changed files with 8 additions and 8 deletions

View File

@ -758,7 +758,7 @@ bool AArch64InstrInfo::isAsCheapAsAMove(const MachineInstr &MI) const {
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(const MachineInstr &MI) const {
}
}
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::isExynosLdStExtFast(const MachineInstr &MI) const {
}
}
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::isExynosShiftExtFast(const MachineInstr &MI) const {
}
}
bool AArch64InstrInfo::isFalkorShiftExtFast(const MachineInstr &MI) const {
bool AArch64InstrInfo::isFalkorShiftExtFast(const MachineInstr &MI) {
switch (MI.getOpcode()) {
default:
return false;

View File

@ -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);