mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Move parts of lib/Target that use CodeGen into lib/CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -93,8 +93,10 @@ add_llvm_library(LLVMCodeGen
|
|||||||
StackSlotColoring.cpp
|
StackSlotColoring.cpp
|
||||||
StrongPHIElimination.cpp
|
StrongPHIElimination.cpp
|
||||||
TailDuplication.cpp
|
TailDuplication.cpp
|
||||||
|
TargetFrameLoweringImpl.cpp
|
||||||
TargetInstrInfoImpl.cpp
|
TargetInstrInfoImpl.cpp
|
||||||
TargetLoweringObjectFileImpl.cpp
|
TargetLoweringObjectFileImpl.cpp
|
||||||
|
TargetOptionsImpl.cpp
|
||||||
TwoAddressInstructionPass.cpp
|
TwoAddressInstructionPass.cpp
|
||||||
UnreachableBlockElim.cpp
|
UnreachableBlockElim.cpp
|
||||||
VirtRegMap.cpp
|
VirtRegMap.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===----- TargetFrameLowering.cpp - Implement target frame interface ------==//
|
//===----- TargetFrameLoweringImpl.cpp - Implement target frame interface --==//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
@ -24,6 +24,7 @@
|
|||||||
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
#include "llvm/CodeGen/MachineRegisterInfo.h"
|
||||||
#include "llvm/CodeGen/ScoreboardHazardRecognizer.h"
|
#include "llvm/CodeGen/ScoreboardHazardRecognizer.h"
|
||||||
#include "llvm/CodeGen/PseudoSourceValue.h"
|
#include "llvm/CodeGen/PseudoSourceValue.h"
|
||||||
|
#include "llvm/MC/MCInstrItineraries.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -510,3 +511,32 @@ CreateTargetPostRAHazardRecognizer(const InstrItineraryData *II,
|
|||||||
return (ScheduleHazardRecognizer *)
|
return (ScheduleHazardRecognizer *)
|
||||||
new ScoreboardHazardRecognizer(II, DAG, "post-RA-sched");
|
new ScoreboardHazardRecognizer(II, DAG, "post-RA-sched");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
TargetInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
|
||||||
|
SDNode *DefNode, unsigned DefIdx,
|
||||||
|
SDNode *UseNode, unsigned UseIdx) const {
|
||||||
|
if (!ItinData || ItinData->isEmpty())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (!DefNode->isMachineOpcode())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
unsigned DefClass = get(DefNode->getMachineOpcode()).getSchedClass();
|
||||||
|
if (!UseNode->isMachineOpcode())
|
||||||
|
return ItinData->getOperandCycle(DefClass, DefIdx);
|
||||||
|
unsigned UseClass = get(UseNode->getMachineOpcode()).getSchedClass();
|
||||||
|
return ItinData->getOperandLatency(DefClass, DefIdx, UseClass, UseIdx);
|
||||||
|
}
|
||||||
|
|
||||||
|
int TargetInstrInfo::getInstrLatency(const InstrItineraryData *ItinData,
|
||||||
|
SDNode *N) const {
|
||||||
|
if (!ItinData || ItinData->isEmpty())
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (!N->isMachineOpcode())
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return ItinData->getStageLatency(get(N->getMachineOpcode()).getSchedClass());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===-- TargetOptions.cpp - Options that apply to all targets --------------==//
|
//===-- TargetOptionsImpl.cpp - Options that apply to all targets ----------==//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
@ -3,13 +3,11 @@ add_llvm_library(LLVMTarget
|
|||||||
Target.cpp
|
Target.cpp
|
||||||
TargetData.cpp
|
TargetData.cpp
|
||||||
TargetELFWriterInfo.cpp
|
TargetELFWriterInfo.cpp
|
||||||
TargetFrameLowering.cpp
|
|
||||||
TargetInstrInfo.cpp
|
TargetInstrInfo.cpp
|
||||||
TargetIntrinsicInfo.cpp
|
TargetIntrinsicInfo.cpp
|
||||||
TargetLibraryInfo.cpp
|
TargetLibraryInfo.cpp
|
||||||
TargetLoweringObjectFile.cpp
|
TargetLoweringObjectFile.cpp
|
||||||
TargetMachine.cpp
|
TargetMachine.cpp
|
||||||
TargetOptions.cpp
|
|
||||||
TargetRegisterInfo.cpp
|
TargetRegisterInfo.cpp
|
||||||
TargetSubtargetInfo.cpp
|
TargetSubtargetInfo.cpp
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
#include "llvm/Target/TargetInstrInfo.h"
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/CodeGen/SelectionDAGNodes.h"
|
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
#include "llvm/MC/MCInstrItineraries.h"
|
#include "llvm/MC/MCInstrItineraries.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
@ -73,23 +72,6 @@ TargetInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
|
|||||||
return ItinData->getOperandLatency(DefClass, DefIdx, UseClass, UseIdx);
|
return ItinData->getOperandLatency(DefClass, DefIdx, UseClass, UseIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
TargetInstrInfo::getOperandLatency(const InstrItineraryData *ItinData,
|
|
||||||
SDNode *DefNode, unsigned DefIdx,
|
|
||||||
SDNode *UseNode, unsigned UseIdx) const {
|
|
||||||
if (!ItinData || ItinData->isEmpty())
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (!DefNode->isMachineOpcode())
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
unsigned DefClass = get(DefNode->getMachineOpcode()).getSchedClass();
|
|
||||||
if (!UseNode->isMachineOpcode())
|
|
||||||
return ItinData->getOperandCycle(DefClass, DefIdx);
|
|
||||||
unsigned UseClass = get(UseNode->getMachineOpcode()).getSchedClass();
|
|
||||||
return ItinData->getOperandLatency(DefClass, DefIdx, UseClass, UseIdx);
|
|
||||||
}
|
|
||||||
|
|
||||||
int TargetInstrInfo::getInstrLatency(const InstrItineraryData *ItinData,
|
int TargetInstrInfo::getInstrLatency(const InstrItineraryData *ItinData,
|
||||||
const MachineInstr *MI,
|
const MachineInstr *MI,
|
||||||
unsigned *PredCost) const {
|
unsigned *PredCost) const {
|
||||||
@ -99,17 +81,6 @@ int TargetInstrInfo::getInstrLatency(const InstrItineraryData *ItinData,
|
|||||||
return ItinData->getStageLatency(MI->getDesc().getSchedClass());
|
return ItinData->getStageLatency(MI->getDesc().getSchedClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
int TargetInstrInfo::getInstrLatency(const InstrItineraryData *ItinData,
|
|
||||||
SDNode *N) const {
|
|
||||||
if (!ItinData || ItinData->isEmpty())
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (!N->isMachineOpcode())
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return ItinData->getStageLatency(get(N->getMachineOpcode()).getSchedClass());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TargetInstrInfo::hasLowDefLatency(const InstrItineraryData *ItinData,
|
bool TargetInstrInfo::hasLowDefLatency(const InstrItineraryData *ItinData,
|
||||||
const MachineInstr *DefMI,
|
const MachineInstr *DefMI,
|
||||||
unsigned DefIdx) const {
|
unsigned DefIdx) const {
|
||||||
|
Reference in New Issue
Block a user