[llvm-commits] [llvm] r78742 - in /llvm/trunk/lib/Target/PowerPC: PPCSubtarget.cpp PPCSubtarget.h PPCTargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Tue Aug 11 15:49:34 PDT 2009
Author: lattner
Date: Tue Aug 11 17:49:34 2009
New Revision: 78742
URL: http://llvm.org/viewvc/llvm-project?rev=78742&view=rev
Log:
eliminate asmflavor from subtarget, PPCTAI is the only client
and each callee knows that it returns.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp?rev=78742&r1=78741&r2=78742&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp Tue Aug 11 17:49:34 2009
@@ -106,12 +106,8 @@
}
// 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
Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h?rev=78742&r1=78741&r2=78742&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h Tue Aug 11 17:49:34 2009
@@ -43,10 +43,6 @@
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 @@
/// 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 @@
bool isDarwinABI() const { return isDarwin() || IsPPC64; }
bool isSVR4ABI() const { return !isDarwin() && !IsPPC64; }
-
- unsigned getAsmFlavor() const {
- return AsmFlavor != Unset ? unsigned(AsmFlavor) : 0;
- }
};
} // End llvm namespace
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=78742&r1=78741&r2=78742&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Tue Aug 11 17:49:34 2009
@@ -28,8 +28,8 @@
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 @@
Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
AlignmentIsInBytes = false;
LCOMMDirective = "\t.lcomm\t";
- AssemblerDialect = Subtarget->getAsmFlavor();
+ AssemblerDialect = 1; // New-Style mnemonics.
}
More information about the llvm-commits
mailing list