|
LLVM
10.0.0
|
This pass folds LD/ST + ADD pairs into Pre/Post-increment form of load/store instructions. More...
#include "ARC.h"#include "ARCInstrInfo.h"#include "ARCTargetMachine.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineDominators.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/TargetRegisterInfo.h"#include "llvm/IR/Function.h"#include "llvm/InitializePasses.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Namespaces | |
| llvm | |
| This class represents lattice values for constants. | |
Macros | |
| #define | GET_INSTRMAP_INFO |
| #define | OPTADDRMODE_DESC "ARC load/store address mode" |
| #define | OPTADDRMODE_NAME "arc-addr-mode" |
| #define | DEBUG_TYPE "arc-addr-mode" |
Functions | |
| FunctionPass * | llvm::createARCOptAddrMode () |
| void | llvm::initializeARCOptAddrModePass (PassRegistry &) |
| INITIALIZE_PASS_BEGIN (ARCOptAddrMode, OPTADDRMODE_NAME, OPTADDRMODE_DESC, false, false) INITIALIZE_PASS_END(ARCOptAddrMode | |
| static false bool | isValidLoadStoreOffset (int64_t Off) |
| static bool | isValidIncrementOffset (int64_t Off) |
| static bool | isAddConstantOp (const MachineInstr &MI, int64_t &Amount) |
| static bool | dominatesAllUsesOf (const MachineInstr *MI, unsigned VReg, MachineDominatorTree *MDT, MachineRegisterInfo *MRI) |
| static bool | isLoadStoreThatCanHandleDisplacement (const TargetInstrInfo *TII, const MachineInstr &MI, int64_t Disp) |
Variables | |
| OPTADDRMODE_NAME | |
| OPTADDRMODE_DESC | |
| false | |
This pass folds LD/ST + ADD pairs into Pre/Post-increment form of load/store instructions.
Definition in file ARCOptAddrMode.cpp.
| #define DEBUG_TYPE "arc-addr-mode" |
Definition at line 33 of file ARCOptAddrMode.cpp.
| #define GET_INSTRMAP_INFO |
Definition at line 15 of file ARCOptAddrMode.cpp.
| #define OPTADDRMODE_DESC "ARC load/store address mode" |
Definition at line 31 of file ARCOptAddrMode.cpp.
| #define OPTADDRMODE_NAME "arc-addr-mode" |
Definition at line 32 of file ARCOptAddrMode.cpp.
|
static |
Definition at line 139 of file ARCOptAddrMode.cpp.
References assert(), llvm::MachineDominatorTree::dominates(), llvm::MachineBasicBlock::empty(), llvm::sys::path::end(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getOperandNo(), llvm::MachineInstr::getParent(), llvm::MachineInstr::isPHI(), llvm::Register::isVirtualRegister(), llvm::MachineBasicBlock::rbegin(), llvm::MachineRegisterInfo::use_nodbg_begin(), and llvm::MachineRegisterInfo::use_nodbg_end().
Referenced by isLoadStoreThatCanHandleDisplacement().
| INITIALIZE_PASS_BEGIN | ( | ARCOptAddrMode | , |
| OPTADDRMODE_NAME | , | ||
| OPTADDRMODE_DESC | , | ||
| false | , | ||
| false | |||
| ) |
|
static |
Definition at line 123 of file ARCOptAddrMode.cpp.
References assert(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), and LLVM_FALLTHROUGH.
Referenced by isLoadStoreThatCanHandleDisplacement().
|
static |
Definition at line 169 of file ARCOptAddrMode.cpp.
References llvm::MCID::Add, assert(), B, llvm::dbgs(), dominatesAllUsesOf(), llvm::NVPTXISD::Dummy, llvm::MachineInstr::eraseFromParent(), llvm::TargetInstrInfo::getBaseAndOffsetPosition(), llvm::MachineOperand::getImm(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineBasicBlock::insertAfter(), isAddConstantOp(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::Register::isStackSlot(), isValidIncrementOffset(), isValidLoadStoreOffset(), llvm::Register::isVirtualRegister(), LLVM_DEBUG, llvm_unreachable, llvm::MachineInstr::mayLoadOrStore(), llvm::MachineInstr::mayStore(), MI, MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineInstr::removeFromParent(), and std::swap().
|
static |
Definition at line 121 of file ARCOptAddrMode.cpp.
Referenced by isLoadStoreThatCanHandleDisplacement().
Definition at line 117 of file ARCOptAddrMode.cpp.
Referenced by isLoadStoreThatCanHandleDisplacement().
| false |
Definition at line 112 of file ARCOptAddrMode.cpp.
| OPTADDRMODE_DESC |
Definition at line 112 of file ARCOptAddrMode.cpp.
| OPTADDRMODE_NAME |
Definition at line 112 of file ARCOptAddrMode.cpp.
1.8.13