[all-commits] [llvm/llvm-project] a42fd1: [PredicateInfo] Factor out PredicateInfoBuilder (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Apr 18 13:34:58 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a42fd18d0f7d753eb495650d040a3fe0837dba6b
      https://github.com/llvm/llvm-project/commit/a42fd18d0f7d753eb495650d040a3fe0837dba6b
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-04-18 (Sat, 18 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/PredicateInfo.h
    M llvm/lib/Transforms/Utils/PredicateInfo.cpp

  Log Message:
  -----------
  [PredicateInfo] Factor out PredicateInfoBuilder (NFC)

When running IPSCCP on a module with many small functions, memory
usage is dominated by PredicateInfo, which is a huge structure
(partially due to some unfortunate nested SmallVector use). However,
most of it is actually only temporary state needed to build
predicate info, and does not need to be retained after initial
construction.

This patch factors out the predicate building logic and state
into a separate PrediceInfoBuilder, with the extra bonus that
it does not need to live in the header anymore.

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




More information about the All-commits mailing list