[all-commits] [llvm/llvm-project] 9cad0b: [CodeGen] Compute call frame sizes instead of stor...

Fabian Ritter via All-commits all-commits at lists.llvm.org
Mon Sep 16 00:26:33 PDT 2024


  Branch: refs/heads/users/ritter-x2a/track-zero-sized-call-frames-in-machinebb
  Home:   https://github.com/llvm/llvm-project
  Commit: 9cad0b2f053bceedc1366bb7f52d71fe662f9bf5
      https://github.com/llvm/llvm-project/commit/9cad0b2f053bceedc1366bb7f52d71fe662f9bf5
  Author: Fabian Ritter <fabian.ritter at amd.com>
  Date:   2024-09-16 (Mon, 16 Sep 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineBasicBlock.h
    M llvm/include/llvm/CodeGen/MachineFrameInfo.h
    M llvm/include/llvm/CodeGen/TargetInstrInfo.h
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.h
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MachineBasicBlock.cpp
    M llvm/lib/CodeGen/MachineFrameInfo.cpp
    M llvm/lib/CodeGen/MachineVerifier.cpp
    M llvm/lib/CodeGen/PrologEpilogInserter.cpp
    M llvm/lib/CodeGen/TargetInstrInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/AVR/AVRISelLowering.cpp
    M llvm/lib/Target/M68k/M68kISelLowering.cpp
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/ARM/no-register-coalescing-in-returnsTwice.mir
    M llvm/test/CodeGen/MIR/ARM/call-frame-size.mir
    M llvm/test/CodeGen/RISCV/pr97304.ll
    M llvm/tools/llvm-reduce/ReducerWorkItem.cpp

  Log Message:
  -----------
  [CodeGen] Compute call frame sizes instead of storing them in MachineBBs

Previously, we would need to update stored call frame sizes whenever a
MachineBB with a call sequence is split or call frame instructions are
moved. By recomputing them instead, this change avoids the need for
keeping track of the call frame sizes throughout transformations. It
also fixes several cases where updates of call frame sizes were missing.

The overhead according to the compile time tracker is < +0.03% executed
instructions on all CT benchmarks.

This also allows distinguishing a zero-sized call frame from no open
call frame, which is helpful to avoid nested CALLSEQs (which are illegal
and cause machine verifier errors).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list