LLVM  8.0.1
Macros | Functions | Variables
AArch64FalkorHWPFFix.cpp File Reference
#include "AArch64.h"
#include "AArch64InstrInfo.h"
#include "AArch64Subtarget.h"
#include "AArch64TargetMachine.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/CodeGen/LiveRegUnits.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/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/DebugCounter.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <iterator>
#include <utility>
Include dependency graph for AArch64FalkorHWPFFix.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "falkor-hwpf-fix"
 

Functions

 STATISTIC (NumStridedLoadsMarked, "Number of strided loads marked")
 
 STATISTIC (NumCollisionsAvoided, "Number of HW prefetch tag collisions avoided")
 
 STATISTIC (NumCollisionsNotAvoided, "Number of HW prefetch tag collisions not avoided due to lack of registers")
 
 DEBUG_COUNTER (FixCounter, "falkor-hwpf", "Controls which tag collisions are avoided")
 
 INITIALIZE_PASS_BEGIN (FalkorMarkStridedAccessesLegacy, DEBUG_TYPE, "Falkor HW Prefetch Fix", false, false) INITIALIZE_PASS_END(FalkorMarkStridedAccessesLegacy
 
 INITIALIZE_PASS_BEGIN (FalkorHWPFFix, "falkor-hwpf-fix-late", "Falkor HW Prefetch Fix Late Phase", false, false) INITIALIZE_PASS_END(FalkorHWPFFix
 
falkor hwpf fix Falkor HW Prefetch Fix Late static false unsigned makeTag (unsigned Dest, unsigned Base, unsigned Offset)
 
static Optional< LoadInfogetLoadInfo (const MachineInstr &MI)
 
static Optional< unsignedgetTag (const TargetRegisterInfo *TRI, const MachineInstr &MI, const LoadInfo &LI)
 

Variables

 DEBUG_TYPE
 
Falkor HW Prefetch Fix
 
Falkor HW Prefetch false
 
falkor hwpf fix late
 
falkor hwpf fix Falkor HW Prefetch Fix Late Phase
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "falkor-hwpf-fix"

Definition at line 57 of file AArch64FalkorHWPFFix.cpp.

Function Documentation

◆ DEBUG_COUNTER()

DEBUG_COUNTER ( FixCounter  ,
"falkor-hwpf"  ,
"Controls which tag collisions are avoided"   
)

◆ getLoadInfo()

static Optional<LoadInfo> getLoadInfo ( const MachineInstr MI)
static

◆ getTag()

static Optional<unsigned> getTag ( const TargetRegisterInfo TRI,
const MachineInstr MI,
const LoadInfo LI 
)
static

Definition at line 659 of file AArch64FalkorHWPFFix.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::LiveRegUnits::addLiveOuts(), llvm::MachineInstrBuilder::addReg(), llvm::LiveRegUnits::addReg(), assert(), llvm::LiveRegUnits::available(), llvm::BuildMI(), llvm::LiveRegUnits::clear(), llvm::dbgs(), llvm::df_begin(), llvm::df_end(), E, llvm::LoopBase< BlockT, LoopT >::empty(), llvm::AArch64Subtarget::Falkor, llvm::Fixed, llvm::LoopBase< BlockT, LoopT >::getBlocks(), llvm::MachineInstr::getDebugLoc(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MachineFunction::getFunction(), getLoadInfo(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineOperand::isReg(), llvm::MachineRegisterInfo::isReserved(), llvm::AArch64CC::LE, LLVM_DEBUG, makeTag(), MI, Modified, MRI, llvm::None, P, llvm::printReg(), llvm::MachineOperand::readsReg(), llvm::MachineOperand::setReg(), llvm::DebugCounter::shouldExecute(), Size, llvm::ARM_MB::ST, llvm::LiveRegUnits::stepBackward(), std::swap(), llvm::Tag, TII, and TRI.

Referenced by llvm::InterferenceCache::init(), llvm::PointerSumType< ExtraInfoInlineKinds, llvm::PointerSumTypeMember< EIIK_MMO, llvm::MachineMemOperand *>, llvm::PointerSumTypeMember< EIIK_PreInstrSymbol, llvm::MCSymbol *>, llvm::PointerSumTypeMember< EIIK_PostInstrSymbol, llvm::MCSymbol *>, llvm::PointerSumTypeMember< EIIK_OutOfLine, ExtraInfo *> >::is(), and llvm::DIE::print().

◆ INITIALIZE_PASS_BEGIN() [1/2]

INITIALIZE_PASS_BEGIN ( FalkorMarkStridedAccessesLegacy  ,
DEBUG_TYPE  ,
"Falkor HW Prefetch Fix ,
false  ,
false   
)

◆ INITIALIZE_PASS_BEGIN() [2/2]

INITIALIZE_PASS_BEGIN ( FalkorHWPFFix  ,
"falkor-hwpf-fix-late ,
"Falkor HW Prefetch Fix Late Phase ,
false  ,
false   
)

◆ makeTag()

falkor hwpf fix Falkor HW Prefetch Fix Late static false unsigned makeTag ( unsigned  Dest,
unsigned  Base,
unsigned  Offset 
)
static

Definition at line 233 of file AArch64FalkorHWPFFix.cpp.

Referenced by getTag().

◆ STATISTIC() [1/3]

STATISTIC ( NumStridedLoadsMarked  ,
"Number of strided loads marked"   
)

◆ STATISTIC() [2/3]

STATISTIC ( NumCollisionsAvoided  ,
"Number of HW prefetch tag collisions avoided"   
)

◆ STATISTIC() [3/3]

STATISTIC ( NumCollisionsNotAvoided  ,
"Number of HW prefetch tag collisions not avoided due to lack of registers"   
)

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 113 of file AArch64FalkorHWPFFix.cpp.

◆ false

falkor hwpf fix Falkor HW Prefetch Fix Late false

Definition at line 113 of file AArch64FalkorHWPFFix.cpp.

◆ Fix

Falkor HW Prefetch Fix

Definition at line 113 of file AArch64FalkorHWPFFix.cpp.

◆ late

falkor hwpf fix late

Definition at line 230 of file AArch64FalkorHWPFFix.cpp.

◆ Phase

falkor hwpf fix Falkor HW Prefetch Fix Late Phase