Usually large blocks are not a problem. But if a large block (> 10k instructions) contains many (potential) chains of vector instructions, and those chains are spread over a wide range of instructions, then scheduling becomes a compile time problem.
This patch introduces a limit for the accumulate scheduling region size of a block.
For real-world functions this limit will never be exceeded (it's about 10x larger than the maximum value seen in the test-suite and external test suite).
Details
- Reviewers
mzolotukhin aschwaighofer
Diff Detail
Event Timeline
Hi Erik,
Could we add a cl::opt to specify this threshold? That would also help writing a test for the change, as we can use a lower threshold there.
Thanks,
Michael
Add an option to set the scheduling budget + a test which uses that option.
Thanks, Michael, for the suggestion.
LGTM, thanks!
BTW, would it make sense to add a test to check that we properly use MinScheduleRegionSize too?
Thanks,
Michael
Thanks for reviewing!
I committed it in r248917.
BTW, would it make sense to add a test to check that we properly use MinScheduleRegionSize too?
It's not so important than checking that everything does well when the limit is exceeded. But yes, why not?
I'll add a test in a separate commit.
BTW, would it make sense to add a test to check that we properly use MinScheduleRegionSize too?
added in r248923