mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-18 09:09:12 +00:00
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
9c91031558
commit
c14d596ae6
@ -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
Block a user