[all-commits] [llvm/llvm-project] b99a5e: [DSE, MemorySSA] Delay PointerMayBeCaptured calls u...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Mon Aug 24 06:06:24 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b99a5eb659c1965fc4f25a3020a358cae298ec5f
https://github.com/llvm/llvm-project/commit/b99a5eb659c1965fc4f25a3020a358cae298ec5f
Author: Florian Hahn <flo at fhahn.com>
Date: 2020-08-24 (Mon, 24 Aug 2020)
Changed paths:
M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-captures.ll
Log Message:
-----------
[DSE,MemorySSA] Delay PointerMayBeCaptured calls until actually needed.
Avoid computing InvisibleToCallerBefore/AfterRet up front. In most
cases, this information is not really needed. Instead, introduce helper
functions to compute and cache the result on demand.
Notably, this also does not use PointerMayBeCapturedBefore for
isInvisibleToCallerBeforeRet, as it requires the killing MemoryDef as
starting instruction, making the caching ineffective. But it appears the
use of PointerMayBeCapturedBefore has very limited benefits in practice
(e.g. on SPEC2000/SPEC2006/MultiSource there are no binary changes with
-O3 -flto). Refrain from using it for now, to limit-compile-time.
This gives some nice compile-time improvements:
http://llvm-compile-time-tracker.com/compare.php?from=db9345f6810f379a36752dc52caf5230585d0ebd&to=b4d091047e1b8a3d377d200137b79d03aca65663&stat=instructions
More information about the All-commits
mailing list