OSDN Git Service

[StackColoring] Update AliasAnalysis information in stack coloring pass
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Tue, 1 Aug 2017 03:32:15 +0000 (03:32 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Tue, 1 Aug 2017 03:32:15 +0000 (03:32 +0000)
commiteeca49d1ac55e25d607bb6abe5abd04ff9e77de9
tree29e91386f520d7eb8d21e8dabd5573b81d974003
parentc19eec32627989457c78dbfd91f79c3be1b99422
[StackColoring] Update AliasAnalysis information in stack coloring pass

Stack coloring pass need to maintain AliasAnalysis information when merging stack slots of different types.
Actually, there is a FIXME comment in StackColoring.cpp

// FIXME: In order to enable the use of TBAA when using AA in CodeGen,
// we'll also need to update the TBAA nodes in MMOs with values
// derived from the merged allocas.

But, TBAA has been already enabled in CodeGen without fixing this pass.
The incorrect TBAA metadata results in recent failures in bootstrap test on ppc64le (PR33928) by allowing unsafe instruction scheduling.
Although we observed the problem on ppc64le, this is a platform neutral issue.

This patch makes the stack coloring pass maintains AliasAnalysis information when merging multiple stack slots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309651 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ValueTracking.h
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineInstr.h
lib/Analysis/ValueTracking.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/CodeGen/StackColoring.cpp