[PATCH] D111768: [IPT] Restructure cache to allow lazy update following invalidation

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 16:39:38 PDT 2021


reames created this revision.
reames added reviewers: mkazantsev, aeubanks, nikic.
Herald added subscribers: bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111768

Files:
  llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h
  llvm/lib/Analysis/InstructionPrecedenceTracking.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111768.379552.patch
Type: text/x-patch
Size: 4331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211013/7f96c61a/attachment.bin>


More information about the llvm-commits mailing list