Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AArch64/AArch64CollectLOH.cpp
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | static bool isCandidateStore(const MachineInstr &MI, const MachineOperand &MO) { | ||||
case AArch64::STRXui: | case AArch64::STRXui: | ||||
case AArch64::STRSui: | case AArch64::STRSui: | ||||
case AArch64::STRDui: | case AArch64::STRDui: | ||||
case AArch64::STRQui: | case AArch64::STRQui: | ||||
// We can only optimize the index operand. | // We can only optimize the index operand. | ||||
// In case we have str xA, [xA, #imm], this is two different uses | // In case we have str xA, [xA, #imm], this is two different uses | ||||
// of xA and we cannot fold, otherwise the xA stored may be wrong, | // of xA and we cannot fold, otherwise the xA stored may be wrong, | ||||
// even if #imm == 0. | // even if #imm == 0. | ||||
return MI.getOperandNo(&MO) == 1 && | return MO.getOperandNo() == 1 && | ||||
MI.getOperand(0).getReg() != MI.getOperand(1).getReg(); | MI.getOperand(0).getReg() != MI.getOperand(1).getReg(); | ||||
} | } | ||||
} | } | ||||
/// Check whether the given instruction can be the end of a LOH chain | /// Check whether the given instruction can be the end of a LOH chain | ||||
/// involving a load. | /// involving a load. | ||||
static bool isCandidateLoad(const MachineInstr &MI) { | static bool isCandidateLoad(const MachineInstr &MI) { | ||||
switch (MI.getOpcode()) { | switch (MI.getOpcode()) { | ||||
▲ Show 20 Lines • Show All 374 Lines • Show Last 20 Lines |