mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Disable the use of TBAA when using AA in CodeGen
There are currently two issues, of which I currently know, that prevent TBAA from being correctly usable in CodeGen: 1. Stack coloring does not update TBAA when merging allocas. This is easy enough to fix, but is not the largest problem. 2. CGP inserts ptrtoint/inttoptr pairs when sinking address computations. Because BasicAA does not handle inttoptr, we'll often miss basic type punning idioms that we need to catch so we don't miscompile real-world code (like LLVM). I don't yet have a small test case for this, but this fixes self hosting a non-asserts build of LLVM on PPC64 when using -enable-aa-sched-mi and -misched=shuffle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -553,6 +553,13 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) {
|
||||
if (!V)
|
||||
continue;
|
||||
|
||||
// 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. When doing this, we'll need to use
|
||||
// the same variant of GetUnderlyingObjects that is used by the
|
||||
// instruction scheduler (that can look through ptrtoint/inttoptr
|
||||
// pairs).
|
||||
|
||||
// We've replaced IR-level uses of the remapped allocas, so we only
|
||||
// need to replace direct uses here.
|
||||
if (!isa<AllocaInst>(V))
|
||||
|
Reference in New Issue
Block a user