[all-commits] [llvm/llvm-project] a4834a: RegisterCoalescer: Shrink main range after shrinki...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Jul 29 06:14:34 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4834ad06880740ee289681ea8b5844caceaa1c6
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/RegisterCoalescer.cpp
    A llvm/test/CodeGen/AMDGPU/coalesce-into-dead-subreg-copies.mir
    M llvm/test/CodeGen/AMDGPU/loop-live-out-copy-undef-subrange.ll

  Log Message:
  RegisterCoalescer: Shrink main range after shrinking subranges

If the subregister uses were dead, this would leave the main range
segment pointing to a deleted instruction.

Not sure if this should try to avoid shrinking if we know we don't
have dead components.

  Commit: ef906f287e7d9ae318d4dec8d1516bf039aa1f32
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
    A llvm/test/CodeGen/AMDGPU/resource-usage-dead-function.ll

  Log Message:
  AMDGPU: Fix assertion when printing unreachable functions

Since 814a0abccefdd2e52b1b507f21ce842b689dbedd, this would break if we
had a function in the module that becomes dead in any codegen IR
pass. The function wasn't deleted since it was initially used in dead
code, but is detached from the call graph and doesn't appear in the PO
traversal. Do a second walk over the module to populate the resources
of any functions which weren't already processed.

Compare: https://github.com/llvm/llvm-project/compare/b25902736c2e...ef906f287e7d

More information about the All-commits mailing list