[all-commits] [llvm/llvm-project] ee928e: [NFC] Add iterator traits to BitVector set_bits_it...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue Mar 21 02:12:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee928e322861085eaf7ea18120eca8a8a4c6201e
      https://github.com/llvm/llvm-project/commit/ee928e322861085eaf7ea18120eca8a8a4c6201e
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M llvm/include/llvm/ADT/BitVector.h

  Log Message:
  -----------
  [NFC] Add iterator traits to BitVector set_bits_iterator

Reviewed By: scott.linder

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


  Commit: d5b2c8e56da07b362c88cf7d3254eabf79323858
      https://github.com/llvm/llvm-project/commit/d5b2c8e56da07b362c88cf7d3254eabf79323858
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp

  Log Message:
  -----------
  [Assignment Tracking][NFC] Use BitVectors as masks for SmallVectors

...rather than using DenseMaps to track per-variable information.

Rather than tracking 3 maps of {VariableID: SomeInfo} per block, use a
BitVector indexed by VariableID to mask 3 vectors of SomeInfo.

BlockInfos now need to be initialised with a call to init which sets the
BitVector width to the number of partially promoted variables in the function
and fills the vectors with Top values.

Prior to this patch, in joinBlockInfo, it was necessary to insert Top values
into the Join result for variables in A XOR B after joining the variables in A
AND B. Now, because the vectors are pre-filled with Top values we need only
join the variables A AND B and set the BitVector of tracked variables to A OR
B.

The patch achieves an average of 0.25% reduction in instructions retired and a
1.1% max-rss for the CTMark suite in LTO-O3-g builds.

Reviewed By: scott.linder

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


Compare: https://github.com/llvm/llvm-project/compare/85bc498826d4...d5b2c8e56da0


More information about the All-commits mailing list