LLVM API Documentation
#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/MachineDominators.h"#include "llvm/CodeGen/MachineLoopInfo.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/Target/TargetRegisterInfo.h"#include "llvm/Target/TargetInstrInfo.h"#include "llvm/Target/TargetMachine.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/Statistic.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "machine-licm" |
Functions | |
| STATISTIC (NumHoisted,"Number of machine instructions hoisted out of loops") | |
| STATISTIC (NumCSEed,"Number of hoisted machine instructions CSEed") | |
| FunctionPass * | llvm::createMachineLICMPass () |
| static bool | LoopIsOuterMostWithPreheader (MachineLoop *CurLoop) |
| static bool | HasPHIUses (unsigned Reg, MachineRegisterInfo *RegInfo) |
| HasPHIUses - Return true if the specified register has any PHI use. | |
| static const MachineInstr * | LookForDuplicate (const MachineInstr *MI, std::vector< const MachineInstr * > &PrevMIs, MachineRegisterInfo *RegInfo) |
Variables | |
| static RegisterPass< MachineLICM > | X ("machinelicm","Machine Loop Invariant Code Motion") |
| #define DEBUG_TYPE "machine-licm" |
Definition at line 23 of file MachineLICM.cpp.
| static bool HasPHIUses | ( | unsigned | Reg, | |
| MachineRegisterInfo * | RegInfo | |||
| ) | [static] |
HasPHIUses - Return true if the specified register has any PHI use.
Definition at line 278 of file MachineLICM.cpp.
References llvm::MachineInstr::getOpcode(), PHI, llvm::MachineRegisterInfo::use_begin(), and llvm::MachineRegisterInfo::use_end().
| static const MachineInstr* LookForDuplicate | ( | const MachineInstr * | MI, | |
| std::vector< const MachineInstr * > & | PrevMIs, | |||
| MachineRegisterInfo * | RegInfo | |||
| ) | [static] |
Definition at line 317 of file MachineLICM.cpp.
References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isIdenticalTo(), and llvm::MachineOperand::isReg().
| static bool LoopIsOuterMostWithPreheader | ( | MachineLoop * | CurLoop | ) | [static] |
LoopIsOuterMostWithPreheader - Test if the given loop is the outer-most loop that has a preheader.
Definition at line 117 of file MachineLICM.cpp.
References llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), and L.
| STATISTIC | ( | NumCSEed | , | |
| "Number of hoisted machine instructions CSEed" | ||||
| ) |
| STATISTIC | ( | NumHoisted | , | |
| "Number of machine instructions hoisted out of loops" | ||||
| ) |
Definition at line 53 of file MachineLICM.cpp.
Referenced by CleanupConstantGlobalUsers(), FoldValueComparisonIntoPredecessors(), llvm::BasicInlinerImpl::inlineFunctions(), IterativeSimplifyCFG(), MarkAliveBlocks(), NormalizeMask(), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), llvm::Inliner::removeDeadFunctions(), llvm::LLVMContext::RemoveDeadMetadata(), RemoveUnreachableBlocksFromFn(), llvm::FunctionPass::run(), llvm::DAGTypeLegalizer::run(), llvm::BasicBlockPass::runOnFunction(), llvm::LPPassManager::runOnFunction(), llvm::PHIElimination::runOnMachineFunction(), llvm::FunctionPass::runOnModule(), llvm::MSILModule::runOnModule(), llvm::Inliner::runOnSCC(), llvm::set_union(), and llvm::SimplifyCFG().
| DenseMap<std::pair<unsigned, unsigned>, std::vector<const MachineInstr*> > CSEMap |
Definition at line 59 of file MachineLICM.cpp.
Definition at line 54 of file MachineLICM.cpp.
Referenced by llvm::AsmPrinter::EmitComments(), and llvm::LoopBase< llvm::MachineBasicBlock, llvm::MachineLoop >::getLoopDepth().
Definition at line 55 of file MachineLICM.cpp.
Definition at line 49 of file MachineLICM.cpp.
char ID [static] |
Definition at line 61 of file MachineLICM.cpp.
Definition at line 48 of file MachineLICM.cpp.
Definition at line 50 of file MachineLICM.cpp.
| const TargetInstrInfo* TII |
Definition at line 45 of file MachineLICM.cpp.
| const TargetMachine* TM |
Definition at line 44 of file MachineLICM.cpp.
RegisterPass<MachineLICM> X("machinelicm","Machine Loop Invariant Code Motion") [static] |