[PATCH] D78283: [MustExecute] Use MustBeExecutedInterval to eliminate work duplication

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 01:34:09 PDT 2020


jdoerfert created this revision.
jdoerfert added reviewers: fhahn, lebedev.ri, uenoku, sstefan1, hfinkel.
Herald added subscribers: bollu, hiraditya.
Herald added a project: LLVM.

Must be executed intervals are stretches of instructions that are
guaranteed to be executed together without any other instruction
executed in-between. In addition, an interval `I` can end in a link into
another interval `J`. This means that the instructions of the interval
`J`, starting from the position the link points to, are always executed
before or respectively after the instruction in `I`. Note that there
might be other instructions executed in-between linked intervals.

With this patch the must-be-executed-context explorer will created an
overlay of the CFG using partially connected intervals. In contrast to
the old scheme, we do not need to recompute join points or next/previous
instructions more than once, the information is part of the interval
web. Furthermore, iterators are changed to be lightweight, only
containing the position on the forward and backward web of intervals as
well as pointer to the explorer. The latter could potentially be
removed as well.

The interface of the explorer was changed because the users do not need
to create and hold on to iterators anymore.

Early test results show significant improvements wrt. compile time and
no changes to the context.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78283

Files:
  llvm/include/llvm/Analysis/MustExecute.h
  llvm/lib/Analysis/MustExecute.cpp
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78283.257984.patch
Type: text/x-patch
Size: 40715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/f2bf9bd8/attachment.bin>


More information about the llvm-commits mailing list