Page MenuHomePhabricator

[SPARC] Implement hooks for conditional branch relaxation

Authored by koakuma on Jan 24 2023, 5:16 AM.



Integrate the BranchRelaxation pass to help with relaxing out-of-range conditional branches.

This is mostly of concern for SPARCv9, which uses conditional branches with much smaller range than its v8 counterparts.
(Some large autogenerated code, such as the ones generated by TableGen, already hits this limitation when building in Release)

Diff Detail

Event Timeline

koakuma created this revision.Jan 24 2023, 5:16 AM
koakuma requested review of this revision.Jan 24 2023, 5:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 5:16 AM
arsenm accepted this revision.Feb 2 2023, 6:27 PM
arsenm added inline comments.


This revision is now accepted and ready to land.Feb 2 2023, 6:27 PM
koakuma updated this revision to Diff 494494.Feb 2 2023, 7:26 PM
  • Use MI.isInlineAsm() as suggested
  • Clean up unnecessary changes
jrtc27 added inline comments.Feb 2 2023, 7:27 PM

These are all double what I'd expect?

koakuma added inline comments.Feb 2 2023, 7:43 PM

Yes, I'm also including the delay slots here, like in getInstSizeInBytes.

arsenm added inline comments.Feb 13 2023, 11:25 AM

Don't check the global subtarget, just unconditionally enable the pass

koakuma updated this revision to Diff 497220.Feb 14 2023, 12:01 AM

Update as suggested, remove the conditional on target.

koakuma updated this revision to Diff 497277.Feb 14 2023, 4:53 AM

Update update_llc_test_checks testcases.

arsenm accepted this revision.Sat, Mar 11, 4:32 AM
This revision was landed with ongoing or failed builds.Sat, Mar 11, 2:42 PM
This revision was automatically updated to reflect the committed changes.