LLVM
8.0.1
|
#include "llvm/CodeGen/RegAllocPBQP.h"
#include "RegisterCoalescer.h"
#include "Spiller.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/CalcSpillWeights.h"
#include "llvm/CodeGen/LiveInterval.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/LiveRangeEdit.h"
#include "llvm/CodeGen/LiveStacks.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/PBQP/Graph.h"
#include "llvm/CodeGen/PBQP/Math.h"
#include "llvm/CodeGen/PBQP/Solution.h"
#include "llvm/CodeGen/PBQPRAConstraint.h"
#include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/CodeGen/SlotIndexes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Printable.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <system_error>
#include <tuple>
#include <utility>
#include <vector>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "regalloc" |
Functions | |
static bool | isACalleeSavedRegister (unsigned reg, const TargetRegisterInfo &TRI, const MachineFunction &MF) |
static float | normalizePBQPSpillWeight (float UseDefFreq, unsigned Size, unsigned NumInstr) |
static Printable | PrintNodeInfo (PBQP::RegAlloc::PBQPRAGraph::NodeId NId, const PBQP::RegAlloc::PBQPRAGraph &G) |
Create Printable object for node and register info. More... | |
Variables | |
static RegisterRegAlloc | RegisterPBQPRepAlloc ("pbqp", "PBQP register allocator", createDefaultPBQPRegisterAllocator) |
static cl::opt< bool > | PBQPCoalescing ("pbqp-coalescing", cl::desc("Attempt coalescing during PBQP register allocation."), cl::init(false), cl::Hidden) |
static cl::opt< bool > | PBQPDumpGraphs ("pbqp-dump-graphs", cl::desc("Dump graphs for each function/round in the compilation unit."), cl::init(false), cl::Hidden) |
#define DEBUG_TYPE "regalloc" |
Definition at line 93 of file RegAllocPBQP.cpp.
|
static |
Definition at line 569 of file RegAllocPBQP.cpp.
References llvm::PBQP::Graph< SolverT >::addNode(), assert(), llvm::VirtRegMap::assignVirt2Phys(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::LiveIntervals::checkRegMaskInterference(), llvm::VirtRegMap::clearAllVirt(), llvm::dbgs(), E, llvm::SmallVectorBase::empty(), llvm::BitVector::empty(), llvm::LiveRange::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::MachineRegisterInfo::getCalleeSavedRegs(), llvm::LiveIntervals::getInterval(), llvm::PBQP::Graph< SolverT >::getMetadata(), llvm::MCRegisterInfo::getName(), llvm::PBQP::Graph< SolverT >::getNodeMetadata(), llvm::TargetRegisterClass::getRawAllocationOrder(), llvm::MachineRegisterInfo::getRegClass(), llvm::VirtRegMap::getRegInfo(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::LiveIntervals::getRegUnit(), llvm::PBQP::Solution::getSelection(), llvm::MachineRegisterInfo::getSimpleHint(), llvm::PBQP::RegAlloc::getSpillOptionIdx(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineRegisterInfo::isReserved(), llvm::MCRegisterInfo::DiffListIterator::isValid(), LLVM_DEBUG, llvm::PBQP::Graph< SolverT >::nodeIds(), llvm::LiveRange::overlaps(), llvm::Spiller::postOptimization(), llvm::printReg(), llvm::LiveInterval::reg, llvm::TargetRegisterInfo::regsOverlap(), llvm::LiveIntervals::RemoveMachineInstrFromMaps(), llvm::ArrayRef< T >::size(), llvm::Spiller::spill(), and llvm::BitVector::test().
|
inlinestatic |
Definition at line 783 of file RegAllocPBQP.cpp.
References llvm::calculateSpillWeightsAndHints(), llvm::createInlineSpiller(), llvm::dbgs(), llvm::PBQP::RegAlloc::PBQPRAGraph::dump(), F(), llvm::sys::fs::F_Text, llvm::MachineRegisterInfo::freezeReservedRegs(), G, llvm::TargetSubtargetInfo::getCustomPBQPConstraints(), llvm::MachineFunction::getFunction(), llvm::Module::getModuleIdentifier(), llvm::Value::getName(), llvm::MachineFunction::getName(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), LLVM_DEBUG, llvm::normalizeSpillWeight(), PBQPCoalescing, PBQPDumpGraphs, llvm::PBQP::RegAlloc::solve(), and llvm::StringRef::str().
|
static |
Create Printable object for node and register info.
Definition at line 877 of file RegAllocPBQP.cpp.
References llvm::PBQP::Graph< SolverT >::getMetadata(), llvm::PBQP::Graph< SolverT >::getNodeMetadata(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetRegisterInfo::getRegClassName(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), and llvm::printReg().
Referenced by llvm::PBQP::RegAlloc::PBQPRAGraph::dump(), and llvm::PBQP::RegAlloc::PBQPRAGraph::printDot().
|
static |
Referenced by normalizePBQPSpillWeight().
|
static |
Referenced by normalizePBQPSpillWeight().
|
static |