mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Implement a bunch more TargetSelectionDAGInfo infrastructure.
Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and EmitTargetCodeForMemmove out of TargetLowering and into SelectionDAGInfo to exercise this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -12,10 +12,11 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "alpha-selectiondag-info"
|
||||
#include "AlphaSelectionDAGInfo.h"
|
||||
#include "AlphaTargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
AlphaSelectionDAGInfo::AlphaSelectionDAGInfo() {
|
||||
AlphaSelectionDAGInfo::AlphaSelectionDAGInfo(const AlphaTargetMachine &TM)
|
||||
: TargetSelectionDAGInfo(TM) {
|
||||
}
|
||||
|
||||
AlphaSelectionDAGInfo::~AlphaSelectionDAGInfo() {
|
||||
|
@@ -18,9 +18,11 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class AlphaTargetMachine;
|
||||
|
||||
class AlphaSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
AlphaSelectionDAGInfo();
|
||||
explicit AlphaSelectionDAGInfo(const AlphaTargetMachine &TM);
|
||||
~AlphaSelectionDAGInfo();
|
||||
};
|
||||
|
||||
|
@@ -32,7 +32,8 @@ AlphaTargetMachine::AlphaTargetMachine(const Target &T, const std::string &TT,
|
||||
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
||||
JITInfo(*this),
|
||||
Subtarget(TT, FS),
|
||||
TLInfo(*this) {
|
||||
TLInfo(*this),
|
||||
TSInfo(*this) {
|
||||
setRelocationModel(Reloc::PIC_);
|
||||
}
|
||||
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include "AlphaInstrInfo.h"
|
||||
#include "AlphaJITInfo.h"
|
||||
#include "AlphaISelLowering.h"
|
||||
#include "AlphaSelectionDAGInfo.h"
|
||||
#include "AlphaSubtarget.h"
|
||||
|
||||
namespace llvm {
|
||||
@@ -33,6 +34,7 @@ class AlphaTargetMachine : public LLVMTargetMachine {
|
||||
AlphaJITInfo JITInfo;
|
||||
AlphaSubtarget Subtarget;
|
||||
AlphaTargetLowering TLInfo;
|
||||
AlphaSelectionDAGInfo TSInfo;
|
||||
|
||||
public:
|
||||
AlphaTargetMachine(const Target &T, const std::string &TT,
|
||||
@@ -47,6 +49,9 @@ public:
|
||||
virtual const AlphaTargetLowering* getTargetLowering() const {
|
||||
return &TLInfo;
|
||||
}
|
||||
virtual const AlphaSelectionDAGInfo* getSelectionDAGInfo() const {
|
||||
return &TSInfo;
|
||||
}
|
||||
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
||||
virtual AlphaJITInfo* getJITInfo() {
|
||||
return &JITInfo;
|
||||
|
Reference in New Issue
Block a user