[CSSPGO] Unblock optimizations with pseudo probe instrumentation part 2.
authorHongtao Yu <hoy@fb.com>
Mon, 26 Apr 2021 16:12:29 +0000 (09:12 -0700)
committerHongtao Yu <hoy@fb.com>
Mon, 26 Apr 2021 23:52:33 +0000 (16:52 -0700)
commit30bb5be38908b0006ed94124515e43774ee37915
treebd578b3c6415bf69316c31e41ee98f2494495501
parent18839be9c5c8b9f882dd241769784035b082d4e1
[CSSPGO] Unblock optimizations with pseudo probe instrumentation part 2.

As a follow-up to D95982, this patch continues unblocking optimizations that are blocked by pseudu probe instrumention.

The optimizations unblocked are:
- In-block load propagation.
- In-block dead store elimination
- Memory copy optimization that turns stores to consecutive memories into a memset.

These optimizations are local to a block, so they shouldn't affect the profile quality.

Reviewed By: wmi

Differential Revision: https://reviews.llvm.org/D100075
llvm/lib/Analysis/Loads.cpp
llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
llvm/lib/Transforms/Scalar/Sink.cpp
llvm/test/Transforms/SampleProfile/pseudo-probe-instcombine.ll
llvm/test/Transforms/SampleProfile/pseudo-probe-memset.ll [new file with mode: 0644]