[all-commits] [llvm/llvm-project] 1a65d9: [CodeGen][RAGreedy] Inform LiveDebugVariables abou...

Bevin Hansson via All-commits all-commits at lists.llvm.org
Wed Oct 2 01:30:19 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a65d95d0056ce98f94944ff1fd5309242fd5f28
      https://github.com/llvm/llvm-project/commit/1a65d95d0056ce98f94944ff1fd5309242fd5f28
  Author: Bevin Hansson <59652494+bevin-hansson at users.noreply.github.com>
  Date:   2024-10-02 (Wed, 02 Oct 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/Spiller.h
    M llvm/lib/CodeGen/InlineSpiller.cpp
    M llvm/lib/CodeGen/RegAllocGreedy.cpp
    A llvm/test/CodeGen/X86/debug-spilled-snippet.ll
    A llvm/test/CodeGen/X86/debug-spilled-snippet.mir

  Log Message:
  -----------
  [CodeGen][RAGreedy] Inform LiveDebugVariables about snippets spilled by InlineSpiller. (#109962)

RAGreedy invokes InlineSpiller to spill a particular virtreg inline.
When the spiller does this, it also identifies small, adjacent liveranges called
snippets. These are also spilled or rematerialized in the process.

However, the spiller does not inform RA that it has spilled these regs.
This means that debug variable locations referencing these regs/ranges
are lost.

Mark any spilled regs which do not have a stack slot assigned to them as
allocated to the slot being spilled to to tell LDV that those regs are
located in that slot, even though the regs might no longer exist in the
program after regalloc is finished. Also, inform RA about all of the
regs which were replaced (spilled or rematted), not just the one that was
requested so that it can properly manage the ranges of the debug vars.



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