[llvm] [Xtensa] Implement support for the BranchRelaxation. (PR #113450)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 11:10:49 PDT 2024
================
@@ -255,19 +256,42 @@ void XtensaFrameLowering::determineCalleeSaves(MachineFunction &MF,
SavedRegs.set(FP);
}
+static unsigned estimateFunctionSizeInBytes(const MachineFunction &MF,
+ const XtensaInstrInfo &TII) {
+ unsigned FnSize = 0;
+ for (auto &MBB : MF) {
+ for (auto &MI : MBB) {
----------------
andreisfr wrote:
Thank you very much for comment. I've implemented function size calculation like it is done in BranchRelaxation. Also I corrected insertIndirectBranch function.
https://github.com/llvm/llvm-project/pull/113450
More information about the llvm-commits
mailing list