mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Run LiveDebugVariables in RegAllocBasic and RegAllocGreedy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128935 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "regalloc"
|
||||
#include "LiveDebugVariables.h"
|
||||
#include "LiveIntervalUnion.h"
|
||||
#include "LiveRangeEdit.h"
|
||||
#include "RegAllocBase.h"
|
||||
@@ -137,6 +138,7 @@ char RABasic::ID = 0;
|
||||
} // end anonymous namespace
|
||||
|
||||
RABasic::RABasic(): MachineFunctionPass(ID) {
|
||||
initializeLiveDebugVariablesPass(*PassRegistry::getPassRegistry());
|
||||
initializeLiveIntervalsPass(*PassRegistry::getPassRegistry());
|
||||
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
|
||||
initializeStrongPHIEliminationPass(*PassRegistry::getPassRegistry());
|
||||
@@ -155,6 +157,8 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<AliasAnalysis>();
|
||||
AU.addRequired<LiveIntervals>();
|
||||
AU.addPreserved<SlotIndexes>();
|
||||
AU.addRequired<LiveDebugVariables>();
|
||||
AU.addPreserved<LiveDebugVariables>();
|
||||
if (StrongPHIElim)
|
||||
AU.addRequiredID(StrongPHIEliminationID);
|
||||
AU.addRequiredTransitive<RegisterCoalescer>();
|
||||
@@ -543,6 +547,9 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) {
|
||||
// Run rewriter
|
||||
VRM->rewrite(LIS->getSlotIndexes());
|
||||
|
||||
// Write out new DBG_VALUE instructions.
|
||||
getAnalysis<LiveDebugVariables>().emitDebugValues(VRM);
|
||||
|
||||
// The pass output is in VirtRegMap. Release all the transient data.
|
||||
releaseMemory();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user