[PATCH] D54462: [IPT] Drop cache less eagerly in GVN and LoopSafetyInfo

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 12 19:51:06 PST 2018


mkazantsev created this revision.
mkazantsev added reviewers: chandlerc, john.brawn, efriedma, reames.

Current strategy of dropping `InstructionPrecedenceTracking` cache is to
invalidate the entire basic block whenever we change its contents. In fact,
`InstructionPrecedenceTracking` has 2 internal strictures: `OrderedInstructions`
that is needed to be invalidated whenever the contents changes, and the map
with first special instructions in block. This second map does not need an
update if we add/remove a non-special instuction because it cannot
affect the contents of this map.

This patch changes API of `InstructionPrecedenceTracking` so that it now
accounts for reasons under which we invalidate blocks. This should lead
to much less recalculations the map and should save us some compile time
because in practice we don't typically add/remove special instructions.


https://reviews.llvm.org/D54462

Files:
  include/llvm/Analysis/InstructionPrecedenceTracking.h
  include/llvm/Analysis/MustExecute.h
  lib/Analysis/InstructionPrecedenceTracking.cpp
  lib/Analysis/MustExecute.cpp
  lib/Transforms/Scalar/GVN.cpp
  lib/Transforms/Scalar/LICM.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54462.173807.patch
Type: text/x-patch
Size: 5810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181113/b966fbcf/attachment.bin>


More information about the llvm-commits mailing list