From 74da671c36cdaa6bea3fa7889dc9aeab572b609c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 11 Aug 2009 22:49:34 +0000 Subject: [PATCH] eliminate asmflavor from subtarget, PPCTAI is the only client and each callee knows that it returns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78742 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCSubtarget.cpp | 6 +----- lib/Target/PowerPC/PPCSubtarget.h | 11 ----------- lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 6 +++--- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp index ef17105160e..f75e7814526 100644 --- a/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/lib/Target/PowerPC/PPCSubtarget.cpp @@ -106,12 +106,8 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &FS, } // Set up darwin-specific properties. - if (isDarwin()) { + if (isDarwin()) HasLazyResolverStubs = true; - AsmFlavor = NewMnemonic; - } else { - AsmFlavor = OldMnemonic; - } } /// SetJITMode - This is called to inform the subtarget info that we are diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h index 45ff91cb23f..6787390f92f 100644 --- a/lib/Target/PowerPC/PPCSubtarget.h +++ b/lib/Target/PowerPC/PPCSubtarget.h @@ -43,10 +43,6 @@ class GlobalValue; class TargetMachine; class PPCSubtarget : public TargetSubtarget { -public: - enum AsmWriterFlavorTy { - OldMnemonic, NewMnemonic, Unset - }; protected: /// stackAlignment - The minimum alignment known to hold of the stack frame on /// entry to the function and which must be maintained by every function. @@ -58,9 +54,6 @@ protected: /// Which cpu directive was used. unsigned DarwinDirective; - /// AsmFlavor - Which PPC asm dialect to use. - AsmWriterFlavorTy AsmFlavor; - /// Used by the ISel to turn in optimizations for POWER4-derived architectures bool IsGigaProcessor; bool Has64BitSupport; @@ -147,10 +140,6 @@ public: bool isDarwinABI() const { return isDarwin() || IsPPC64; } bool isSVR4ABI() const { return !isDarwin() && !IsPPC64; } - - unsigned getAsmFlavor() const { - return AsmFlavor != Unset ? unsigned(AsmFlavor) : 0; - } }; } // End llvm namespace diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index 891252b8a9a..925e5907860 100644 --- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -28,8 +28,8 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) { bool isPPC64 = Subtarget->isPPC64(); if (!isPPC64) - Data64bitsDirective = 0; // we can't emit a 64-bit unit - AssemblerDialect = Subtarget->getAsmFlavor(); + Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. + AssemblerDialect = 0; // Old-Style mnemonics. } PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) { @@ -61,6 +61,6 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) { Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0; AlignmentIsInBytes = false; LCOMMDirective = "\t.lcomm\t"; - AssemblerDialect = Subtarget->getAsmFlavor(); + AssemblerDialect = 1; // New-Style mnemonics. } -- 2.34.1