[all-commits] [llvm/llvm-project] 14eea6: [LegacyPM] Update InversedLastUser on the fly. NFC.

Jay Foad via All-commits all-commits at lists.llvm.org
Fri Jan 22 01:49:22 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14eea6b0ecddfe7d1c68754a8bfb7c21cde82df8
      https://github.com/llvm/llvm-project/commit/14eea6b0ecddfe7d1c68754a8bfb7c21cde82df8
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/include/llvm/IR/LegacyPassManagers.h
    M llvm/lib/IR/LegacyPassManager.cpp

  Log Message:
  -----------
  [LegacyPM] Update InversedLastUser on the fly. NFC.

This speeds up setLastUser enough to give a 5% to 10% speed up on
trivial invocations of opt and llc, as measured by:

perf stat -r 100 opt -S -o /dev/null -O3 /dev/null
perf stat -r 100 llc -march=amdgcn /dev/null -filetype null

Don't dump last use information unless -debug-pass=Details to avoid
printing lots of spam that will break some existing lit tests. Before
this patch, dumping last use information was broken anyway, because it
used InversedLastUser before it had been populated.

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




More information about the All-commits mailing list