summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorLi Huang <lihuang916@gmail.com>2016-10-21 20:05:21 +0000
committerLi Huang <lihuang916@gmail.com>2016-10-21 20:05:21 +0000
commitfaa857dba7426af47269fad1e5feba19050c2d58 (patch)
tree607e6ceb8721daa856d99837e68e07f0dea1e139 /clang/lib/Frontend/CompilerInvocation.cpp
parent2f9d8d07022fbc9884b4da84a934f06648736503 (diff)
downloadbcm5719-llvm-faa857dba7426af47269fad1e5feba19050c2d58.tar.gz
bcm5719-llvm-faa857dba7426af47269fad1e5feba19050c2d58.zip
[SCEV] Memoize visitMulExpr results in SCEVRewriteVisitor.
Summary: When SCEVRewriteVisitor traverses the SCEV DAG, it may visit the same SCEV multiple times if this SCEV is referenced by multiple other SCEVs. This has exponential time complexity in the worst case. Memoizing the results will avoid re-visiting the same SCEV. Add a map to save the results, and override the visit function of SCEVVisitor. Now SCEVRewriteVisitor only visit each SCEV once and thus returns the same result for the same input SCEV. This patch fixes PR18606, PR18607. Reviewers: Sanjoy Das, Mehdi Amini, Michael Zolotukhin Differential Revision: https://reviews.llvm.org/D25810 llvm-svn: 284868
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud