diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-08-03 02:22:28 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-08-03 02:22:28 +0000 |
commit | e2c74081998af2e64ed498d65cf501704796ccc0 (patch) | |
tree | 1d2bc6a9d597d16cbeaa8bf528c578dd9f9b2c80 /lib/Target/Mips/MipsTargetMachine.cpp | |
parent | 5eca4525f42a99eec29be1676a7a77928853c521 (diff) |
Remove -disable-mips-abicall and -enable-mips-absolute-call command-line
options, which don't appear to be useful. -enable-mips-absolute-call is
completely unused (and unless I'm mistaken, is supposed to have the
same effect that -relocation-model=dynamic-no-pic should have),
and -disable-mips-abicall appears to be effectively a
synonym for -relocation-model=static. Adjust the few users of hasABICall
to checks which seem more appropriate. Update MipsSubtarget,
MipsTargetMachine, and MipselTargetMachine to synchronize with recent
changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 657d21d7c0..a74af26add 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -20,8 +20,8 @@ using namespace llvm; extern "C" void LLVMInitializeMipsTarget() { // Register the target. - RegisterTargetMachineDeprecated<MipsTargetMachine> X(TheMipsTarget); - RegisterTargetMachineDeprecated<MipselTargetMachine> Y(TheMipselTarget); + RegisterTargetMachine<MipsTargetMachine> X(TheMipsTarget); + RegisterTargetMachine<MipselTargetMachine> Y(TheMipselTarget); } const TargetAsmInfo *MipsTargetMachine:: @@ -38,10 +38,10 @@ createTargetAsmInfo() const // an easier handling. // Using CodeModel::Large enables different CALL behavior. MipsTargetMachine:: -MipsTargetMachine(const Target &T, const Module &M, const std::string &FS, +MipsTargetMachine(const Target &T, const std::string &TT, const std::string &FS, bool isLittle=false): LLVMTargetMachine(T), - Subtarget(*this, M.getTargetTriple(), FS, isLittle), + Subtarget(TT, FS, isLittle), DataLayout(isLittle ? std::string("e-p:32:32:32-i8:8:32-i16:16:32") : std::string("E-p:32:32:32-i8:8:32-i16:16:32")), InstrInfo(*this), @@ -49,8 +49,12 @@ MipsTargetMachine(const Target &T, const Module &M, const std::string &FS, TLInfo(*this) { // Abicall enables PIC by default - if (Subtarget.hasABICall()) - setRelocationModel(Reloc::PIC_); + if (getRelocationModel() == Reloc::Default) { + if (Subtarget.isABI_O32()) + setRelocationModel(Reloc::PIC_); + else + setRelocationModel(Reloc::Static); + } // TODO: create an option to enable long calls, like -mlong-calls, // that would be our CodeModel::Large. It must not work with Abicall. @@ -59,8 +63,9 @@ MipsTargetMachine(const Target &T, const Module &M, const std::string &FS, } MipselTargetMachine:: -MipselTargetMachine(const Target &T, const Module &M, const std::string &FS) : - MipsTargetMachine(T, M, FS, true) {} +MipselTargetMachine(const Target &T, const std::string &TT, + const std::string &FS) : + MipsTargetMachine(T, TT, FS, true) {} // Install an instruction selector pass using // the ISelDag to gen Mips code. |