1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Transforms
Wei Mi e25039a021 [GVN] Verify value equality before doing phi translation for call instruction
This is an updated version of https://reviews.llvm.org/D66909 to fix PR42605.

Basically, current phi translatation translates an old value number to an new
value number for a call instruction based on the literal equality of call
expression, without verifying there is no clobber in between. This is incorrect.

To get a finegrain check, use MachineDependence analysis to do the job. However,
this is still not ideal. Although given a call instruction,
`MemoryDependenceResults::getCallDependencyFrom` returns identical call
instructions without clobber in between using MemDepResult with its DepType to
be `Def`. However, identical is too strict here and we want it to be relaxed a
little to consider phi-translation -- callee is the same, param operands can be
different. That means changing the semantic of `MemDepResult::Def` and I don't
know the potential impact.

So currently the patch is still conservative to only handle
MemDepResult::NonFuncLocal, which means the current call has no function local
clobber. If there is clobber, even if the clobber doesn't stand in between the
current call and the call with the new value, we won't do phi-translate.

Differential Revision: https://reviews.llvm.org/D67013

llvm-svn: 370547
2019-08-30 23:01:22 +00:00
..
AggressiveInstCombine Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Coroutines [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Hello Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InstCombine [InstCombine][AMDGPU] Simplify tbuffer loads 2019-08-30 14:20:04 +00:00
Instrumentation [ASan] Make insertion of version mismatch guard configurable 2019-08-28 20:40:55 +00:00
IPO [Attributor] Fix: do not pretend to preserve the CFG 2019-08-30 16:35:10 +00:00
ObjCARC [ObjC][ARC] Delete ObjC runtime calls on global variables annotated 2019-06-14 22:06:32 +00:00
Scalar [GVN] Verify value equality before doing phi translation for call instruction 2019-08-30 23:01:22 +00:00
Utils Revert enabling MemorySSA. 2019-08-29 19:01:23 +00:00
Vectorize [LV] Fold tail by masking - handle reductions 2019-08-28 09:02:23 +00:00
CMakeLists.txt
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00