summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-04-07 20:27:33 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-04-07 20:27:33 +0000
commitd4131814b3117c00c3eb2b0dc30b6a03297421f4 (patch)
tree34955f69c97708cd232d411112cafaecea77450f /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parenteb37fcbc875d6aea445b187ec8871b842fb06a4a (diff)
downloadbcm5719-llvm-d4131814b3117c00c3eb2b0dc30b6a03297421f4.tar.gz
bcm5719-llvm-d4131814b3117c00c3eb2b0dc30b6a03297421f4.zip
[GlobalISel] Add RegBankSelect hooks into the pass pipeline.
Now, RegBankSelect will happen after the IRTranslation and the target may optionally add additional passes in between. llvm-svn: 265716
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 9c6236ec02b..a19049360c0 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -143,6 +143,14 @@ addPassesToGenerateCode(LLVMTargetMachine *TM, PassManagerBase &PM,
if (LLVM_UNLIKELY(EnableGlobalISel)) {
if (PassConfig->addIRTranslator())
return nullptr;
+
+ // Before running the register bank selector, ask the target if it
+ // wants to run some passes.
+ PassConfig->addPreRegBankSelect();
+
+ if (PassConfig->addRegBankSelect())
+ return nullptr;
+
} else if (PassConfig->addInstSelector())
return nullptr;
OpenPOWER on IntegriCloud