[all-commits] [llvm/llvm-project] baea66: [IPT] Restructure cache to allow lazy update follo...
Philip Reames via All-commits
all-commits at lists.llvm.org
Thu Oct 21 09:16:43 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: baea663a6e9bc52f80995d02bb8149934c825612
https://github.com/llvm/llvm-project/commit/baea663a6e9bc52f80995d02bb8149934c825612
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-10-21 (Thu, 21 Oct 2021)
Changed paths:
M llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h
M llvm/lib/Analysis/InstructionPrecedenceTracking.cpp
Log Message:
-----------
[IPT] Restructure cache to allow lazy update following invalidation [NFC]
This change restructures the cache used in IPT to point not to the first special instruction, but to the first instruction which *could* be special. That is, the cached reference is always equal to the first special, or comes before it in the block.
This avoids expensive block scans when we are removing special instructions from the beginning of the block. At the moment, this case is not heavily used, though it does trigger in GVN when doing CSE of calls. The main motivation was a change I'm no longer planning to move forward with, but the cache optimization seemed worthwhile as a minor perf win at low cost.
Differential Revision: https://reviews.llvm.org/D111768
More information about the All-commits
mailing list