Use GetUnderlyingObjects in misched
authorHal Finkel <hfinkel@anl.gov>
Mon, 10 Dec 2012 18:49:16 +0000 (18:49 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 10 Dec 2012 18:49:16 +0000 (18:49 +0000)
commitf21831073ca474601620d1a29258176b0deaedb2
tree86c2d9e07cba35f61163289d73719f7cbdcfc7f8
parent2bf786af90b8c3826974b2a9deea5e8081ebf113
Use GetUnderlyingObjects in misched

misched used GetUnderlyingObject in order to break false load/store
dependencies, and the -enable-aa-sched-mi feature similarly relied on
GetUnderlyingObject in order to ensure it is safe to use the aliasing analysis.
Unfortunately, GetUnderlyingObject does not recurse through phi nodes, and so
(especially due to LSR) all of these mechanisms failed for
induction-variable-dependent loads and stores inside loops.

This change replaces uses of GetUnderlyingObject with GetUnderlyingObjects
(which will recurse through phi and select instructions) in misched.

Andy reviewed, tested and simplified this patch; Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169744 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ScheduleDAGInstrs.cpp
test/CodeGen/PowerPC/s000-alias-misched.ll [new file with mode: 0644]