LLVM
15.0.0git
|
#include "AArch64InstrInfo.h"
#include "AArch64MachineFunctionInfo.h"
#include "AArch64Subtarget.h"
#include "MCTargetDesc/AArch64AddressingModes.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.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/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/DebugCounter.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <functional>
#include <iterator>
#include <limits>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "aarch64-ldst-opt" |
#define | AARCH64_LOAD_STORE_OPT_NAME "AArch64 load / store optimization pass" |
Variables | |
static cl::opt< unsigned > | LdStLimit ("aarch64-load-store-scan-limit", cl::init(20), cl::Hidden) |
static cl::opt< unsigned > | UpdateLimit ("aarch64-update-scan-limit", cl::init(100), cl::Hidden) |
static cl::opt< bool > | EnableRenaming ("aarch64-load-store-renaming", cl::init(true), cl::Hidden) |
#define AARCH64_LOAD_STORE_OPT_NAME "AArch64 load / store optimization pass" |
Definition at line 82 of file AArch64LoadStoreOptimizer.cpp.
#define DEBUG_TYPE "aarch64-ldst-opt" |
Definition at line 56 of file AArch64LoadStoreOptimizer.cpp.
Definition at line 1226 of file AArch64LoadStoreOptimizer.cpp.
Referenced by buildFrameType().
|
static |
Definition at line 1302 of file AArch64LoadStoreOptimizer.cpp.
References assert(), getMatchingNonSExtOpcode(), getMatchingPairOpcode(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::hasOrderedMemoryRef(), llvm::AArch64InstrInfo::isPreLdSt(), isPreLdStPairCandidate(), MI, and TII.
|
static |
Definition at line 1356 of file AArch64LoadStoreOptimizer.cpp.
References llvm::LiveRegUnits::accumulate(), llvm::any_of(), llvm::dbgs(), forAllMIsUntilDef(), llvm::MachineInstr::FrameSetup, function, getLdStRegOp(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getReg(), llvm::MachineFunction::getRegInfo(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineOperand::isDebug(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isEarlyClobber(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRenamable(), llvm::MachineOperand::isTied(), LdStLimit, LLVM_DEBUG, llvm::MachineInstr::mayStore(), MI, llvm::MachineInstr::operands(), llvm::TargetRegisterInfo::regsOverlap(), llvm::MachineRegisterInfo::tracksLiveness(), and TRI.
DEBUG_COUNTER | ( | RegRenamingCounter | , |
DEBUG_TYPE "-reg-renaming" | , | ||
"Controls which pairs are considered for renaming" | |||
) |
|
static |
Definition at line 819 of file AArch64LoadStoreOptimizer.cpp.
References llvm::any_of(), I, llvm::MachineBasicBlock::instr_rend(), llvm::instructionsWithoutDebug(), MBB, MI, and TRI.
Referenced by canRenameUpToDef().
|
static |
Definition at line 639 of file AArch64LoadStoreOptimizer.cpp.
References isPairedLdSt(), llvm::AArch64InstrInfo::isPreLdSt(), and MI.
|
static |
Definition at line 644 of file AArch64LoadStoreOptimizer.cpp.
References isPairedLdSt(), llvm::AArch64InstrInfo::isPreLdSt(), and MI.
Referenced by isLdOffsetInRangeOfSt(), and isMergeableLdStUpdate().
|
static |
Definition at line 629 of file AArch64LoadStoreOptimizer.cpp.
References assert(), isPairedLdSt(), llvm::AArch64InstrInfo::isPreLdSt(), and MI.
Referenced by canRenameUpToDef(), and isPromotableZeroStoreInst().
|
static |
Definition at line 247 of file AArch64LoadStoreOptimizer.cpp.
References llvm::max().
Referenced by areCandidatesToMergeOrPair().
|
static |
Definition at line 317 of file AArch64LoadStoreOptimizer.cpp.
References llvm_unreachable.
Referenced by areCandidatesToMergeOrPair().
|
static |
Definition at line 298 of file AArch64LoadStoreOptimizer.cpp.
References llvm_unreachable.
|
static |
Definition at line 480 of file AArch64LoadStoreOptimizer.cpp.
References llvm_unreachable.
|
static |
Definition at line 407 of file AArch64LoadStoreOptimizer.cpp.
References llvm_unreachable.
|
static |
Definition at line 611 of file AArch64LoadStoreOptimizer.cpp.
References llvm::AArch64InstrInfo::getMemScale(), isPairedLdSt(), isTagStore(), and MI.
Definition at line 1209 of file AArch64LoadStoreOptimizer.cpp.
INITIALIZE_PASS | ( | AArch64LoadStoreOpt | , |
"aarch64-ldst-opt" | , | ||
AARCH64_LOAD_STORE_OPT_NAME | , | ||
false | , | ||
false | |||
) |
Definition at line 218 of file AArch64LoadStoreOptimizer.cpp.
|
static |
Definition at line 649 of file AArch64LoadStoreOptimizer.cpp.
References assert(), llvm::MachineOperand::getImm(), getLdStOffsetOp(), isMatchingStore(), and TII.
|
static |
Definition at line 377 of file AArch64LoadStoreOptimizer.cpp.
References llvm::Instruction::getOpcode(), and llvm_unreachable.
Referenced by isLdOffsetInRangeOfSt().
|
static |
Definition at line 690 of file AArch64LoadStoreOptimizer.cpp.
References getLdStOffsetOp(), isImm(), and MI.
|
static |
Definition at line 559 of file AArch64LoadStoreOptimizer.cpp.
References MI.
Referenced by getLdStBaseOp(), getLdStOffsetOp(), getLdStRegOp(), and getPrePostIndexedMemOpInfo().
|
static |
Definition at line 579 of file AArch64LoadStoreOptimizer.cpp.
References llvm::MachineInstr::getOpcode(), and MI.
Referenced by areCandidatesToMergeOrPair().
|
static |
Definition at line 672 of file AArch64LoadStoreOptimizer.cpp.
References MI.
|
static |
Definition at line 665 of file AArch64LoadStoreOptimizer.cpp.
References getLdStRegOp(), llvm::MachineOperand::getReg(), and MI.
|
static |
Definition at line 235 of file AArch64LoadStoreOptimizer.cpp.
References MI.
Referenced by getPrePostIndexedMemOpInfo().
|
static |
Definition at line 1230 of file AArch64LoadStoreOptimizer.cpp.
References llvm::MachineInstr::mayAlias().
Referenced by llvm::HexagonInstrInfo::expandPostRAPseudo().
|
static |
Definition at line 1773 of file AArch64LoadStoreOptimizer.cpp.
|
static |
Definition at line 1920 of file AArch64LoadStoreOptimizer.cpp.
References llvm::MachineFunction::getFunction(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFunction::getTarget(), llvm::Function::needsUnwindTableEntry(), and llvm::MCAsmInfo::usesWindowsCFI().
STATISTIC | ( | NumPairCreated | , |
"Number of load/store pair instructions generated" | |||
) |
|
static |
Definition at line 1485 of file AArch64LoadStoreOptimizer.cpp.
References llvm::LiveRegUnits::addReg(), llvm::all_of(), llvm::any_of(), llvm::LiveRegUnits::available(), llvm::dbgs(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::TargetRegisterInfo::getRegClassName(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::isReserved(), LLVM_DEBUG, llvm::None, llvm::printReg(), llvm::MCRegisterInfo::sub_and_superregs_inclusive(), and TRI.
|
static |
Definition at line 841 of file AArch64LoadStoreOptimizer.cpp.
References llvm::LiveRegUnits::addReg(), MI, llvm::phys_regs_and_masks(), and llvm::LiveRegUnits::removeReg().
Referenced by canRenameUpToDef().