summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-04-05 19:06:01 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-04-05 19:06:01 +0000
commit8e8e85c19fbbfe699b47a1800a0d1f3bafe9eb15 (patch)
tree65ce05819bd0caf7e5e0fbb2d633138680c5fa91 /llvm/lib
parente585b5c52b71cddb5ce684df0751940d352b8cf9 (diff)
downloadbcm5719-llvm-8e8e85c19fbbfe699b47a1800a0d1f3bafe9eb15.tar.gz
bcm5719-llvm-8e8e85c19fbbfe699b47a1800a0d1f3bafe9eb15.zip
[GlobalISel] Add the skeleton of the RegBankSelect pass.
This pass is reponsible for assigning the generic virtual registers to register banks. llvm-svn: 265440
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/CMakeLists.txt1
-rw-r--r--llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp1
-rw-r--r--llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp32
3 files changed, 34 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
index 8b4bf8d830e..bb6225f031a 100644
--- a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
+++ b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
@@ -2,6 +2,7 @@
set(GLOBAL_ISEL_FILES
IRTranslator.cpp
MachineIRBuilder.cpp
+ RegBankSelect.cpp
)
# Add GlobalISel files to the dependencies if the user wants to build it.
diff --git a/llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp b/llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp
index f6857f1bd40..231e5ac82be 100644
--- a/llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp
@@ -25,5 +25,6 @@ void llvm::initializeGlobalISel(PassRegistry &Registry) {
void llvm::initializeGlobalISel(PassRegistry &Registry) {
initializeIRTranslatorPass(Registry);
+ initializeRegBankSelectPass(Registry);
}
#endif // LLVM_BUILD_GLOBAL_ISEL
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
new file mode 100644
index 00000000000..7f1e9d9a653
--- /dev/null
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -0,0 +1,32 @@
+//===- llvm/CodeGen/GlobalISel/RegBankSelect.cpp - RegBankSelect -*- C++ -*-==//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+/// \file
+/// This file implements the RegBankSelect class.
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
+
+#define DEBUG_TYPE "regbankselect"
+
+using namespace llvm;
+
+char RegBankSelect::ID = 0;
+INITIALIZE_PASS(RegBankSelect, "regbankselect",
+ "Assign register bank of generic virtual registers",
+ false, false);
+
+RegBankSelect::RegBankSelect() : MachineFunctionPass(ID), RBI(nullptr) {
+ initializeRegBankSelectPass(*PassRegistry::getPassRegistry());
+}
+
+bool RegBankSelect::runOnMachineFunction(MachineFunction &MF) {
+ // Avoid unused field member warning.
+ (void)RBI;
+ return false;
+}
OpenPOWER on IntegriCloud