[all-commits] [llvm/llvm-project] 898bbc: [Attributor] Lazily collect function information

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Apr 15 20:28:54 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 898bbc252a72b950cae138c3cad1e0ec4e17c902
      https://github.com/llvm/llvm-project/commit/898bbc252a72b950cae138c3cad1e0ec4e17c902
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-04-15 (Wed, 15 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp

  Log Message:
  -----------
  [Attributor] Lazily collect function information

Before, we eagerly analyzed all the functions to collect information
about them, e.g. what instructions may read/write memory. This had
multiple drawbacks:
  - In CGSCC-mode we can end up looking at a callee which is not in the
    SCC but for which we need an initialized cache.
  - We end up looking at functions that we deem dead and never need to
    analyze in the first place.
  - We have a implicit dependence which is easy to break.

This patch moves the function analysis into the information cache and
makes it lazy. There is no real functional change expected except due to
the first reason above.




More information about the All-commits mailing list