[SPARC] Implement hooks for conditional branch relaxation
authorKoakuma <koachan@protonmail.com>
Sat, 11 Mar 2023 22:39:25 +0000 (17:39 -0500)
committerBrad Smith <brad@comstyle.com>
Sat, 11 Mar 2023 22:42:09 +0000 (17:42 -0500)
commit24e300190a57c97ce88b42bfd6afc84a79fd15e5
tree287f62cfe98c3d29622f4fb32ff6e5d32ae4e71b
parentef6f23535d4e2b437913b48bdbdef00f000594c2
[SPARC] Implement hooks for conditional branch relaxation

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)

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D142458
llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp
llvm/lib/Target/Sparc/SparcInstrInfo.cpp
llvm/lib/Target/Sparc/SparcInstrInfo.h
llvm/lib/Target/Sparc/SparcInstrInfo.td
llvm/lib/Target/Sparc/SparcTargetMachine.cpp
llvm/test/CodeGen/SPARC/branches-relax.ll [new file with mode: 0644]
llvm/test/CodeGen/SPARC/branches-v9.ll
llvm/test/CodeGen/SPARC/smulo-128-legalisation-lowering.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/sparc_generated_funcs.ll.generated.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/sparc_generated_funcs.ll.nogenerated.expected