diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-07-26 01:32:19 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2017-07-26 01:32:19 +0000 |
commit | 469e740f2b7cc3254b6187f637a4411acc325f12 (patch) | |
tree | 642164f4b60a3415d8cb037d14f148d5b8af41c2 /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 2345dbbd546a1151f75a4be47f0b1b09506cf578 (diff) | |
download | llvm-469e740f2b7cc3254b6187f637a4411acc325f12.zip llvm-469e740f2b7cc3254b6187f637a4411acc325f12.tar.gz llvm-469e740f2b7cc3254b6187f637a4411acc325f12.tar.bz2 |
[SCEV] Remove unnecessary call to forgetMemoizedResults
`SCEVUnknown::allUsesReplacedWith` does not need to call `forgetMemoizedResults`
since RAUW does a value-equivalent replacement by assumption. If this
assumption was false then the later setValPtr(New) call would be incorrect too.
This is a non-trivial performance optimization for functions with a large number
of loops since `forgetMemoizedResults` walks all loop backedge taken counts to
see if any of them use the SCEVUnknown being RAUWed. However, this improvement
is difficult to demonstrate without checking in an excessively large IR file.
llvm-svn: 309072
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions