[all-commits] [llvm/llvm-project] e6d3a4: [CodeGen] Use SmallVector for FixedStackPSVs (#91760)

aengelke via All-commits all-commits at lists.llvm.org
Tue May 14 04:13:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e6d3a4212d20b49a8e63f11fedea79cccf261479
      https://github.com/llvm/llvm-project/commit/e6d3a4212d20b49a8e63f11fedea79cccf261479
  Author: aengelke <engelke at in.tum.de>
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/PseudoSourceValueManager.h
    M llvm/lib/CodeGen/PseudoSourceValue.cpp

  Log Message:
  -----------
  [CodeGen] Use SmallVector for FixedStackPSVs (#91760)

Frame indices are dense and consecutive, so use a vector instead of a
std::map. Due to possibly negative frame indices, use zig-zag encoding.
IndexedMap was not usable, as it attempted to copy the null value, which
is not possible with a std::unique_ptr.

This is just a minor performance improvement, but a low-hanging fruit.



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