|
LLVM 23.0.0git
|
#include "AArch64.h"#include "AArch64TargetMachine.h"#include "MCTargetDesc/AArch64MCTargetDesc.h"#include "llvm/ADT/STLExtras.h"#include "llvm/CodeGen/GlobalISel/Utils.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"Go to the source code of this file.
Namespaces | |
| namespace | llvm |
| This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
| #define | DEBUG_TYPE "aarch64-post-select-optimize" |
Functions | |
| unsigned | getNonFlagSettingVariant (unsigned Opc) |
| bool | foldSimpleCrossClassCopies (MachineInstr &MI) |
| Look for cross regclass copies that can be trivially eliminated. | |
| bool | foldCopyDup (MachineInstr &MI) |
| bool | doPeepholeOpts (MachineBasicBlock &MBB) |
| bool | optimizeNZCVDefs (MachineBasicBlock &MBB) |
| bool | runAArch64PostSelectOptimize (MachineFunction &MF) |
| INITIALIZE_PASS_BEGIN (AArch64PostSelectOptimizeLegacy, DEBUG_TYPE, "Optimize AArch64 selected instructions", false, false) INITIALIZE_PASS_END(AArch64PostSelectOptimizeLegacy | |
| FunctionPass * | llvm::createAArch64PostSelectOptimize () |
Variables | |
| DEBUG_TYPE | |
| Optimize AArch64 selected | instructions |
| Optimize AArch64 selected | false |
| #define DEBUG_TYPE "aarch64-post-select-optimize" |
Definition at line 26 of file AArch64PostSelectOptimize.cpp.
| bool doPeepholeOpts | ( | MachineBasicBlock & | MBB | ) |
Definition at line 205 of file AArch64PostSelectOptimize.cpp.
References Changed, foldCopyDup(), foldSimpleCrossClassCopies(), llvm::make_early_inc_range(), MBB, and MI.
Referenced by runAArch64PostSelectOptimize().
| bool foldCopyDup | ( | MachineInstr & | MI | ) |
Definition at line 143 of file AArch64PostSelectOptimize.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineInstr::eraseFromParent(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::Register::isPhysical(), MI, and TII.
Referenced by doPeepholeOpts().
| bool foldSimpleCrossClassCopies | ( | MachineInstr & | MI | ) |
Look for cross regclass copies that can be trivially eliminated.
Definition at line 95 of file AArch64PostSelectOptimize.cpp.
References llvm::TargetRegisterClass::hasSubClass(), and MI.
Referenced by doPeepholeOpts().
Definition at line 55 of file AArch64PostSelectOptimize.cpp.
References Opc.
Referenced by optimizeNZCVDefs().
| INITIALIZE_PASS_BEGIN | ( | AArch64PostSelectOptimizeLegacy | , |
| DEBUG_TYPE | , | ||
| "Optimize AArch64 selected instructions" | , | ||
| false | , | ||
| false | ) |
References DEBUG_TYPE.
| bool optimizeNZCVDefs | ( | MachineBasicBlock & | MBB | ) |
Definition at line 216 of file AArch64PostSelectOptimize.cpp.
References llvm::LiveRegUnits::addLiveOuts(), llvm::LiveRegUnits::available(), Changed, llvm::constrainOperandRegClass(), llvm::dbgs(), getNonFlagSettingVariant(), II, llvm::instructionsWithoutDebug(), LLVM_DEBUG, MBB, llvm::LiveRegUnits::stepBackward(), TII, and TRI.
Referenced by runAArch64PostSelectOptimize().
| bool runAArch64PostSelectOptimize | ( | MachineFunction & | MF | ) |
Definition at line 288 of file AArch64PostSelectOptimize.cpp.
References assert(), Changed, doPeepholeOpts(), llvm::MachineFunction::getProperties(), and optimizeNZCVDefs().
Referenced by llvm::AArch64PostSelectOptimizePass::run().
| DEBUG_TYPE |
Definition at line 309 of file AArch64PostSelectOptimize.cpp.
| Optimize AArch64 selected false |
Definition at line 310 of file AArch64PostSelectOptimize.cpp.
| Optimize AArch64 selected instructions |
Definition at line 310 of file AArch64PostSelectOptimize.cpp.