summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAmara Emerson <aemerson@apple.com>2019-03-16 01:02:10 +0000
committerAmara Emerson <aemerson@apple.com>2019-03-16 01:02:10 +0000
commit7097e83dab7af66b02408df656afeae014e46711 (patch)
tree37eedf38445649cc952403cb36d99bd2e528928f /llvm/lib/CodeGen
parenta61641ef4009e113fd74eaaf8966aacf1eba2924 (diff)
downloadbcm5719-llvm-7097e83dab7af66b02408df656afeae014e46711.tar.gz
bcm5719-llvm-7097e83dab7af66b02408df656afeae014e46711.zip
[GlobalISel] Make isel verification checks of vregs run under NDEBUG only.
llvm-svn: 356309
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
index 4434c7e208b..bbba28e5d6d 100644
--- a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp
@@ -89,10 +89,10 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) {
"instruction is not legal", *MI);
return false;
}
-#endif
// FIXME: We could introduce new blocks and will need to fix the outer loop.
// Until then, keep track of the number of blocks to assert that we don't.
const size_t NumBlocks = MF.size();
+#endif
for (MachineBasicBlock *MBB : post_order(&MF)) {
if (MBB->empty())
@@ -144,8 +144,6 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) {
}
}
- const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
-
for (MachineBasicBlock &MBB : MF) {
if (MBB.empty())
continue;
@@ -177,6 +175,8 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) {
}
}
+#ifndef NDEBUG
+ const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
// Now that selection is complete, there are no more generic vregs. Verify
// that the size of the now-constrained vreg is unchanged and that it has a
// register class.
@@ -215,7 +215,7 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) {
reportGISelFailure(MF, TPC, MORE, R);
return false;
}
-
+#endif
auto &TLI = *MF.getSubtarget().getTargetLowering();
TLI.finalizeLowering(MF);
OpenPOWER on IntegriCloud