ScheduleDAGInstrs: In functions with tail calls PseudoSourceValues are not non-aliasi...
authorArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 8 May 2015 23:52:00 +0000 (23:52 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Fri, 8 May 2015 23:52:00 +0000 (23:52 +0000)
commit75e36e847e04a671c9de955ad01ba0a3327b2247
tree56d362616055ee964e27f6666168396829f779fa
parent19d2499d6a592c2643f02b98b74edb3e74d887bb
ScheduleDAGInstrs: In functions with tail calls PseudoSourceValues are not non-aliasing distinct objects

The code that builds the dependence graph assumes that two PseudoSourceValues
don't alias. In a tail calling function two FixedStackObjects might refer to the
same location. Worse 'immutable' fixed stack objects like function arguments are
not immutable and will be clobbered.

Change this so that a load from a FixedStackObject is not invariant in a tail
calling function and don't return a PseudoSourceValue for an instruction in tail
calling functions when building the dependence graph so that we handle function
arguments conservatively.

Fix for PR23459.

rdar://20740035

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236916 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineFrameInfo.h
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/Hexagon/HexagonISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/AArch64/tailcall_misched_graph.ll [new file with mode: 0644]
test/CodeGen/ARM/debug-frame.ll
test/CodeGen/ARM/ehabi.ll
test/CodeGen/X86/tailcallstack64.ll