[llvm] r307427 - [RegAllocFast] Add the proper initialize method to use the .mir infrastructure

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 12:25:42 PDT 2017


Author: qcolombet
Date: Fri Jul  7 12:25:42 2017
New Revision: 307427

URL: http://llvm.org/viewvc/llvm-project?rev=307427&view=rev
Log:
[RegAllocFast] Add the proper initialize method to use the .mir infrastructure

NFC

Modified:
    llvm/trunk/include/llvm/InitializePasses.h
    llvm/trunk/lib/CodeGen/CodeGen.cpp
    llvm/trunk/lib/CodeGen/RegAllocFast.cpp
    llvm/trunk/test/CodeGen/MIR/Generic/runPass.mir

Modified: llvm/trunk/include/llvm/InitializePasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InitializePasses.h?rev=307427&r1=307426&r2=307427&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InitializePasses.h (original)
+++ llvm/trunk/include/llvm/InitializePasses.h Fri Jul  7 12:25:42 2017
@@ -303,6 +303,7 @@ void initializeProfileSummaryInfoWrapper
 void initializePromoteLegacyPassPass(PassRegistry&);
 void initializePruneEHPass(PassRegistry&);
 void initializeRABasicPass(PassRegistry&);
+void initializeRAFastPass(PassRegistry&);
 void initializeRAGreedyPass(PassRegistry&);
 void initializeReassociateLegacyPassPass(PassRegistry&);
 void initializeRegBankSelectPass(PassRegistry&);

Modified: llvm/trunk/lib/CodeGen/CodeGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGen.cpp?rev=307427&r1=307426&r2=307427&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGen.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGen.cpp Fri Jul  7 12:25:42 2017
@@ -78,6 +78,7 @@ void llvm::initializeCodeGen(PassRegistr
   initializePreISelIntrinsicLoweringLegacyPassPass(Registry);
   initializeProcessImplicitDefsPass(Registry);
   initializeRABasicPass(Registry);
+  initializeRAFastPass(Registry);
   initializeRAGreedyPass(Registry);
   initializeRegisterCoalescerPass(Registry);
   initializeRenameIndependentSubregsPass(Registry);

Modified: llvm/trunk/lib/CodeGen/RegAllocFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocFast.cpp?rev=307427&r1=307426&r2=307427&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocFast.cpp Fri Jul  7 12:25:42 2017
@@ -203,6 +203,8 @@ namespace {
   char RAFast::ID = 0;
 }
 
+INITIALIZE_PASS(RAFast, "regallocfast", "Fast Register Allocator", false, false)
+
 /// getStackSpaceFor - This allocates space for the specified virtual register
 /// to be held on the stack.
 int RAFast::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) {

Modified: llvm/trunk/test/CodeGen/MIR/Generic/runPass.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/MIR/Generic/runPass.mir?rev=307427&r1=307426&r2=307427&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/MIR/Generic/runPass.mir (original)
+++ llvm/trunk/test/CodeGen/MIR/Generic/runPass.mir Fri Jul  7 12:25:42 2017
@@ -1,5 +1,6 @@
 # RUN: llc -run-pass=greedy -debug-pass=Arguments -o - %s | FileCheck %s
 # RUN: llc -run-pass=regallocbasic -debug-pass=Arguments -o - %s | FileCheck %s
+# RUN: llc -run-pass=regallocfast -debug-pass=Arguments -o - %s | FileCheck %s
 
 # Check that passes are initialized correctly, so that it's possible to
 # use -run-pass.
@@ -7,6 +8,7 @@
 ---
 # CHECK: name: foo
 name: foo
+tracksRegLiveness: true
 body: |
   bb.0:
 ...




More information about the llvm-commits mailing list