LLVM
8.0.1
|
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/MachineTraceMetrics.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSchedule.h"
#include "llvm/CodeGen/TargetSubtargetInfo.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.
Macros | |
#define | DEBUG_TYPE "machine-combiner" |
Enumerations | |
enum | CombinerObjective { CombinerObjective::MustReduceDepth, CombinerObjective::Default } |
The combiner's goal may differ based on which pattern it is attempting to optimize. More... | |
Functions | |
STATISTIC (NumInstCombined, "Number of machineinst combined") | |
INITIALIZE_PASS_BEGIN (MachineCombiner, DEBUG_TYPE, "Machine InstCombiner", false, false) INITIALIZE_PASS_END(MachineCombiner | |
static CombinerObjective | getCombinerObjective (MachineCombinerPattern P) |
static void | insertDeleteInstructions (MachineBasicBlock *MBB, MachineInstr &MI, SmallVector< MachineInstr *, 16 > InsInstrs, SmallVector< MachineInstr *, 16 > DelInstrs, MachineTraceMetrics::Ensemble *MinInstr, SparseSet< LiveRegUnit > &RegUnits, bool IncrementalUpdate) |
Inserts InsInstrs and deletes DelInstrs. More... | |
Variables | |
static cl::opt< unsigned > | inc_threshold ("machine-combiner-inc-threshold", cl::Hidden, cl::desc("Incremental depth computation will be used for basic " "blocks with more instructions."), cl::init(500)) |
static cl::opt< bool > | dump_intrs ("machine-combiner-dump-subst-intrs", cl::Hidden, cl::desc("Dump all substituted intrs"), cl::init(false)) |
static cl::opt< bool > | VerifyPatternOrder ("machine-combiner-verify-pattern-order", cl::Hidden, cl::desc("Verify that the generated patterns are ordered by increasing latency"), cl::init(false)) |
DEBUG_TYPE | |
Machine | InstCombiner |
Machine | false |
#define DEBUG_TYPE "machine-combiner" |
Definition at line 33 of file MachineCombiner.cpp.
|
strong |
The combiner's goal may differ based on which pattern it is attempting to optimize.
Enumerator | |
---|---|
MustReduceDepth | |
Default |
Definition at line 252 of file MachineCombiner.cpp.
|
static |
Definition at line 257 of file MachineCombiner.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::dbgs(), Default, llvm::MachineTraceMetrics::InstrCycles::Depth, llvm::SmallVectorBase::empty(), llvm::MachineTraceMetrics::Trace::getInstrCycles(), llvm::MachineTraceMetrics::Trace::getInstrSlack(), getLatency(), llvm::MachineTraceMetrics::Trace::getResourceLength(), I, LLVM_DEBUG, llvm::makeArrayRef(), MI, MustReduceDepth, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::REASSOC_AX_BY, llvm::REASSOC_AX_YB, llvm::REASSOC_XA_BY, llvm::REASSOC_XA_YB, llvm::PPCISD::SC, llvm::SmallVectorBase::size(), and TII.
INITIALIZE_PASS_BEGIN | ( | MachineCombiner | , |
DEBUG_TYPE | , | ||
"Machine InstCombiner" | , | ||
false | , | ||
false | |||
) |
|
static |
Inserts InsInstrs and deletes DelInstrs.
Incrementally updates instruction depths if requested.
MBB | basic block to insert instructions in |
MI | current machine instruction |
InsInstrs | new instructions to insert in MBB |
DelInstrs | instruction to delete from MBB |
MinInstr | is a pointer to the machine trace information |
RegUnits | set of live registers, needed to compute instruction depths |
IncrementalUpdate | if true, compute instruction depths incrementally, otherwise invalidate the trace |
Definition at line 431 of file MachineCombiner.cpp.
References assert(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::begin(), llvm::MachineBasicBlock::begin(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::dbgs(), llvm::MachineFunction::DeleteMachineInstr(), dump_intrs, llvm::SmallVectorBase::empty(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::end(), llvm::MachineBasicBlock::end(), llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::erase(), llvm::MachineFunction::getFunction(), llvm::MachineBasicBlock::getName(), llvm::MachineFunction::getName(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, inc_threshold, llvm::MachineBasicBlock::insert(), llvm::MachineTraceMetrics::Ensemble::invalidate(), LLVM_DEBUG, llvm::max(), MRI, llvm::Function::optForSize(), P, llvm::SparseSet< ValueT, KeyFunctorT, SparseT >::setUniverse(), llvm::SmallVectorBase::size(), llvm::MachineBasicBlock::size(), TII, TRI, llvm::MachineTraceMetrics::TS_MinInstrCount, llvm::MachineTraceMetrics::Ensemble::updateDepth(), and VerifyPatternOrder.
STATISTIC | ( | NumInstCombined | , |
"Number of machineinst combined" | |||
) |
DEBUG_TYPE |
Definition at line 125 of file MachineCombiner.cpp.
|
static |
Referenced by insertDeleteInstructions().
Machine false |
Definition at line 125 of file MachineCombiner.cpp.
|
static |
Referenced by insertDeleteInstructions().
Definition at line 125 of file MachineCombiner.cpp.