[PATCH] D32663: [SCEV] createAddRecFromPHI: Optimize for the most common case.
Michael Zolotukhin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 16:13:15 PDT 2017
mzolotukhin created this revision.
The existing implementation creates a symbolic SCEV expression every
time we analyze a phi node and then has to remove it, when the analysis
is finished. This is very expensive, and in most of the cases it's also
unnecessary. According to the data I collected, ~60-70% of analyzed phi
nodes (measured on SPEC) have the following form:
PN = phi(Start, OP(Self, Constant))
Handling such cases separately significantly speeds this up.
https://reviews.llvm.org/D32663
Files:
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32663.97171.patch
Type: text/x-patch
Size: 3823 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170428/a4c78cf6/attachment.bin>
More information about the llvm-commits
mailing list