[llvm] r303536 - Revert "[ARM] Clear the constant pool cache on explicit .ltorg directives"

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 01:49:29 PDT 2017


Author: jamesm
Date: Mon May 22 03:49:28 2017
New Revision: 303536

URL: http://llvm.org/viewvc/llvm-project?rev=303536&view=rev
Log:
Revert "[ARM] Clear the constant pool cache on explicit .ltorg directives"

This reverts commit r302416. This was a fixup for r286006, which has now been reverted so this doesn't apply (either in concept or in code).

This commit itself has no problems, but the underlying issue it was fixing has now disappeared from the codebase.

Removed:
    llvm/trunk/test/MC/ARM/ltorg-range.s
Modified:
    llvm/trunk/include/llvm/MC/ConstantPools.h
    llvm/trunk/lib/MC/ConstantPools.cpp
    llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp

Modified: llvm/trunk/include/llvm/MC/ConstantPools.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/ConstantPools.h?rev=303536&r1=303535&r2=303536&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/ConstantPools.h (original)
+++ llvm/trunk/include/llvm/MC/ConstantPools.h Mon May 22 03:49:28 2017
@@ -61,8 +61,6 @@ public:
 
   // Return true if the constant pool is empty
   bool empty();
-
-  void clearCache();
 };
 
 class AssemblerConstantPools {
@@ -86,7 +84,6 @@ class AssemblerConstantPools {
 public:
   void emitAll(MCStreamer &Streamer);
   void emitForCurrentSection(MCStreamer &Streamer);
-  void clearCacheForCurrentSection(MCStreamer &Streamer);
   const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr,
                          unsigned Size, SMLoc Loc);
 

Modified: llvm/trunk/lib/MC/ConstantPools.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ConstantPools.cpp?rev=303536&r1=303535&r2=303536&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ConstantPools.cpp (original)
+++ llvm/trunk/lib/MC/ConstantPools.cpp Mon May 22 03:49:28 2017
@@ -47,10 +47,6 @@ const MCExpr *ConstantPool::addEntry(con
 
 bool ConstantPool::empty() { return Entries.empty(); }
 
-void ConstantPool::clearCache() {
-  CachedEntries.clear();
-}
-
 //
 // AssemblerConstantPools implementation
 //
@@ -92,13 +88,6 @@ void AssemblerConstantPools::emitForCurr
   }
 }
 
-void AssemblerConstantPools::clearCacheForCurrentSection(MCStreamer &Streamer) {
-  MCSection *Section = Streamer.getCurrentSectionOnly();
-  if (ConstantPool *CP = getConstantPool(Section)) {
-    CP->clearCache();
-  }
-}
-
 const MCExpr *AssemblerConstantPools::addEntry(MCStreamer &Streamer,
                                                const MCExpr *Expr,
                                                unsigned Size, SMLoc Loc) {

Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp?rev=303536&r1=303535&r2=303536&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp Mon May 22 03:49:28 2017
@@ -38,7 +38,6 @@ const MCExpr *ARMTargetStreamer::addCons
 
 void ARMTargetStreamer::emitCurrentConstantPool() {
   ConstantPools->emitForCurrentSection(Streamer);
-  ConstantPools->clearCacheForCurrentSection(Streamer);
 }
 
 // finish() - write out any non-empty assembler constant pools.

Removed: llvm/trunk/test/MC/ARM/ltorg-range.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/ltorg-range.s?rev=303535&view=auto
==============================================================================
--- llvm/trunk/test/MC/ARM/ltorg-range.s (original)
+++ llvm/trunk/test/MC/ARM/ltorg-range.s (removed)
@@ -1,27 +0,0 @@
-@ RUN: llvm-mc -triple armv7-unknown-linux-gnueabi -filetype obj -o - %s \
-@ RUN:   | llvm-objdump -d - | FileCheck %s
-
-        ldr r0, =0x01020304
-@ CHECK: ldr
-        .ltorg
-@ CHECK: 0x01020304
-        ldr r0, =0x01020304
-        ldr r0, =0x01020304
-        ldr r0, =0x01020304
-@ CHECK: ldr
-@ CHECK: ldr
-@ CHECK: ldr
-        .ltorg
-@ CHECK: 0x01020304
-    .rep 1028
-        .word 0
-    .endr
-@ CHECK: 0x00000000
-
-        ldr r0, =0x01020304
-@ CHECK: ldr
-        .ltorg
-@ CHECK: 0x01020304
-    .rep 1028
-        .word 0
-    .endr




More information about the llvm-commits mailing list