mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Reenable use of TBAA during CodeGen
We had disabled use of TBAA during CodeGen (even when otherwise using AA) because the ptrtoint/inttoptr used by CGP for address sinking caused BasicAA to miss basic type punning that it should catch (and, thus, we'd fail to override TBAA when we should). However, when AA is in use during CodeGen, CGP now uses normal GEPs and bitcasts, instead of ptrtoint/inttoptr, when doing address sinking. As a result, BasicAA should be able to make us do the right thing in the face of type-punning, and it seems safe to enable use of TBAA again. self-hosting seems fine on PPC64/Linux on the P7, with TBAA enabled and -misched=shuffle. Note: We still don't update TBAA when merging stack slots, although because BasicAA should now catch all such cases, this is no longer a blocking issue. Nevertheless, I plan to commit code to deal with this properly in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -45,14 +45,8 @@ static cl::opt<bool> EnableAASchedMI("enable-aa-sched-mi", cl::Hidden,
|
||||
cl::ZeroOrMore, cl::init(false),
|
||||
cl::desc("Enable use of AA during MI GAD construction"));
|
||||
|
||||
// FIXME: Enable the use of TBAA. There are two known issues preventing this:
|
||||
// 1. Stack coloring does not update TBAA when merging allocas
|
||||
// 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.
|
||||
static cl::opt<bool> UseTBAA("use-tbaa-in-sched-mi", cl::Hidden,
|
||||
cl::init(false), cl::desc("Enable use of TBAA during MI GAD construction"));
|
||||
cl::init(true), cl::desc("Enable use of TBAA during MI GAD construction"));
|
||||
|
||||
ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf,
|
||||
const MachineLoopInfo &mli,
|
||||
|
Reference in New Issue
Block a user