[all-commits] [llvm/llvm-project] d3366e: [LV] Simplify register usage code and avoid double...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Oct 14 11:57:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3366efd436dfc121d9d2f021c51832a800a8cd9
      https://github.com/llvm/llvm-project/commit/d3366efd436dfc121d9d2f021c51832a800a8cd9
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  [LV] Simplify register usage code and avoid double map lookups. NFC

Instead of checking whether a map entry exists to decide if we should
initialize it or add to it, we can rely on the map entry being constructed
and initialized to 0 before the addition happens.

For the std::max case, I've made a reference to the map entry to
avoid looking it up twice.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D135977




More information about the All-commits mailing list