1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/include/llvm/Target
Preston Gurd 0a730de3c3 This patch fixes a problem which arose when using the Post-RA scheduler
on X86 Atom. Some of our tests failed because the tail merging part of
the BranchFolding pass was creating new basic blocks which did not
contain live-in information. When the anti-dependency code in the Post-RA
scheduler ran, it would sometimes rename the register containing
the function return value because the fact that the return value was
live-in to the subsequent block had been lost. To fix this, it is necessary
to run the RegisterScavenging code in the BranchFolding pass.

This patch makes sure that the register scavenging code is invoked
in the X86 subtarget only when post-RA scheduling is being done.
Post RA scheduling in the X86 subtarget is only done for Atom.

This patch adds a new function to the TargetRegisterClass to control
whether or not live-ins should be preserved during branch folding.
This is necessary in order for the anti-dependency optimizations done
during the PostRASchedulerList pass to work properly when doing
Post-RA scheduling for the X86 in general and for the Intel Atom in particular.

The patch adds and invokes the new function trackLivenessAfterRegAlloc()
instead of using the existing requiresRegisterScavenging().
It changes BranchFolding.cpp to call trackLivenessAfterRegAlloc() instead of
requiresRegisterScavenging(). It changes the all the targets that
implemented requiresRegisterScavenging() to also implement
trackLivenessAfterRegAlloc().  

It adds an assertion in the Post RA scheduler to make sure that post RA
liveness information is available when it is needed.

It changes the X86 break-anti-dependencies test to use –mcpu=atom, in order
to avoid running into the added assertion.

Finally, this patch restores the use of anti-dependency checking
(which was turned off temporarily for the 3.1 release) for
Intel Atom in the Post RA scheduler.

Patch by Andy Zhang!

Thanks to Jakob and Anton for their reviews.

llvm-svn: 155395
2012-04-23 21:39:35 +00:00
..
Mangler.h Prune some includes and forward declarations. 2012-03-25 18:09:44 +00:00
Target.td Add documentation comment. 2012-04-20 16:29:46 +00:00
TargetCallingConv.h Minimize #include's and forward-declares in Target. 2011-12-10 22:35:47 +00:00
TargetCallingConv.td Add TableGen support for callee saved registers. 2012-01-17 22:46:58 +00:00
TargetData.h Haven't yet found a nice way to handle TargetData verification in the 2011-10-20 19:24:44 +00:00
TargetELFWriterInfo.h Prune some includes and forward declarations. 2012-03-25 18:09:44 +00:00
TargetFrameLowering.h Prune some includes and forward declarations. 2012-03-25 18:09:44 +00:00
TargetInstrInfo.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
TargetIntrinsicInfo.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
TargetJITInfo.h Prune some includes and forward declarations. 2012-03-25 18:09:44 +00:00
TargetLibraryInfo.h fix pr12559: mark unavailable win32 math libcalls 2012-04-17 23:05:54 +00:00
TargetLowering.h Fix a long standing tail call optimization bug. When a libcall is emitted 2012-04-10 01:51:00 +00:00
TargetLoweringObjectFile.h Prune some includes and forward declarations. 2012-03-25 18:09:44 +00:00
TargetMachine.h Move the TLSModel information into the TargetMachine rather than hiding 2012-04-08 17:20:55 +00:00
TargetOpcodes.h First chunk of MachineInstr bundle support. 2011-12-06 22:12:01 +00:00
TargetOptions.h Comment typo fix. 2012-04-11 08:13:47 +00:00
TargetRegisterInfo.h This patch fixes a problem which arose when using the Post-RA scheduler 2012-04-23 21:39:35 +00:00
TargetSchedule.td Comments about operand cycles and pipeline forwarding pathes. 2010-09-30 22:01:50 +00:00
TargetSelectionDAG.td Improve generated code for extending loads and some trunc stores on ARM. 2012-02-20 09:24:05 +00:00
TargetSelectionDAGInfo.h reimplement memcpy/memmove/memset lowering to use MachinePointerInfo 2010-09-21 05:40:29 +00:00
TargetSubtargetInfo.h Prune some includes and forward declarations. 2012-03-25 18:09:44 +00:00