aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp')
-rw-r--r--lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
index 727ab921daf9..05688ed8efbb 100644
--- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
+++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
@@ -173,43 +173,6 @@ createSystemZMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) {
return createSystemZMCSubtargetInfoImpl(TT, CPU, FS);
}
-static void adjustCodeGenOpts(const Triple &TT, Reloc::Model RM,
- CodeModel::Model &CM) {
- // For SystemZ we define the models as follows:
- //
- // Small: BRASL can call any function and will use a stub if necessary.
- // Locally-binding symbols will always be in range of LARL.
- //
- // Medium: BRASL can call any function and will use a stub if necessary.
- // GOT slots and locally-defined text will always be in range
- // of LARL, but other symbols might not be.
- //
- // Large: Equivalent to Medium for now.
- //
- // Kernel: Equivalent to Medium for now.
- //
- // This means that any PIC module smaller than 4GB meets the
- // requirements of Small, so Small seems like the best default there.
- //
- // All symbols bind locally in a non-PIC module, so the choice is less
- // obvious. There are two cases:
- //
- // - When creating an executable, PLTs and copy relocations allow
- // us to treat external symbols as part of the executable.
- // Any executable smaller than 4GB meets the requirements of Small,
- // so that seems like the best default.
- //
- // - When creating JIT code, stubs will be in range of BRASL if the
- // image is less than 4GB in size. GOT entries will likewise be
- // in range of LARL. However, the JIT environment has no equivalent
- // of copy relocs, so locally-binding data symbols might not be in
- // the range of LARL. We need the Medium model in that case.
- if (CM == CodeModel::Default)
- CM = CodeModel::Small;
- else if (CM == CodeModel::JITDefault)
- CM = RM == Reloc::PIC_ ? CodeModel::Small : CodeModel::Medium;
-}
-
static MCInstPrinter *createSystemZMCInstPrinter(const Triple &T,
unsigned SyntaxVariant,
const MCAsmInfo &MAI,
@@ -223,10 +186,6 @@ extern "C" void LLVMInitializeSystemZTargetMC() {
TargetRegistry::RegisterMCAsmInfo(getTheSystemZTarget(),
createSystemZMCAsmInfo);
- // Register the adjustCodeGenOpts.
- TargetRegistry::registerMCAdjustCodeGenOpts(getTheSystemZTarget(),
- adjustCodeGenOpts);
-
// Register the MCCodeEmitter.
TargetRegistry::RegisterMCCodeEmitter(getTheSystemZTarget(),
createSystemZMCCodeEmitter);