aengelke wrote:

> Adding this threshold check within isTrellis() feels somewhat unnatural. If 
> compile time is a concern, could we simply check the size of functions (in 
> terms of the number of blocks, as opposed to predecessor only) early in this 
> pass and either skip it or switch to a faster, simpler algorithm?

Is such an algorithm already implemented and readily available or would it 
require implementing a new algorithm? (I would prefer to keep changes locally 
and not abruptly degrade/change the output of the entire function, so I placed 
the checks as closely to the relevant points.)

> Also 1000 size seems small, may be 10000?

Some measurement data, left without this patch, right with. 1000 is the region 
were it becomes somewhat noticeable and at 3000 blocks, can already end up with 
~2x change of compile time... a threshold of 10k would be way too high in my 
opinion.

```
500:   0.06  0.06
1000:  0.11  0.09
2000:  0.26  0.18
3000:  0.49  0.27
4000:  0.70  0.37
5000:  1.14  0.47
10000: 3.86  1.09
```

https://github.com/llvm/llvm-project/pull/142584
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to