don't bother trying to avoid emitting redundant constant pool alignment directives.
authorChris Lattner <sabre@nondot.org>
Mon, 19 Oct 2009 18:08:02 +0000 (18:08 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Oct 2009 18:08:02 +0000 (18:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84512 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp

index df42a99fa051cc1772878a5b0708e7cadcc5bb69..c34dacab4b639ab3eb63d3ed0c2168571d70fd47 100644 (file)
@@ -77,13 +77,10 @@ namespace {
     /// visibility that require non-lazy-pointers for indirect access.
     StringMap<std::string> HiddenGVNonLazyPtrs;
 
-    /// True if asm printer is printing a series of CONSTPOOL_ENTRY.
-    bool InCPMode;
   public:
     explicit ARMAsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
                            const MCAsmInfo *T, bool V)
-      : AsmPrinter(O, TM, T, V), AFI(NULL), MCP(NULL),
-        InCPMode(false) {
+      : AsmPrinter(O, TM, T, V), AFI(NULL), MCP(NULL) {
       Subtarget = &TM.getSubtarget<ARMSubtarget>();
     }
 
@@ -259,7 +256,6 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
     if (Subtarget->isTargetDarwin())
       O << "\t" << CurrentFnName;
     O << "\n";
-    InCPMode = false;
   } else {
     EmitAlignment(FnAlign, F);
   }
@@ -1027,17 +1023,8 @@ void ARMAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
 
   int Opc = MI->getOpcode();
-  switch (Opc) {
-  case ARM::CONSTPOOL_ENTRY:
-    if (!InCPMode && AFI->isThumbFunction()) {
-      EmitAlignment(2);
-      InCPMode = true;
-    }
-    break;
-  default: {
-    if (InCPMode && AFI->isThumbFunction())
-      InCPMode = false;
-  }}
+  if (Opc == ARM::CONSTPOOL_ENTRY)
+    EmitAlignment(2);
 
   // Call the autogenerated instruction printer routines.
   processDebugLoc(MI, true);