[PATCH] D35907: [WIP] Update TBAA information in stack coloring pass

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 11:00:49 PDT 2017


inouehrs created this revision.

Stack coloring pass need to maintain TBAA metadata 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 TBAA metadata (somewhat conservatively) when merging multiple stack slots.

This patch fixes PR33928 <https://bugs.llvm.org/show_bug.cgi?id=33928>.


https://reviews.llvm.org/D35907

Files:
  include/llvm/CodeGen/MachineFunction.h
  include/llvm/CodeGen/MachineInstr.h
  lib/CodeGen/MachineFunction.cpp
  lib/CodeGen/StackColoring.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35907.108323.patch
Type: text/x-patch
Size: 9352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170726/1e54c731/attachment.bin>


More information about the llvm-commits mailing list