forked from OSchip/llvm-project
[PATCH] [AArch64] Refactor helper functions (NFC)
Refactor helper functions in AArch64InstrInfo to be static methods. llvm-svn: 346273
This commit is contained in:
parent
24994d77b8
commit
f1a0d93b1d
|
@ -758,7 +758,7 @@ bool AArch64InstrInfo::isAsCheapAsAMove(const MachineInstr &MI) const {
|
||||||
llvm_unreachable("Unknown opcode to check as cheap as a move!");
|
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;
|
unsigned Reg, Imm, Shift;
|
||||||
|
|
||||||
switch (MI.getOpcode()) {
|
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;
|
unsigned Imm;
|
||||||
AArch64_AM::ShiftExtendType Ext;
|
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;
|
unsigned Imm, Shift;
|
||||||
AArch64_AM::ShiftExtendType Ext;
|
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()) {
|
switch (MI.getOpcode()) {
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -256,16 +256,16 @@ public:
|
||||||
bool shouldOutlineFromFunctionByDefault(MachineFunction &MF) const override;
|
bool shouldOutlineFromFunctionByDefault(MachineFunction &MF) const override;
|
||||||
/// Returns true if the instruction sets a constant value that can be
|
/// Returns true if the instruction sets a constant value that can be
|
||||||
/// executed more efficiently.
|
/// 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
|
/// Returns true if the load or store has an extension that can be executed
|
||||||
/// more efficiently.
|
/// 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
|
/// Returns true if the instruction has a constant shift left or extension
|
||||||
/// that can be executed more efficiently.
|
/// 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
|
/// Returns true if the instruction has a shift by immediate that can be
|
||||||
/// executed in one cycle less.
|
/// 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
|
/// Return true if the instructions is a SEH instruciton used for unwinding
|
||||||
/// on Windows.
|
/// on Windows.
|
||||||
static bool isSEHInstruction(const MachineInstr &MI);
|
static bool isSEHInstruction(const MachineInstr &MI);
|
||||||
|
|
Loading…
Reference in New Issue