[all-commits] [llvm/llvm-project] 98286a: [llvm][CycleInfo] Quick look-up for block in cycle.

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Tue Mar 28 23:39:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98286a04ef0af46279cf11b1e2c133e978d4224f
      https://github.com/llvm/llvm-project/commit/98286a04ef0af46279cf11b1e2c133e978d4224f
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M llvm/include/llvm/ADT/GenericCycleImpl.h
    M llvm/include/llvm/ADT/GenericCycleInfo.h
    M llvm/include/llvm/ADT/SetVector.h
    M llvm/include/llvm/ADT/SmallSet.h
    M llvm/unittests/ADT/SetVectorTest.cpp

  Log Message:
  -----------
  [llvm][CycleInfo] Quick look-up for block in cycle.

Use a SetVector to store blocks in a cycle to ensure a quick loop-up when
querying whether the cycle contains a given block. This is along the same lines
as the SmallPtrSet in LoopBase, introduced by commit
be640b28c0cb81b77015baaef20ca2941fc61dea.

To make this work, we also enhance SetVector to support vector operations with
pointers and set operations with const pointers in the same container.

Reviewed By: foad

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




More information about the All-commits mailing list