mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Remove the TargetMachine forwards for TargetSubtargetInfo based
information and update all callers. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214781 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "llvm/Target/TargetInstrInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "calcspillweights"
|
||||
@@ -95,7 +96,8 @@ static bool isRematerializable(const LiveInterval &LI,
|
||||
void
|
||||
VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) {
|
||||
MachineRegisterInfo &mri = MF.getRegInfo();
|
||||
const TargetRegisterInfo &tri = *MF.getTarget().getRegisterInfo();
|
||||
const TargetRegisterInfo &tri =
|
||||
*MF.getTarget().getSubtargetImpl()->getRegisterInfo();
|
||||
MachineBasicBlock *mbb = nullptr;
|
||||
MachineLoop *loop = nullptr;
|
||||
bool isExiting = false;
|
||||
@@ -186,7 +188,8 @@ VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) {
|
||||
// it is a preferred candidate for spilling.
|
||||
// FIXME: this gets much more complicated once we support non-trivial
|
||||
// re-materialization.
|
||||
if (isRematerializable(li, LIS, *MF.getTarget().getInstrInfo()))
|
||||
if (isRematerializable(li, LIS,
|
||||
*MF.getTarget().getSubtargetImpl()->getInstrInfo()))
|
||||
totalWeight *= 0.5F;
|
||||
|
||||
li.weight = normalize(totalWeight, li.getSize());
|
||||
|
||||
Reference in New Issue
Block a user