mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Codegen pass definition cleanup. No functionality.
Moving toward a uniform style of pass definition to allow easier target configuration. Globally declare Pass ID. Globally declare pass initializer. Use INITIALIZE_PASS consistently. Add a call to the initializer from CodeGen.cpp. Remove redundant "createPass" functions and "getPassName" methods. While cleaning up declarations, cleaned up comments (sorry for large diff). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -86,10 +86,6 @@ namespace {
|
||||
MachineFunctionPass(ID), ColorWithRegs(false), NextColor(-1) {
|
||||
initializeStackSlotColoringPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
StackSlotColoring(bool RegColor) :
|
||||
MachineFunctionPass(ID), ColorWithRegs(RegColor), NextColor(-1) {
|
||||
initializeStackSlotColoringPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
@@ -105,9 +101,6 @@ namespace {
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
virtual const char* getPassName() const {
|
||||
return "Stack Slot Coloring";
|
||||
}
|
||||
|
||||
private:
|
||||
void InitializeSlots();
|
||||
@@ -122,6 +115,7 @@ namespace {
|
||||
} // end anonymous namespace
|
||||
|
||||
char StackSlotColoring::ID = 0;
|
||||
char &llvm::StackSlotColoringID = StackSlotColoring::ID;
|
||||
|
||||
INITIALIZE_PASS_BEGIN(StackSlotColoring, "stack-slot-coloring",
|
||||
"Stack Slot Coloring", false, false)
|
||||
@@ -132,10 +126,6 @@ INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
|
||||
INITIALIZE_PASS_END(StackSlotColoring, "stack-slot-coloring",
|
||||
"Stack Slot Coloring", false, false)
|
||||
|
||||
FunctionPass *llvm::createStackSlotColoringPass() {
|
||||
return new StackSlotColoring(/*RegColor=*/false);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// IntervalSorter - Comparison predicate that sort live intervals by
|
||||
// their weight.
|
||||
|
||||
Reference in New Issue
Block a user