LLVM  8.0.1
Macros | Functions | Variables
ShrinkWrap.cpp File Reference
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/CodeGen/MachinePostDominators.h"
#include "llvm/CodeGen/RegisterClassInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Function.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
#include <cstdint>
#include <memory>
Include dependency graph for ShrinkWrap.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "shrink-wrap"
 

Functions

 STATISTIC (NumFunc, "Number of functions")
 
 STATISTIC (NumCandidates, "Number of shrink-wrapping candidates")
 
 STATISTIC (NumCandidatesDropped, "Number of shrink-wrapping candidates dropped because of frequency")
 
template<typename ListOfBBs , typename DominanceAnalysis >
static MachineBasicBlockFindIDom (MachineBasicBlock &Block, ListOfBBs BBs, DominanceAnalysis &Dom)
 Helper function to find the immediate (post) dominator. More...
 
static bool giveUpWithRemarks (MachineOptimizationRemarkEmitter *ORE, StringRef RemarkName, StringRef RemarkMessage, const DiagnosticLocation &Loc, const MachineBasicBlock *MBB)
 

Variables

static cl::opt< cl::boolOrDefaultEnableShrinkWrapOpt ("enable-shrink-wrap", cl::Hidden, cl::desc("enable the shrink-wrapping pass"))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "shrink-wrap"

Definition at line 90 of file ShrinkWrap.cpp.

Referenced by giveUpWithRemarks().

Function Documentation

◆ FindIDom()

template<typename ListOfBBs , typename DominanceAnalysis >
static MachineBasicBlock* FindIDom ( MachineBasicBlock Block,
ListOfBBs  BBs,
DominanceAnalysis &  Dom 
)
static

◆ giveUpWithRemarks()

static bool giveUpWithRemarks ( MachineOptimizationRemarkEmitter ORE,
StringRef  RemarkName,
StringRef  RemarkMessage,
const DiagnosticLocation Loc,
const MachineBasicBlock MBB 
)
static

◆ STATISTIC() [1/3]

STATISTIC ( NumFunc  ,
"Number of functions  
)

◆ STATISTIC() [2/3]

STATISTIC ( NumCandidates  ,
"Number of shrink-wrapping candidates"   
)

◆ STATISTIC() [3/3]

STATISTIC ( NumCandidatesDropped  ,
"Number of shrink-wrapping candidates dropped because of frequency"   
)

Variable Documentation

◆ EnableShrinkWrapOpt

cl::opt<cl::boolOrDefault> EnableShrinkWrapOpt("enable-shrink-wrap", cl::Hidden, cl::desc("enable the shrink-wrapping pass"))
static

Referenced by giveUpWithRemarks().