|
LLVM
4.0.0
|
#include "llvm/ADT/BitVector.h"#include "llvm/ADT/PostOrderIterator.h"#include "llvm/ADT/SetVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"#include "llvm/CodeGen/MachineDominators.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineFrameInfo.h"#include "llvm/CodeGen/MachineLoopInfo.h"#include "llvm/CodeGen/MachinePostDominators.h"#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/RegisterClassInfo.h"#include "llvm/CodeGen/RegisterScavenging.h"#include "llvm/MC/MCAsmInfo.h"#include "llvm/Support/Debug.h"#include "llvm/Target/TargetFrameLowering.h"#include "llvm/Target/TargetInstrInfo.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Target/TargetSubtargetInfo.h"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") | |
| INITIALIZE_PASS_BEGIN (ShrinkWrap,"shrink-wrap","Shrink Wrap Pass", false, false) bool ShrinkWrap | |
| for (const MachineOperand &MO:MI.operands()) | |
| template<typename ListOfBBs , typename DominanceAnalysis > | |
| static MachineBasicBlock * | FindIDom (MachineBasicBlock &Block, ListOfBBs BBs, DominanceAnalysis &Dom) |
| Helper function to find the immediate (post) dominator. More... | |
| static bool | isProperBackedge (const MachineLoopInfo &MLI, const MachineBasicBlock *SrcBB, const MachineBasicBlock *DestBB) |
Check whether the edge (SrcBB, DestBB) is a backedge according to MLI. More... | |
| static bool | isIrreducibleCFG (const MachineFunction &MF, const MachineLoopInfo &MLI) |
Check if the CFG of MF is irreducible. More... | |
Variables | |
| static cl::opt< cl::boolOrDefault > | EnableShrinkWrapOpt ("enable-shrink-wrap", cl::Hidden, cl::desc("enable the shrink-wrapping pass")) |
| return | false |
| #define DEBUG_TYPE "shrink-wrap" |
Definition at line 78 of file ShrinkWrap.cpp.
|
static |
Helper function to find the immediate (post) dominator.
Definition at line 257 of file ShrinkWrap.cpp.
| for | ( | const MachineOperand &MO:MI. | operands() | ) |
Definition at line 228 of file ShrinkWrap.cpp.
References assert(), llvm::dbgs(), DEBUG, and llvm::TargetRegisterInfo::isPhysicalRegister().
Definition at line 213 of file ShrinkWrap.cpp.
References llvm::dbgs(), and DEBUG.
|
static |
Check if the CFG of MF is irreducible.
Definition at line 401 of file ShrinkWrap.cpp.
References llvm::MachineFunction::begin(), llvm::MachineBasicBlock::getNumber(), llvm::MachineFunction::getNumBlockIDs(), isProperBackedge(), llvm::BitVector::set(), and llvm::MachineBasicBlock::successors().
|
static |
Check whether the edge (SrcBB, DestBB) is a backedge according to MLI.
I.e., check if it exists a loop that contains SrcBB and where DestBB is the loop header.
Definition at line 389 of file ShrinkWrap.cpp.
References llvm::LoopBase< N, M >::getHeader(), llvm::MachineLoopInfo::getLoopFor(), and llvm::LoopBase< N, M >::getParentLoop().
Referenced by isIrreducibleCFG().
| STATISTIC | ( | NumFunc | , |
| "Number of functions" | |||
| ) |
| STATISTIC | ( | NumCandidates | , |
| "Number of shrink-wrapping candidates" | |||
| ) |
| STATISTIC | ( | NumCandidatesDropped | , |
| "Number of shrink-wrapping candidates dropped because of frequency" | |||
| ) |
|
static |
| return false |
Definition at line 252 of file ShrinkWrap.cpp.
1.8.6