|
@@ -106,8 +106,7 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
|
|
llvm_unreachable("unknown subtarget type");
|
|
llvm_unreachable("unknown subtarget type");
|
|
}
|
|
}
|
|
|
|
|
|
-static std::string computeDataLayout(const Triple &TT,
|
|
|
|
- bool AddressSpaces = true) {
|
|
|
|
|
|
+static std::string computeDataLayout(const Triple &TT) {
|
|
// X86 is little endian
|
|
// X86 is little endian
|
|
std::string Ret = "e";
|
|
std::string Ret = "e";
|
|
|
|
|
|
@@ -119,8 +118,7 @@ static std::string computeDataLayout(const Triple &TT,
|
|
Ret += "-p:32:32";
|
|
Ret += "-p:32:32";
|
|
|
|
|
|
// Address spaces for 32 bit signed, 32 bit unsigned, and 64 bit pointers.
|
|
// Address spaces for 32 bit signed, 32 bit unsigned, and 64 bit pointers.
|
|
- if (AddressSpaces)
|
|
|
|
- Ret += "-p270:32:32-p271:32:32-p272:64:64";
|
|
|
|
|
|
+ Ret += "-p270:32:32-p271:32:32-p272:64:64";
|
|
|
|
|
|
// Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
|
|
// Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
|
|
if (TT.isArch64Bit() || TT.isOSWindows() || TT.isOSNaCl())
|
|
if (TT.isArch64Bit() || TT.isOSWindows() || TT.isOSNaCl())
|
|
@@ -223,8 +221,7 @@ X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT,
|
|
getEffectiveRelocModel(TT, JIT, RM),
|
|
getEffectiveRelocModel(TT, JIT, RM),
|
|
getEffectiveX86CodeModel(CM, JIT, TT.getArch() == Triple::x86_64),
|
|
getEffectiveX86CodeModel(CM, JIT, TT.getArch() == Triple::x86_64),
|
|
OL),
|
|
OL),
|
|
- TLOF(createTLOF(getTargetTriple())),
|
|
|
|
- DLNoAddrSpaces(computeDataLayout(TT, /*AddressSpaces=*/false)) {
|
|
|
|
|
|
+ TLOF(createTLOF(getTargetTriple())) {
|
|
// On PS4, the "return address" of a 'noreturn' call must still be within
|
|
// On PS4, the "return address" of a 'noreturn' call must still be within
|
|
// the calling function, and TrapUnreachable is an easy way to get that.
|
|
// the calling function, and TrapUnreachable is an easy way to get that.
|
|
if (TT.isPS4() || TT.isOSBinFormatMachO()) {
|
|
if (TT.isPS4() || TT.isOSBinFormatMachO()) {
|
|
@@ -318,13 +315,6 @@ X86TargetMachine::getSubtargetImpl(const Function &F) const {
|
|
return I.get();
|
|
return I.get();
|
|
}
|
|
}
|
|
|
|
|
|
-bool X86TargetMachine::isCompatibleDataLayout(
|
|
|
|
- const DataLayout &Candidate) const {
|
|
|
|
- // Maintain compatibility with datalayouts that don't have address space
|
|
|
|
- // pointer sizes.
|
|
|
|
- return DL == Candidate || DLNoAddrSpaces == Candidate;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
//===----------------------------------------------------------------------===//
|
|
// Command line options for x86
|
|
// Command line options for x86
|
|
//===----------------------------------------------------------------------===//
|
|
//===----------------------------------------------------------------------===//
|