[llvm] [Xtensa] Implement support for the BranchRelaxation. (PR #113450)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 16:24:36 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) {
----------------
arsenm wrote:

Account for block (and function) alignment? 

https://github.com/llvm/llvm-project/pull/113450


More information about the llvm-commits mailing list