summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-09-12 04:22:31 +0000
committerHal Finkel <hfinkel@anl.gov>2013-09-12 04:22:31 +0000
commit6f1ff8e1a8344c297d740c3e95b317a5746abb14 (patch)
treea7eca5ef48872ed5b3b80f65d56a1146144d7bcc /llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
parent3cd37e6456516f87ada06192c108d66cdf6a2d93 (diff)
downloadbcm5719-llvm-6f1ff8e1a8344c297d740c3e95b317a5746abb14.tar.gz
bcm5719-llvm-6f1ff8e1a8344c297d740c3e95b317a5746abb14.zip
Fix crash in AggressiveAntiDepBreaker with empty CriticalPathSet
If no register classes are added to CriticalPathRCs, then the CriticalPathSet bitmask will be empty. In that case, ExcludeRegs must remain NULL or else this line will cause a segfault: } else if ((ExcludeRegs != NULL) && ExcludeRegs->test(AntiDepReg)) { I have no in-tree test case. llvm-svn: 190584
Diffstat (limited to 'llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp')
-rw-r--r--llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
index e0797079c5e..2ee77671158 100644
--- a/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
+++ b/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
@@ -782,7 +782,7 @@ unsigned AggressiveAntiDepBreaker::BreakAntiDependencies(
if (MI == CriticalPathMI) {
CriticalPathSU = CriticalPathStep(CriticalPathSU);
CriticalPathMI = (CriticalPathSU) ? CriticalPathSU->getInstr() : 0;
- } else {
+ } else if (CriticalPathSet.any()) {
ExcludeRegs = &CriticalPathSet;
}
OpenPOWER on IntegriCloud