LLVM 20.0.0git
|
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/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
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" |
#define | DUMP_BEFORE() ((ArcKillAddrMode & 0x0001) != 0) |
#define | DUMP_AFTER() ((ArcKillAddrMode & 0x0002) != 0) |
#define | VIEW_BEFORE() ((ArcKillAddrMode & 0x0004) != 0) |
#define | VIEW_AFTER() ((ArcKillAddrMode & 0x0008) != 0) |
#define | KILL_PASS() ((ArcKillAddrMode & 0x0010) != 0) |
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 | |
static cl::opt< unsigned > | llvm::ArcKillAddrMode ("arc-kill-addr-mode", cl::init(0), cl::ReallyHidden) |
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 34 of file ARCOptAddrMode.cpp.
#define DUMP_AFTER | ( | ) | ((ArcKillAddrMode & 0x0002) != 0) |
Definition at line 42 of file ARCOptAddrMode.cpp.
#define DUMP_BEFORE | ( | ) | ((ArcKillAddrMode & 0x0001) != 0) |
Definition at line 41 of file ARCOptAddrMode.cpp.
#define GET_INSTRMAP_INFO |
Definition at line 15 of file ARCOptAddrMode.cpp.
#define KILL_PASS | ( | ) | ((ArcKillAddrMode & 0x0010) != 0) |
Definition at line 45 of file ARCOptAddrMode.cpp.
#define OPTADDRMODE_DESC "ARC load/store address mode" |
Definition at line 32 of file ARCOptAddrMode.cpp.
#define OPTADDRMODE_NAME "arc-addr-mode" |
Definition at line 33 of file ARCOptAddrMode.cpp.
#define VIEW_AFTER | ( | ) | ((ArcKillAddrMode & 0x0008) != 0) |
Definition at line 44 of file ARCOptAddrMode.cpp.
#define VIEW_BEFORE | ( | ) | ((ArcKillAddrMode & 0x0004) != 0) |
Definition at line 43 of file ARCOptAddrMode.cpp.
|
static |
Definition at line 150 of file ARCOptAddrMode.cpp.
References assert(), llvm::MachineDominatorTree::dominates(), llvm::MachineBasicBlock::empty(), llvm::User::getOperand(), llvm::Use::getOperandNo(), llvm::Register::isVirtualRegister(), MBB, MI, MRI, and llvm::MachineBasicBlock::rbegin().
INITIALIZE_PASS_BEGIN | ( | ARCOptAddrMode | , |
OPTADDRMODE_NAME | , | ||
OPTADDRMODE_DESC | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 134 of file ARCOptAddrMode.cpp.
|
static |
Definition at line 179 of file ARCOptAddrMode.cpp.
References llvm::HexagonInstrInfo::getBaseAndOffsetPosition(), llvm::MachineOperand::getImm(), llvm::MachineOperand::isImm(), isValidLoadStoreOffset(), MI, llvm::Offset, and TII.
|
static |
Definition at line 132 of file ARCOptAddrMode.cpp.
|
static |
Definition at line 128 of file ARCOptAddrMode.cpp.
Referenced by isLoadStoreThatCanHandleDisplacement().
false |
Definition at line 123 of file ARCOptAddrMode.cpp.
OPTADDRMODE_DESC |
Definition at line 123 of file ARCOptAddrMode.cpp.
OPTADDRMODE_NAME |
Definition at line 123 of file ARCOptAddrMode.cpp.