mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Remove getDataLayout() from TargetSelectionDAGInfo (had no users)
Summary: Remove empty subclass in the process. This change is part of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren, ted Differential Revision: http://reviews.llvm.org/D11045 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241780 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
691b2ff11e
commit
dc4dccabf3
@ -20,8 +20,6 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class DataLayout;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// TargetSelectionDAGInfo - Targets can subclass this to parameterize the
|
||||
/// SelectionDAG lowering and instruction selection process.
|
||||
@ -30,13 +28,8 @@ class TargetSelectionDAGInfo {
|
||||
TargetSelectionDAGInfo(const TargetSelectionDAGInfo &) = delete;
|
||||
void operator=(const TargetSelectionDAGInfo &) = delete;
|
||||
|
||||
const DataLayout *DL;
|
||||
|
||||
protected:
|
||||
const DataLayout *getDataLayout() const { return DL; }
|
||||
|
||||
public:
|
||||
explicit TargetSelectionDAGInfo(const DataLayout *DL);
|
||||
explicit TargetSelectionDAGInfo() = default;
|
||||
virtual ~TargetSelectionDAGInfo();
|
||||
|
||||
/// EmitTargetCodeForMemcpy - Emit target-specific code that performs a
|
||||
|
@ -15,9 +15,5 @@
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
TargetSelectionDAGInfo::TargetSelectionDAGInfo(const DataLayout *DL)
|
||||
: DL(DL) {
|
||||
}
|
||||
|
||||
TargetSelectionDAGInfo::~TargetSelectionDAGInfo() {
|
||||
}
|
||||
|
@ -16,11 +16,6 @@ using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "aarch64-selectiondag-info"
|
||||
|
||||
AArch64SelectionDAGInfo::AArch64SelectionDAGInfo(const DataLayout *DL)
|
||||
: TargetSelectionDAGInfo(DL) {}
|
||||
|
||||
AArch64SelectionDAGInfo::~AArch64SelectionDAGInfo() {}
|
||||
|
||||
SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
|
||||
SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src,
|
||||
SDValue Size, unsigned Align, bool isVolatile,
|
||||
|
@ -20,8 +20,6 @@ namespace llvm {
|
||||
|
||||
class AArch64SelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit AArch64SelectionDAGInfo(const DataLayout *DL);
|
||||
~AArch64SelectionDAGInfo();
|
||||
|
||||
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc dl, SDValue Chain,
|
||||
SDValue Dst, SDValue Src, SDValue Size,
|
||||
|
@ -49,8 +49,8 @@ AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU,
|
||||
HasV8_1aOps(false), HasFPARMv8(false), HasNEON(false), HasCrypto(false),
|
||||
HasCRC(false), HasZeroCycleRegMove(false), HasZeroCycleZeroing(false),
|
||||
IsLittle(LittleEndian), CPUString(CPU), TargetTriple(TT), FrameLowering(),
|
||||
InstrInfo(initializeSubtargetDependencies(FS)),
|
||||
TSInfo(TM.getDataLayout()), TLInfo(TM, *this) {}
|
||||
InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(),
|
||||
TLInfo(TM, *this) {}
|
||||
|
||||
/// ClassifyGlobalReference - Find the target operand flags that describe
|
||||
/// how a global value should be referenced for the current subtarget.
|
||||
|
@ -18,12 +18,6 @@ using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "arm-selectiondag-info"
|
||||
|
||||
ARMSelectionDAGInfo::ARMSelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
ARMSelectionDAGInfo::~ARMSelectionDAGInfo() {
|
||||
}
|
||||
|
||||
// Emit, if possible, a specialized version of the given Libcall. Typically this
|
||||
// means selecting the appropriately aligned version, but we also convert memset
|
||||
// of 0 into memclr.
|
||||
|
@ -37,8 +37,6 @@ namespace ARM_AM {
|
||||
|
||||
class ARMSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit ARMSelectionDAGInfo(const DataLayout &DL);
|
||||
~ARMSelectionDAGInfo();
|
||||
|
||||
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl,
|
||||
SDValue Chain,
|
||||
|
@ -112,7 +112,6 @@ ARMSubtarget::ARMSubtarget(const Triple &TT, const std::string &CPU,
|
||||
: ARMGenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others),
|
||||
ARMProcClass(None), stackAlignment(4), CPUString(CPU), IsLittle(IsLittle),
|
||||
TargetTriple(TT), Options(TM.Options), TM(TM),
|
||||
TSInfo(*TM.getDataLayout()),
|
||||
FrameLowering(initializeFrameLowering(CPU, FS)),
|
||||
// At this point initializeSubtargetDependencies has been called so
|
||||
// we can query directly.
|
||||
|
@ -28,4 +28,4 @@ void BPFSubtarget::anchor() {}
|
||||
BPFSubtarget::BPFSubtarget(const Triple &TT, const std::string &CPU,
|
||||
const std::string &FS, const TargetMachine &TM)
|
||||
: BPFGenSubtargetInfo(TT, CPU, FS), InstrInfo(), FrameLowering(*this),
|
||||
TLInfo(TM, *this), TSInfo(TM.getDataLayout()) {}
|
||||
TLInfo(TM, *this) {}
|
||||
|
@ -18,12 +18,6 @@ using namespace llvm;
|
||||
|
||||
bool llvm::flag_aligned_memcpy;
|
||||
|
||||
HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
HexagonSelectionDAGInfo::~HexagonSelectionDAGInfo() {
|
||||
}
|
||||
|
||||
SDValue
|
||||
HexagonSelectionDAGInfo::
|
||||
EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl, SDValue Chain,
|
||||
|
@ -20,8 +20,6 @@ namespace llvm {
|
||||
|
||||
class HexagonSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit HexagonSelectionDAGInfo(const DataLayout &DL);
|
||||
~HexagonSelectionDAGInfo();
|
||||
|
||||
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl,
|
||||
SDValue Chain,
|
||||
|
@ -74,7 +74,7 @@ HexagonSubtarget::HexagonSubtarget(const Triple &TT, StringRef CPU,
|
||||
StringRef FS, const TargetMachine &TM)
|
||||
: HexagonGenSubtargetInfo(TT, CPU, FS), CPUString(CPU),
|
||||
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
|
||||
TSInfo(*TM.getDataLayout()), FrameLowering() {
|
||||
FrameLowering() {
|
||||
|
||||
// Initialize scheduling itinerary for the specified CPU.
|
||||
InstrItins = getInstrItineraryForCPU(CPUString);
|
||||
|
@ -18,7 +18,6 @@ add_llvm_target(MSP430CodeGen
|
||||
MSP430RegisterInfo.cpp
|
||||
MSP430Subtarget.cpp
|
||||
MSP430TargetMachine.cpp
|
||||
MSP430SelectionDAGInfo.cpp
|
||||
MSP430AsmPrinter.cpp
|
||||
MSP430MCInstLower.cpp
|
||||
)
|
||||
|
@ -1,23 +0,0 @@
|
||||
//===-- MSP430SelectionDAGInfo.cpp - MSP430 SelectionDAG Info -------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the MSP430SelectionDAGInfo class.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MSP430TargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "msp430-selectiondag-info"
|
||||
|
||||
MSP430SelectionDAGInfo::MSP430SelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
MSP430SelectionDAGInfo::~MSP430SelectionDAGInfo() {
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
//===-- MSP430SelectionDAGInfo.h - MSP430 SelectionDAG Info -----*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the MSP430 subclass for TargetSelectionDAGInfo.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_TARGET_MSP430_MSP430SELECTIONDAGINFO_H
|
||||
#define LLVM_LIB_TARGET_MSP430_MSP430SELECTIONDAGINFO_H
|
||||
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MSP430TargetMachine;
|
||||
|
||||
class MSP430SelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit MSP430SelectionDAGInfo(const DataLayout &DL);
|
||||
~MSP430SelectionDAGInfo();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -34,5 +34,4 @@ MSP430Subtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS) {
|
||||
MSP430Subtarget::MSP430Subtarget(const Triple &TT, const std::string &CPU,
|
||||
const std::string &FS, const TargetMachine &TM)
|
||||
: MSP430GenSubtargetInfo(TT, CPU, FS), FrameLowering(),
|
||||
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
|
||||
TSInfo(*TM.getDataLayout()) {}
|
||||
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this) {}
|
||||
|
@ -18,8 +18,8 @@
|
||||
#include "MSP430ISelLowering.h"
|
||||
#include "MSP430InstrInfo.h"
|
||||
#include "MSP430RegisterInfo.h"
|
||||
#include "MSP430SelectionDAGInfo.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include <string>
|
||||
|
||||
@ -35,7 +35,7 @@ class MSP430Subtarget : public MSP430GenSubtargetInfo {
|
||||
MSP430FrameLowering FrameLowering;
|
||||
MSP430InstrInfo InstrInfo;
|
||||
MSP430TargetLowering TLInfo;
|
||||
MSP430SelectionDAGInfo TSInfo;
|
||||
TargetSelectionDAGInfo TSInfo;
|
||||
|
||||
public:
|
||||
/// This constructor initializes the data members to match that
|
||||
@ -60,7 +60,7 @@ public:
|
||||
const MSP430TargetLowering *getTargetLowering() const override {
|
||||
return &TLInfo;
|
||||
}
|
||||
const MSP430SelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
return &TSInfo;
|
||||
}
|
||||
};
|
||||
|
@ -46,7 +46,6 @@ add_llvm_target(MipsCodeGen
|
||||
MipsSubtarget.cpp
|
||||
MipsTargetMachine.cpp
|
||||
MipsTargetObjectFile.cpp
|
||||
MipsSelectionDAGInfo.cpp
|
||||
)
|
||||
|
||||
add_subdirectory(InstPrinter)
|
||||
|
@ -1,23 +0,0 @@
|
||||
//===-- MipsSelectionDAGInfo.cpp - Mips SelectionDAG Info -----------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the MipsSelectionDAGInfo class.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MipsTargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "mips-selectiondag-info"
|
||||
|
||||
MipsSelectionDAGInfo::MipsSelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
MipsSelectionDAGInfo::~MipsSelectionDAGInfo() {
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
//===-- MipsSelectionDAGInfo.h - Mips SelectionDAG Info ---------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the Mips subclass for TargetSelectionDAGInfo.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_TARGET_MIPS_MIPSSELECTIONDAGINFO_H
|
||||
#define LLVM_LIB_TARGET_MIPS_MIPSSELECTIONDAGINFO_H
|
||||
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MipsTargetMachine;
|
||||
|
||||
class MipsSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit MipsSelectionDAGInfo(const DataLayout &DL);
|
||||
~MipsSelectionDAGInfo();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -70,7 +70,7 @@ MipsSubtarget::MipsSubtarget(const Triple &TT, const std::string &CPU,
|
||||
HasMips4_32r2(false), HasMips5_32r2(false), InMips16Mode(false),
|
||||
InMips16HardFloat(Mips16HardFloat), InMicroMipsMode(false), HasDSP(false),
|
||||
HasDSPR2(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16),
|
||||
HasMSA(false), TM(TM), TargetTriple(TT), TSInfo(*TM.getDataLayout()),
|
||||
HasMSA(false), TM(TM), TargetTriple(TT), TSInfo(),
|
||||
InstrInfo(
|
||||
MipsInstrInfo::create(initializeSubtargetDependencies(CPU, FS, TM))),
|
||||
FrameLowering(MipsFrameLowering::create(*this)),
|
||||
|
@ -18,10 +18,10 @@
|
||||
#include "MipsFrameLowering.h"
|
||||
#include "MipsISelLowering.h"
|
||||
#include "MipsInstrInfo.h"
|
||||
#include "MipsSelectionDAGInfo.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/MC/MCInstrItineraries.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include <string>
|
||||
|
||||
@ -140,7 +140,7 @@ class MipsSubtarget : public MipsGenSubtargetInfo {
|
||||
|
||||
Triple TargetTriple;
|
||||
|
||||
const MipsSelectionDAGInfo TSInfo;
|
||||
const TargetSelectionDAGInfo TSInfo;
|
||||
std::unique_ptr<const MipsInstrInfo> InstrInfo;
|
||||
std::unique_ptr<const MipsFrameLowering> FrameLowering;
|
||||
std::unique_ptr<const MipsTargetLowering> TLInfo;
|
||||
@ -275,7 +275,7 @@ public:
|
||||
void setHelperClassesMips16();
|
||||
void setHelperClassesMipsSE();
|
||||
|
||||
const MipsSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
return &TSInfo;
|
||||
}
|
||||
const MipsInstrInfo *getInstrInfo() const override { return InstrInfo.get(); }
|
||||
|
@ -48,7 +48,7 @@ NVPTXSubtarget::NVPTXSubtarget(const Triple &TT, const std::string &CPU,
|
||||
const NVPTXTargetMachine &TM)
|
||||
: NVPTXGenSubtargetInfo(TT, CPU, FS), PTXVersion(0), SmVersion(20), TM(TM),
|
||||
InstrInfo(), TLInfo(TM, initializeSubtargetDependencies(CPU, FS)),
|
||||
TSInfo(TM.getDataLayout()), FrameLowering() {}
|
||||
FrameLowering() {}
|
||||
|
||||
bool NVPTXSubtarget::hasImageHandles() const {
|
||||
// Enable handles for Kepler+, where CUDA supports indirect surfaces and
|
||||
|
@ -33,7 +33,6 @@ add_llvm_target(PowerPCCodeGen
|
||||
PPCTargetObjectFile.cpp
|
||||
PPCTargetTransformInfo.cpp
|
||||
PPCTOCRegDeps.cpp
|
||||
PPCSelectionDAGInfo.cpp
|
||||
PPCTLSDynamicCall.cpp
|
||||
PPCVSXCopy.cpp
|
||||
PPCVSXFMAMutate.cpp
|
||||
|
@ -1,22 +0,0 @@
|
||||
//===-- PPCSelectionDAGInfo.cpp - PowerPC SelectionDAG Info ---------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the PPCSelectionDAGInfo class.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "PPCTargetMachine.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "powerpc-selectiondag-info"
|
||||
|
||||
PPCSelectionDAGInfo::PPCSelectionDAGInfo(const DataLayout *DL)
|
||||
: TargetSelectionDAGInfo(DL) {}
|
||||
|
||||
PPCSelectionDAGInfo::~PPCSelectionDAGInfo() {}
|
@ -1,31 +0,0 @@
|
||||
//===-- PPCSelectionDAGInfo.h - PowerPC SelectionDAG Info -------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the PowerPC subclass for TargetSelectionDAGInfo.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_TARGET_POWERPC_PPCSELECTIONDAGINFO_H
|
||||
#define LLVM_LIB_TARGET_POWERPC_PPCSELECTIONDAGINFO_H
|
||||
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class PPCTargetMachine;
|
||||
|
||||
class PPCSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit PPCSelectionDAGInfo(const DataLayout *DL);
|
||||
~PPCSelectionDAGInfo();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -53,7 +53,7 @@ PPCSubtarget::PPCSubtarget(const Triple &TT, const std::string &CPU,
|
||||
IsPPC64(TargetTriple.getArch() == Triple::ppc64 ||
|
||||
TargetTriple.getArch() == Triple::ppc64le),
|
||||
TM(TM), FrameLowering(initializeSubtargetDependencies(CPU, FS)),
|
||||
InstrInfo(*this), TLInfo(TM, *this), TSInfo(TM.getDataLayout()) {}
|
||||
InstrInfo(*this), TLInfo(TM, *this) {}
|
||||
|
||||
void PPCSubtarget::initializeEnvironment() {
|
||||
StackAlignment = 16;
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include "PPCFrameLowering.h"
|
||||
#include "PPCISelLowering.h"
|
||||
#include "PPCInstrInfo.h"
|
||||
#include "PPCSelectionDAGInfo.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/MC/MCInstrItineraries.h"
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include <string>
|
||||
|
||||
@ -129,7 +129,7 @@ protected:
|
||||
PPCFrameLowering FrameLowering;
|
||||
PPCInstrInfo InstrInfo;
|
||||
PPCTargetLowering TLInfo;
|
||||
PPCSelectionDAGInfo TSInfo;
|
||||
TargetSelectionDAGInfo TSInfo;
|
||||
|
||||
public:
|
||||
/// This constructor initializes the data members to match that
|
||||
@ -164,7 +164,7 @@ public:
|
||||
const PPCTargetLowering *getTargetLowering() const override {
|
||||
return &TLInfo;
|
||||
}
|
||||
const PPCSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
return &TSInfo;
|
||||
}
|
||||
const PPCRegisterInfo *getRegisterInfo() const override {
|
||||
|
@ -22,7 +22,6 @@ add_llvm_target(SparcCodeGen
|
||||
SparcRegisterInfo.cpp
|
||||
SparcSubtarget.cpp
|
||||
SparcTargetMachine.cpp
|
||||
SparcSelectionDAGInfo.cpp
|
||||
SparcMCInstLower.cpp
|
||||
SparcTargetObjectFile.cpp
|
||||
)
|
||||
|
@ -1,24 +0,0 @@
|
||||
//===-- SparcSelectionDAGInfo.cpp - Sparc SelectionDAG Info ---------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the SparcSelectionDAGInfo class.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SparcSelectionDAGInfo.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "sparc-selectiondag-info"
|
||||
|
||||
SparcSelectionDAGInfo::SparcSelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {
|
||||
}
|
||||
|
||||
SparcSelectionDAGInfo::~SparcSelectionDAGInfo() {
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
//===-- SparcSelectionDAGInfo.h - Sparc SelectionDAG Info -------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the Sparc subclass for TargetSelectionDAGInfo.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_TARGET_SPARC_SPARCSELECTIONDAGINFO_H
|
||||
#define LLVM_LIB_TARGET_SPARC_SPARCSELECTIONDAGINFO_H
|
||||
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class SparcTargetMachine;
|
||||
|
||||
class SparcSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit SparcSelectionDAGInfo(const DataLayout &DL);
|
||||
~SparcSelectionDAGInfo() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -54,7 +54,7 @@ SparcSubtarget::SparcSubtarget(const Triple &TT, const std::string &CPU,
|
||||
bool is64Bit)
|
||||
: SparcGenSubtargetInfo(TT, CPU, FS), Is64Bit(is64Bit),
|
||||
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
|
||||
TSInfo(*TM.getDataLayout()), FrameLowering(*this) {}
|
||||
FrameLowering(*this) {}
|
||||
|
||||
int SparcSubtarget::getAdjustedFrameSize(int frameSize) const {
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
#include "SparcFrameLowering.h"
|
||||
#include "SparcInstrInfo.h"
|
||||
#include "SparcISelLowering.h"
|
||||
#include "SparcSelectionDAGInfo.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/Target/TargetFrameLowering.h"
|
||||
#include "llvm/Target/TargetSelectionDAGInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include <string>
|
||||
|
||||
@ -39,7 +39,7 @@ class SparcSubtarget : public SparcGenSubtargetInfo {
|
||||
bool UsePopc;
|
||||
SparcInstrInfo InstrInfo;
|
||||
SparcTargetLowering TLInfo;
|
||||
SparcSelectionDAGInfo TSInfo;
|
||||
TargetSelectionDAGInfo TSInfo;
|
||||
SparcFrameLowering FrameLowering;
|
||||
|
||||
public:
|
||||
@ -56,7 +56,7 @@ public:
|
||||
const SparcTargetLowering *getTargetLowering() const override {
|
||||
return &TLInfo;
|
||||
}
|
||||
const SparcSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
return &TSInfo;
|
||||
}
|
||||
|
||||
|
@ -18,12 +18,6 @@ using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "systemz-selectiondag-info"
|
||||
|
||||
SystemZSelectionDAGInfo::SystemZSelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
SystemZSelectionDAGInfo::~SystemZSelectionDAGInfo() {
|
||||
}
|
||||
|
||||
// Decide whether it is best to use a loop or straight-line code for
|
||||
// a block operation of Size bytes with source address Src and destination
|
||||
// address Dest. Sequence is the opcode to use for straight-line code
|
||||
|
@ -22,8 +22,7 @@ class SystemZTargetMachine;
|
||||
|
||||
class SystemZSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit SystemZSelectionDAGInfo(const DataLayout &DL);
|
||||
~SystemZSelectionDAGInfo();
|
||||
explicit SystemZSelectionDAGInfo() = default;
|
||||
|
||||
SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
|
||||
SDValue Dst, SDValue Src,
|
||||
|
@ -42,7 +42,7 @@ SystemZSubtarget::SystemZSubtarget(const Triple &TT, const std::string &CPU,
|
||||
HasTransactionalExecution(false), HasProcessorAssist(false),
|
||||
HasVector(false), TargetTriple(TT),
|
||||
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
|
||||
TSInfo(*TM.getDataLayout()), FrameLowering() {}
|
||||
TSInfo(), FrameLowering() {}
|
||||
|
||||
// Return true if GV binds locally under reloc model RM.
|
||||
static bool bindsLocally(const GlobalValue *GV, Reloc::Model RM) {
|
||||
|
@ -24,11 +24,6 @@ using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "x86-selectiondag-info"
|
||||
|
||||
X86SelectionDAGInfo::X86SelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
X86SelectionDAGInfo::~X86SelectionDAGInfo() {}
|
||||
|
||||
bool X86SelectionDAGInfo::isBaseRegConflictPossible(
|
||||
SelectionDAG &DAG, ArrayRef<unsigned> ClobberSet) const {
|
||||
// We cannot use TRI->hasBasePointer() until *after* we select all basic
|
||||
|
@ -29,8 +29,7 @@ class X86SelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
ArrayRef<unsigned> ClobberSet) const;
|
||||
|
||||
public:
|
||||
explicit X86SelectionDAGInfo(const DataLayout &DL);
|
||||
~X86SelectionDAGInfo();
|
||||
explicit X86SelectionDAGInfo() = default;
|
||||
|
||||
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc dl,
|
||||
SDValue Chain,
|
||||
|
@ -297,9 +297,8 @@ X86Subtarget::X86Subtarget(const Triple &TT, const std::string &CPU,
|
||||
TargetTriple.getEnvironment() != Triple::CODE16),
|
||||
In16BitMode(TargetTriple.getArch() == Triple::x86 &&
|
||||
TargetTriple.getEnvironment() == Triple::CODE16),
|
||||
TSInfo(*TM.getDataLayout()),
|
||||
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
|
||||
FrameLowering(*this, getStackAlignment()) {
|
||||
TSInfo(), InstrInfo(initializeSubtargetDependencies(CPU, FS)),
|
||||
TLInfo(TM, *this), FrameLowering(*this, getStackAlignment()) {
|
||||
// Determine the PICStyle based on the target selected.
|
||||
if (TM.getRelocationModel() == Reloc::Static) {
|
||||
// Unless we're in PIC or DynamicNoPIC mode, set the PIC style to None.
|
||||
|
@ -16,12 +16,6 @@ using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "xcore-selectiondag-info"
|
||||
|
||||
XCoreSelectionDAGInfo::XCoreSelectionDAGInfo(const DataLayout &DL)
|
||||
: TargetSelectionDAGInfo(&DL) {}
|
||||
|
||||
XCoreSelectionDAGInfo::~XCoreSelectionDAGInfo() {
|
||||
}
|
||||
|
||||
SDValue XCoreSelectionDAGInfo::
|
||||
EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl, SDValue Chain,
|
||||
SDValue Dst, SDValue Src, SDValue Size, unsigned Align,
|
||||
|
@ -22,8 +22,6 @@ class XCoreTargetMachine;
|
||||
|
||||
class XCoreSelectionDAGInfo : public TargetSelectionDAGInfo {
|
||||
public:
|
||||
explicit XCoreSelectionDAGInfo(const DataLayout &DL);
|
||||
~XCoreSelectionDAGInfo();
|
||||
|
||||
SDValue
|
||||
EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl,
|
||||
|
@ -28,4 +28,4 @@ void XCoreSubtarget::anchor() { }
|
||||
XCoreSubtarget::XCoreSubtarget(const Triple &TT, const std::string &CPU,
|
||||
const std::string &FS, const TargetMachine &TM)
|
||||
: XCoreGenSubtargetInfo(TT, CPU, FS), InstrInfo(), FrameLowering(*this),
|
||||
TLInfo(TM, *this), TSInfo(*TM.getDataLayout()) {}
|
||||
TLInfo(TM, *this), TSInfo() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user