[PATCH] D28629: [SCEV] Limit recursion depth of constant evolving
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 08:44:56 PST 2017
hliao added a comment.
I collected the maximum depth of 'getConstantEvolvingPHIOperands' when it returns successfully or otherwise. Here is the statistics collected on SingleSource, MultiSource, and External (spec2000 and spec2006).
- when 'getConstantEvolvingPHIOperands' returns null
| MAX-DEPTH-PER-CUNIT | NUM-OF-CUNITS |
| ------------------- | ------------- |
| 0 | 103 |
| 1 | 169 |
| 2 | 653 |
| 3 | 187 |
| 4 | 145 |
| 5 | 76 |
| 6 | 65 |
| 7 | 18 |
| 8 | 94 |
| 9 | 5 |
| 10 | 12 |
| 11 | 10 |
| 12 | 5 |
| 13 | 3 |
- when 'getConstantEvolvingPHIOperands' return non-null
| MAX-DEPTH-PER-CUNIT | NUM-OF-CUNITS |
| ------------------- | ------------- |
| 0 | 159 |
| 1 | 323 |
| 2 | 502 |
| 3 | 218 |
| 4 | 546 |
| 5 | 167 |
| 6 | 100 |
| 7 | 49 |
| 8 | 432 |
| 9 | 46 |
| 10 | 29 |
| 11 | 10 |
| 12 | 4 |
| 13 | 10 |
| 16 | 1 |
| 17 | 3 |
| 18 | 1 |
| 19 | 1 |
It sounds to me that 32 is a reasonable choice.
Repository:
rL LLVM
https://reviews.llvm.org/D28629
More information about the llvm-commits
mailing list