|
LLVM
7.0.0
|
#include "AMDGPU.h"#include "AMDGPUSubtarget.h"#include "SIInstrInfo.h"#include "SIRegisterInfo.h"#include "MCTargetDesc/AMDGPUMCTargetDesc.h"#include "Utils/AMDGPUBaseInfo.h"#include "llvm/ADT/ArrayRef.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringRef.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/IR/DebugLoc.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/raw_ostream.h"#include <algorithm>#include <cassert>#include <cstdlib>#include <iterator>#include <utility>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "si-load-store-opt" |
Functions | |
| INITIALIZE_PASS_BEGIN (SILoadStoreOptimizer, DEBUG_TYPE, "SI Load Store Optimizer", false, false) INITIALIZE_PASS_END(SILoadStoreOptimizer | |
| static void | moveInstsAfter (MachineBasicBlock::iterator I, ArrayRef< MachineInstr *> InstsToMove) |
| static void | addDefsUsesToList (const MachineInstr &MI, DenseSet< unsigned > &RegDefs, DenseSet< unsigned > &PhysRegUses) |
| static bool | memAccessesCanBeReordered (MachineBasicBlock::iterator A, MachineBasicBlock::iterator B, const SIInstrInfo *TII, AliasAnalysis *AA) |
| static bool | addToListsIfDependent (MachineInstr &MI, DenseSet< unsigned > &RegDefs, DenseSet< unsigned > &PhysRegUses, SmallVectorImpl< MachineInstr *> &Insts) |
| static bool | canMoveInstsAcrossMemOp (MachineInstr &MemOp, ArrayRef< MachineInstr *> InstsToMove, const SIInstrInfo *TII, AliasAnalysis *AA) |
Variables | |
| DEBUG_TYPE | |
| SI Load Store | Optimizer |
| SI Load Store | false |
| #define DEBUG_TYPE "si-load-store-opt" |
Definition at line 74 of file SILoadStoreOptimizer.cpp.
|
static |
Definition at line 177 of file SILoadStoreOptimizer.cpp.
References llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::TargetRegisterInfo::isPhysicalRegister(), and llvm::MachineInstr::operands().
Referenced by addToListsIfDependent(), and canMoveInstsAcrossMemOp().
|
static |
Definition at line 205 of file SILoadStoreOptimizer.cpp.
References addDefsUsesToList(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineInstr::operands(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
Referenced by canMoveInstsAcrossMemOp().
|
static |
Definition at line 232 of file SILoadStoreOptimizer.cpp.
References llvm::abs(), llvm::ARM_AM::add, llvm::MachineInstrBuilder::add(), addDefsUsesToList(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), addToListsIfDependent(), assert(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::dbgs(), E, llvm::MachineBasicBlock::end(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::AMDGPU::getNamedOperandIdx(), llvm::MachineInstr::getOpcode(), llvm::MachineOperand::getReg(), getReg(), llvm::MachineFunction::getRegInfo(), llvm::AMDGPU::getSMRDEncodedOffset(), llvm::MachineOperand::getSubReg(), llvm::MachineFunction::getSubtarget(), llvm::MachineInstr::hasOrderedMemoryRef(), I, llvm::MachineOperand::isImm(), llvm::TargetRegisterInfo::isPhysicalRegister(), isReg(), llvm::isUInt< 8 >(), llvm::RegState::Kill, LLVM_DEBUG, llvm::Match, llvm::MachineInstr::mayLoadOrStore(), memAccessesCanBeReordered(), MI, Modified, moveInstsAfter(), MRI, llvm::MachineInstrBuilder::setMemRefs(), std::swap(), TII, and TRI.
| INITIALIZE_PASS_BEGIN | ( | SILoadStoreOptimizer | , |
| DEBUG_TYPE | , | ||
| "SI Load Store Optimizer" | , | ||
| false | , | ||
| false | |||
| ) |
|
static |
Definition at line 191 of file SILoadStoreOptimizer.cpp.
References llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint().
Referenced by canMoveInstsAcrossMemOp().
|
static |
Definition at line 167 of file SILoadStoreOptimizer.cpp.
References I, llvm::MachineBasicBlock::insert(), and MI.
Referenced by canMoveInstsAcrossMemOp().
| DEBUG_TYPE |
Definition at line 156 of file SILoadStoreOptimizer.cpp.
| SI Load Store false |
Definition at line 156 of file SILoadStoreOptimizer.cpp.
| SI Load Store Optimizer |
Definition at line 156 of file SILoadStoreOptimizer.cpp.
1.8.13