| Issue |
52858
|
| Summary |
[DAGCombiner] Compile time blow up after enqueuing additional TokenFactor-s
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
last5bits
|
Commit in question:
```
commit d6351340bb9bf7703fb79629efdba5886d434694
Author: Nirav Dave <[email protected]>
Date: Wed Mar 13 17:07:09 2019 +0000
[DAGCombiner] If a TokenFactor would be merged into its user, consider the user later.
SDValue DAGCombiner::visitTokenFactor(SDNode *N) {
...
// If the sole user is a token factor, we should make sure we have a
// chance to merge them together. This prevents TF chains from inhibiting
// optimizations.
if (N->hasOneUse() && N->use_begin()->getOpcode() == ISD::TokenFactor)
AddToWorklist(*(N->use_begin()));
```
Enqueuing these additional `TokenFactor`-s leads to compile time blow up in some cases:
| | before | after |
| ------------- | ------------- | ------------- |
| time | .7s | 103s |
| # of nodes combined | 8,029 | 1,365,331 |
| # times a TokenFactor was visited | 8,824 | 1,447,721 |
Test case attached. Command line to run:
```
llc -O2 dagcombine-compile-time-blow-up.ll
```
[dagcombine-compile-time-blow-up.zip](https://github.com/llvm/llvm-project/files/7771278/dagcombine-compile-time-blow-up.zip)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs