This is an archive of the discontinued LLVM Phabricator instance.

RegUsageInfoCollector: Skip AMDGPU entry point functions
ClosedPublic

Authored by arsenm on Jul 5 2019, 1:34 PM.

Details

Reviewers
MatzeB
qcolombet
Summary

I'm not sure if it's worth it or not to add a hook to disable the pass
for an arbitrary function.

This pass is taking up to 5% of compile time in tiny programs by
iterating through all of the physical registers in every register
class. This pass should be rewritten in terms of regunits. For now,
skip doing anything for entry point functions. The vast majority of
functions in the real world aren't callable, so just not running this
will give the majority of the benefit.

Diff Detail

Event Timeline

arsenm created this revision.Jul 5 2019, 1:34 PM
arsenm updated this revision to Diff 208234.Jul 5 2019, 1:53 PM

Test fix

qcolombet accepted this revision.Jul 5 2019, 3:44 PM

Let's go with that for now with one caveat. Does the code build without ANDGPU?
I.e., does the callingconv enum get generated?

If there is a need for another target to do the same thing we can revisit.

Agree for the regunit rewrite!

This revision is now accepted and ready to land.Jul 5 2019, 3:44 PM
arsenm added a comment.Jul 5 2019, 4:12 PM

Let's go with that for now with one caveat. Does the code build without ANDGPU?
I.e., does the callingconv enum get generated?

If there is a need for another target to do the same thing we can revisit.

Agree for the regunit rewrite!

Yes, the calling convention enums are defined and used everywhere

arsenm closed this revision.Jul 5 2019, 4:33 PM

r365255