forked from OSchip/llvm-project
Fix a severe compile time problem when forming large SCEV expressions.
This fix is very lightweight. The same fix already existed for AddRec but was missing for NAry expressions. This is obviously an improvement and I'm unsure how to test compile time problems. Patch by Xiaoyi Guo! llvm-svn: 187475
This commit is contained in:
parent
080cad730a
commit
c3bc8b8de6
|
@ -585,6 +585,9 @@ namespace {
|
|||
|
||||
// Lexicographically compare n-ary expressions.
|
||||
unsigned LNumOps = LC->getNumOperands(), RNumOps = RC->getNumOperands();
|
||||
if (LNumOps != RNumOps)
|
||||
return (int)LNumOps - (int)RNumOps;
|
||||
|
||||
for (unsigned i = 0; i != LNumOps; ++i) {
|
||||
if (i >= RNumOps)
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue