[PATCH] D11373: [ARM] Register (existing) ARMLoadStoreOpt pass with LLVM pass manager.

David Gross dgross at google.com
Thu Jul 23 15:13:06 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL243052: [ARM] Register (existing) ARMLoadStoreOpt pass with LLVM pass manager. (authored by dgross).

Changed prior to commit:
  http://reviews.llvm.org/D11373?vs=30199&id=30527#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D11373

Files:
  llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp

Index: llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ llvm/trunk/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -60,12 +60,20 @@
 STATISTIC(NumLDRD2LDR,  "Number of ldrd instructions turned back into ldr's");
 STATISTIC(NumSTRD2STR,  "Number of strd instructions turned back into str's");
 
+namespace llvm {
+void initializeARMLoadStoreOptPass(PassRegistry &);
+}
+
+#define ARM_LOAD_STORE_OPT_NAME "ARM load / store optimization pass"
+
 namespace {
   /// Post- register allocation pass the combine load / store instructions to
   /// form ldm / stm instructions.
   struct ARMLoadStoreOpt : public MachineFunctionPass {
     static char ID;
-    ARMLoadStoreOpt() : MachineFunctionPass(ID) {}
+    ARMLoadStoreOpt() : MachineFunctionPass(ID) {
+      initializeARMLoadStoreOptPass(*PassRegistry::getPassRegistry());
+    }
 
     const MachineFunction *MF;
     const TargetInstrInfo *TII;
@@ -84,7 +92,7 @@
     bool runOnMachineFunction(MachineFunction &Fn) override;
 
     const char *getPassName() const override {
-      return "ARM load / store optimization pass";
+      return ARM_LOAD_STORE_OPT_NAME;
     }
 
   private:
@@ -148,6 +156,8 @@
   char ARMLoadStoreOpt::ID = 0;
 }
 
+INITIALIZE_PASS(ARMLoadStoreOpt, "arm-load-store-opt", ARM_LOAD_STORE_OPT_NAME, false, false)
+
 static bool definesCPSR(const MachineInstr *MI) {
   for (const auto &MO : MI->operands()) {
     if (!MO.isReg())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11373.30527.patch
Type: text/x-patch
Size: 1537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150723/de029e35/attachment.bin>


More information about the llvm-commits mailing list