[llvm-commits] [llvm] r89968 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/TailDuplication.cpp
Bob Wilson
bob.wilson at apple.com
Thu Nov 26 13:38:42 PST 2009
Author: bwilson
Date: Thu Nov 26 15:38:41 2009
New Revision: 89968
URL: http://llvm.org/viewvc/llvm-project?rev=89968&view=rev
Log:
Rename new TailDuplicationPass to avoid name conflict with the old one.
Modified:
llvm/trunk/include/llvm/CodeGen/Passes.h
llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
llvm/trunk/lib/CodeGen/TailDuplication.cpp
Modified: llvm/trunk/include/llvm/CodeGen/Passes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=89968&r1=89967&r2=89968&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/Passes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/Passes.h Thu Nov 26 15:38:41 2009
@@ -129,9 +129,9 @@
/// branches.
FunctionPass *createBranchFoldingPass(bool DefaultEnableTailMerge);
- /// TailDuplication Pass - Duplicate blocks with unconditional branches
+ /// TailDuplicate Pass - Duplicate blocks with unconditional branches
/// into tails of their predecessors.
- FunctionPass *createTailDuplicationPass();
+ FunctionPass *createTailDuplicatePass();
/// IfConverter Pass - This pass performs machine code if conversion.
FunctionPass *createIfConverterPass();
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=89968&r1=89967&r2=89968&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Thu Nov 26 15:38:41 2009
@@ -348,8 +348,8 @@
// Tail duplication.
if (OptLevel != CodeGenOpt::None && !DisableTailDuplicate) {
- PM.add(createTailDuplicationPass());
- printAndVerify(PM, "After TailDuplication");
+ PM.add(createTailDuplicatePass());
+ printAndVerify(PM, "After TailDuplicate");
}
PM.add(createGCMachineCodeAnalysisPass());
Modified: llvm/trunk/lib/CodeGen/TailDuplication.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplication.cpp?rev=89968&r1=89967&r2=89968&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TailDuplication.cpp (original)
+++ llvm/trunk/lib/CodeGen/TailDuplication.cpp Thu Nov 26 15:38:41 2009
@@ -37,14 +37,14 @@
cl::init(2), cl::Hidden);
namespace {
- /// TailDuplicationPass - Perform tail duplication.
- class TailDuplicationPass : public MachineFunctionPass {
+ /// TailDuplicatePass - Perform tail duplication.
+ class TailDuplicatePass : public MachineFunctionPass {
const TargetInstrInfo *TII;
MachineModuleInfo *MMI;
public:
static char ID;
- explicit TailDuplicationPass() : MachineFunctionPass(&ID) {}
+ explicit TailDuplicatePass() : MachineFunctionPass(&ID) {}
virtual bool runOnMachineFunction(MachineFunction &MF);
virtual const char *getPassName() const { return "Tail Duplication"; }
@@ -55,14 +55,14 @@
void RemoveDeadBlock(MachineBasicBlock *MBB);
};
- char TailDuplicationPass::ID = 0;
+ char TailDuplicatePass::ID = 0;
}
-FunctionPass *llvm::createTailDuplicationPass() {
- return new TailDuplicationPass();
+FunctionPass *llvm::createTailDuplicatePass() {
+ return new TailDuplicatePass();
}
-bool TailDuplicationPass::runOnMachineFunction(MachineFunction &MF) {
+bool TailDuplicatePass::runOnMachineFunction(MachineFunction &MF) {
TII = MF.getTarget().getInstrInfo();
MMI = getAnalysisIfAvailable<MachineModuleInfo>();
@@ -80,7 +80,7 @@
/// TailDuplicateBlocks - Look for small blocks that are unconditionally
/// branched to and do not fall through. Tail-duplicate their instructions
/// into their predecessors to eliminate (dynamic) branches.
-bool TailDuplicationPass::TailDuplicateBlocks(MachineFunction &MF) {
+bool TailDuplicatePass::TailDuplicateBlocks(MachineFunction &MF) {
bool MadeChange = false;
for (MachineFunction::iterator I = ++MF.begin(), E = MF.end(); I != E; ) {
@@ -105,7 +105,7 @@
/// TailDuplicate - If it is profitable, duplicate TailBB's contents in each
/// of its predecessors.
-bool TailDuplicationPass::TailDuplicate(MachineBasicBlock *TailBB,
+bool TailDuplicatePass::TailDuplicate(MachineBasicBlock *TailBB,
MachineFunction &MF) {
// Don't try to tail-duplicate single-block loops.
if (TailBB->isSuccessor(TailBB))
@@ -225,7 +225,7 @@
/// RemoveDeadBlock - Remove the specified dead machine basic block from the
/// function, updating the CFG.
-void TailDuplicationPass::RemoveDeadBlock(MachineBasicBlock *MBB) {
+void TailDuplicatePass::RemoveDeadBlock(MachineBasicBlock *MBB) {
assert(MBB->pred_empty() && "MBB must be dead!");
DEBUG(errs() << "\nRemoving MBB: " << *MBB);
More information about the llvm-commits
mailing list