LLVM API Documentation

MachineLICM.cpp File Reference

#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"

Include dependency graph for MachineLICM.cpp:

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 Documentation

#define DEBUG_TYPE   "machine-licm"

Definition at line 23 of file MachineLICM.cpp.


Function Documentation

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]

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"   
)


Variable Documentation

DenseMap<std::pair<unsigned, unsigned>, std::vector<const MachineInstr*> > CSEMap

Definition at line 59 of file MachineLICM.cpp.

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.

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]