Skip to content

Commit

Permalink
Revert "Add MIR-level outlining pass"
Browse files Browse the repository at this point in the history
Revert Machine Outliner for now, as it breaks the asan bot.

This reverts commit r296418.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296426 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MatzeB committed Feb 28, 2017
1 parent bd74a4c commit 73ddbb7
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 1,755 deletions.
4 changes: 0 additions & 4 deletions include/llvm/CodeGen/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,6 @@ namespace llvm {

/// This pass frees the memory occupied by the MachineFunction.
FunctionPass *createFreeMachineFunctionPass();

/// This pass performs outlining on machine instructions directly before
/// printing assembly.
ModulePass *createMachineOutlinerPass();
} // End llvm namespace

/// Target machine pass initializer for passes with dependencies. Use with
Expand Down
1 change: 0 additions & 1 deletion include/llvm/InitializePasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ void initializeMachineLICMPass(PassRegistry&);
void initializeMachineLoopInfoPass(PassRegistry&);
void initializeMachineModuleInfoPass(PassRegistry&);
void initializeMachineOptimizationRemarkEmitterPassPass(PassRegistry&);
void initializeMachineOutlinerPass(PassRegistry&);
void initializeMachinePipelinerPass(PassRegistry&);
void initializeMachinePostDominatorTreePass(PassRegistry&);
void initializeMachineRegionInfoPassPass(PassRegistry&);
Expand Down
57 changes: 0 additions & 57 deletions include/llvm/Target/TargetInstrInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1508,63 +1508,6 @@ class TargetInstrInfo : public MCInstrInfo {
return false;
}

/// \brief Return how many instructions would be saved by outlining a
/// sequence containing \p SequenceSize instructions that appears
/// \p Occurrences times in a module.
virtual unsigned getOutliningBenefit(size_t SequenceSize, size_t Occurrences)
const {
llvm_unreachable(
"Target didn't implement TargetInstrInfo::getOutliningBenefit!");
}

/// Represents how an instruction should be mapped by the outliner.
/// \p Legal instructions are those which are safe to outline.
/// \p Illegal instructions are those which cannot be outlined.
/// \p Invisible instructions are instructions which can be outlined, but
/// shouldn't actually impact the outlining result.
enum MachineOutlinerInstrType {Legal, Illegal, Invisible};

/// Return true if the instruction is legal to outline.
virtual MachineOutlinerInstrType getOutliningType(MachineInstr &MI) const {
llvm_unreachable(
"Target didn't implement TargetInstrInfo::getOutliningType!");
}

/// Insert a custom epilogue for outlined functions.
/// This may be empty, in which case no epilogue or return statement will be
/// emitted.
virtual void insertOutlinerEpilogue(MachineBasicBlock &MBB,
MachineFunction &MF) const {
llvm_unreachable(
"Target didn't implement TargetInstrInfo::insertOutlinerEpilogue!");
}

/// Insert a call to an outlined function into the program.
/// Returns an iterator to the spot where we inserted the call. This must be
/// implemented by the target.
virtual MachineBasicBlock::iterator
insertOutlinedCall(Module &M, MachineBasicBlock &MBB,
MachineBasicBlock::iterator &It, MachineFunction &MF)
const {
llvm_unreachable(
"Target didn't implement TargetInstrInfo::insertOutlinedCall!");
}

/// Insert a custom prologue for outlined functions.
/// This may be empty, in which case no prologue will be emitted.
virtual void insertOutlinerPrologue(MachineBasicBlock &MBB,
MachineFunction &MF) const {
llvm_unreachable(
"Target didn't implement TargetInstrInfo::insertOutlinerPrologue!");
}

/// Return true if the function can safely be outlined from.
/// By default, this means that the function has no red zone.
virtual bool isFunctionSafeToOutlineFrom(MachineFunction &F) const {
llvm_unreachable("Target didn't implement "
"TargetInstrInfo::isFunctionSafeToOutlineFrom!");
}

private:
unsigned CallFrameSetupOpcode, CallFrameDestroyOpcode;
unsigned CatchRetOpcode;
Expand Down
1 change: 0 additions & 1 deletion lib/CodeGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ add_llvm_library(LLVMCodeGen
MachineModuleInfo.cpp
MachineModuleInfoImpls.cpp
MachineOptimizationRemarkEmitter.cpp
MachineOutliner.cpp
MachinePassRegistry.cpp
MachinePipeliner.cpp
MachinePostDominators.cpp
Expand Down
1 change: 0 additions & 1 deletion lib/CodeGen/CodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ void llvm::initializeCodeGen(PassRegistry &Registry) {
initializeMachineLoopInfoPass(Registry);
initializeMachineModuleInfoPass(Registry);
initializeMachineOptimizationRemarkEmitterPassPass(Registry);
initializeMachineOutlinerPass(Registry);
initializeMachinePipelinerPass(Registry);
initializeMachinePostDominatorTreePass(Registry);
initializeMachineRegionInfoPassPass(Registry);
Expand Down
Loading

0 comments on commit 73ddbb7

Please sign in to comment.