mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 20:34:38 +00:00
Refer to the RegisterCoalescer pass by ID.
A public interface is no longer needed since RegisterCoalescer is not an analysis any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3148a65490
commit
27215676c7
@ -24,7 +24,6 @@ namespace llvm {
|
||||
class MachineFunctionPass;
|
||||
class PassInfo;
|
||||
class TargetLowering;
|
||||
class RegisterCoalescer;
|
||||
class raw_ostream;
|
||||
|
||||
/// createUnreachableBlockEliminationPass - The LLVM code generator does not
|
||||
@ -81,6 +80,9 @@ namespace llvm {
|
||||
/// register allocators.
|
||||
extern char &TwoAddressInstructionPassID;
|
||||
|
||||
/// RegisteCoalescer pass - This pass merges live ranges to eliminate copies.
|
||||
extern char &RegisterCoalescerPassID;
|
||||
|
||||
/// SpillPlacement analysis. Suggest optimal placement of spill code between
|
||||
/// basic blocks.
|
||||
///
|
||||
@ -125,11 +127,6 @@ namespace llvm {
|
||||
///
|
||||
FunctionPass *createDefaultPBQPRegisterAllocator();
|
||||
|
||||
/// RegisterCoalescer Pass - Coalesce all copies possible. Can run
|
||||
/// independently of the register allocator.
|
||||
///
|
||||
RegisterCoalescer *createRegisterCoalescer();
|
||||
|
||||
/// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
|
||||
/// and eliminates abstract frame references.
|
||||
///
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "RenderMachineFunction.h"
|
||||
#include "Spiller.h"
|
||||
#include "VirtRegMap.h"
|
||||
#include "RegisterCoalescer.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
@ -160,7 +159,7 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<LiveDebugVariables>();
|
||||
if (StrongPHIElim)
|
||||
AU.addRequiredID(StrongPHIEliminationID);
|
||||
AU.addRequiredTransitive<RegisterCoalescer>();
|
||||
AU.addRequiredTransitiveID(RegisterCoalescerPassID);
|
||||
AU.addRequired<CalculateSpillWeights>();
|
||||
AU.addRequired<LiveStacks>();
|
||||
AU.addPreserved<LiveStacks>();
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "SpillPlacement.h"
|
||||
#include "SplitKit.h"
|
||||
#include "VirtRegMap.h"
|
||||
#include "RegisterCoalescer.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Function.h"
|
||||
@ -324,7 +323,7 @@ void RAGreedy::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<LiveDebugVariables>();
|
||||
if (StrongPHIElim)
|
||||
AU.addRequiredID(StrongPHIEliminationID);
|
||||
AU.addRequiredTransitive<RegisterCoalescer>();
|
||||
AU.addRequiredTransitiveID(RegisterCoalescerPassID);
|
||||
AU.addRequired<CalculateSpillWeights>();
|
||||
AU.addRequired<LiveStacks>();
|
||||
AU.addPreserved<LiveStacks>();
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "VirtRegRewriter.h"
|
||||
#include "RegisterClassInfo.h"
|
||||
#include "Spiller.h"
|
||||
#include "RegisterCoalescer.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/CodeGen/CalcSpillWeights.h"
|
||||
@ -209,7 +208,7 @@ namespace {
|
||||
AU.addRequiredID(StrongPHIEliminationID);
|
||||
// Make sure PassManager knows which analyses to make available
|
||||
// to coalescing and which analyses coalescing invalidates.
|
||||
AU.addRequiredTransitive<RegisterCoalescer>();
|
||||
AU.addRequiredTransitiveID(RegisterCoalescerPassID);
|
||||
AU.addRequired<CalculateSpillWeights>();
|
||||
AU.addRequiredID(LiveStacksID);
|
||||
AU.addPreservedID(LiveStacksID);
|
||||
|
@ -450,7 +450,7 @@ void RegAllocPBQP::getAnalysisUsage(AnalysisUsage &au) const {
|
||||
au.addPreserved<SlotIndexes>();
|
||||
au.addRequired<LiveIntervals>();
|
||||
//au.addRequiredID(SplitCriticalEdgesID);
|
||||
au.addRequired<RegisterCoalescer>();
|
||||
au.addRequiredID(RegisterCoalescerPassID);
|
||||
if (customPassID)
|
||||
au.addRequiredID(*customPassID);
|
||||
au.addRequired<CalculateSpillWeights>();
|
||||
|
@ -75,6 +75,8 @@ VerifyCoalescing("verify-coalescing",
|
||||
cl::desc("Verify machine instrs before and after register coalescing"),
|
||||
cl::Hidden);
|
||||
|
||||
char &llvm::RegisterCoalescerPassID = RegisterCoalescer::ID;
|
||||
|
||||
INITIALIZE_PASS_BEGIN(RegisterCoalescer, "simple-register-coalescing",
|
||||
"Simple Register Coalescing", false, false)
|
||||
INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
|
||||
@ -1841,7 +1843,3 @@ bool RegisterCoalescer::runOnMachineFunction(MachineFunction &fn) {
|
||||
void RegisterCoalescer::print(raw_ostream &O, const Module* m) const {
|
||||
li_->print(O, m);
|
||||
}
|
||||
|
||||
RegisterCoalescer *llvm::createRegisterCoalescer() {
|
||||
return new RegisterCoalescer();
|
||||
}
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
#include "Splitter.h"
|
||||
|
||||
#include "RegisterCoalescer.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/CodeGen/CalcSpillWeights.h"
|
||||
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
|
||||
@ -20,6 +19,7 @@
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/CodeGen/SlotIndexes.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
@ -262,7 +262,7 @@ namespace llvm {
|
||||
au.addPreserved<MachineDominatorTree>();
|
||||
au.addRequired<MachineLoopInfo>();
|
||||
au.addPreserved<MachineLoopInfo>();
|
||||
au.addPreserved<RegisterCoalescer>();
|
||||
au.addPreservedID(RegisterCoalescerPassID);
|
||||
au.addPreserved<CalculateSpillWeights>();
|
||||
au.addPreserved<LiveStacks>();
|
||||
au.addRequired<SlotIndexes>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user