1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

8035 Commits

Author SHA1 Message Date
Chris Lattner
855341bf05 pseudosourcevalue is also still using getGlobalContext(), so it isn't
thread safe either.

llvm-svn: 85253
2009-10-27 17:02:08 +00:00
Eric Christopher
89c2f934d6 Add objectsize intrinsic and hook it up through codegen. Doesn't
do anything than return "I don't know" at the moment.

llvm-svn: 85189
2009-10-27 00:52:25 +00:00
Victor Hernandez
673c036bc7 Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.

llvm-svn: 85176
2009-10-26 23:43:48 +00:00
David Goodwin
0b5b62bfcf Allow the aggressive anti-dep breaker to process the same region multiple times. This is necessary because new anti-dependencies are exposed when "current" ones are broken.
llvm-svn: 85166
2009-10-26 22:31:16 +00:00
David Goodwin
35fab8a585 Define virtual destructor in *.cpp file.
llvm-svn: 85146
2009-10-26 19:41:00 +00:00
David Goodwin
62dc7a4d93 Add aggressive anti-dependence breaker. Currently it is not the default for any target. Enable with -break-anti-dependencies=all.
llvm-svn: 85145
2009-10-26 19:32:42 +00:00
Dan Gohman
97690f7a2a When checking whether a def of an aliased register is dead, ask the
machineinstr whether the aliased register is dead, rather than the original
register is dead. This allows it to get the correct answer when examining
an instruction like this:
  CALLpcrel32 <ga:foo>, %AL<imp-def>, %EAX<imp-def,dead>
where EAX is dead but a subregister of it is still live. This fixes PR5294.

llvm-svn: 85135
2009-10-26 18:26:18 +00:00
David Goodwin
f6199e95b0 Break anti-dependence breaking out into its own class.
llvm-svn: 85127
2009-10-26 16:59:04 +00:00
Evan Cheng
4443642def - Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests and
bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg
  around.
- Relax register scavenging to allow use of partially "not-live" registers. It's
  common for targets to operate on registers where the top bits are undef. e.g.
  s0 =
  d0 = insert_subreg d0<undef>, s0, 1
  ...
     = d0
  When the insert_subreg is eliminated by the coalescer, the scavenger used to
  complain. The previous fix was to keep to insert_subreg around. But that's
  brittle and it's overly conservative when we want to use the scavenger to 
  allocate registers. It's actually legal and desirable for other instructions
  to use the "undef" part of d0. e.g.
  s0 =
  d0 = insert_subreg d0<undef>, s0, 1
  ...
  s1 =
     = s1
     = d0
  We probably need add a "partial-undef" marker on machine operand so the
  machine verifier would not complain.

llvm-svn: 85091
2009-10-26 04:56:07 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Evan Cheng
859d9f3b07 Use isIdentityCopy. Fix a bozo bug (flipped condition) in InvalidateRegDef.
llvm-svn: 85047
2009-10-25 07:51:47 +00:00
Evan Cheng
a6242a5d04 Code clean up.
llvm-svn: 85046
2009-10-25 07:49:57 +00:00
Evan Cheng
92ad633488 Do not delete identity insert_subreg even if dest is virtual. Let later passes delete them. This avoids register scavenger complain.
llvm-svn: 85045
2009-10-25 07:48:51 +00:00
Nick Lewycky
2b8400628d Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.

llvm-svn: 85043
2009-10-25 06:57:41 +00:00
Nick Lewycky
711c726c97 Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.

llvm-svn: 85042
2009-10-25 06:33:48 +00:00
Jim Grosbach
7af2399458 When the scavenger is looking for a good candidate location to restore from a
spill, it should avoid doing so inside the live range of a virtual register.

llvm-svn: 85026
2009-10-25 00:45:07 +00:00
Dan Gohman
1e96c6acaf Rename isLoopExit to isLoopExiting, for consistency with the wording
used elsewhere - an exit block is a block outside the loop branched to
from within the loop. An exiting block is a block inside the loop that
branches out.

llvm-svn: 85019
2009-10-24 23:34:26 +00:00
Anton Korobeynikov
0e56d9fdb7 Add some asserts to catch copyRegToReg() fails early
llvm-svn: 84983
2009-10-24 00:27:00 +00:00
Evan Cheng
82de095652 Identity copies should not contribute to spill weight.
llvm-svn: 84978
2009-10-23 23:09:19 +00:00
Dan Gohman
b15fee5666 APInt-ify the gep scaling code, so that it correctly handles the case where
the scale overflows pointer-sized arithmetic. This fixes PR5281.

llvm-svn: 84954
2009-10-23 17:57:43 +00:00
Bill Wendling
283fb69c0a Neuter stack protectors by only checking character arrays. This is what GCC
does.

llvm-svn: 84916
2009-10-23 00:01:05 +00:00
David Goodwin
82c1dd9754 Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.
llvm-svn: 84911
2009-10-22 23:19:17 +00:00
Bill Wendling
c6d3a6ed66 Tidying up some code and comments. No functionality change.
llvm-svn: 84894
2009-10-22 20:48:59 +00:00
Anton Korobeynikov
726b132e13 Fix null pointer dereference.
llvm-svn: 84806
2009-10-22 00:15:17 +00:00
Dan Gohman
2d8e5654a8 Revert the main portion of r31856. It was causing BranchFolding
to break up CFG diamonds by banishing one of the blocks to the end of
the function, which is bad for code density and branch size.

This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the
benchmark cited as the reason for the change, however I've examined
the code and it looks more like a case of gaming a particular
branch than of being generally applicable.

llvm-svn: 84803
2009-10-22 00:03:58 +00:00
Jim Grosbach
3ae825eccf The spill restore needs to be resolved to the SP/FP just like the spill
llvm-svn: 84792
2009-10-21 22:59:56 +00:00
Jim Grosbach
8b0af4b521 Cleanup of frame index scavenging. Better code flow and more accurately
handles T2 and ARM use cases.

llvm-svn: 84761
2009-10-21 15:26:21 +00:00
Evan Cheng
69e133fd77 Need a comma after imp-use.
llvm-svn: 84749
2009-10-21 07:56:02 +00:00
Dan Gohman
c74da745a7 Revert r84658 and r84691. They were causing llvm-gcc bootstrap to fail.
llvm-svn: 84727
2009-10-21 01:44:44 +00:00
David Goodwin
90fcfc5f88 Respect src register allocation requirements when breaking anti-dependencies. Remove some dead code.
llvm-svn: 84691
2009-10-20 22:50:43 +00:00
Anton Korobeynikov
7b6fe9f251 Fix invalid for vector types fneg(bitconvert(x)) => bitconvert(x ^ sign)
transform.

llvm-svn: 84683
2009-10-20 21:37:45 +00:00
Lang Hames
5ab1db4859 Oops. Backing out 84681 - needs to wait for the indexing patch.
llvm-svn: 84682
2009-10-20 21:28:22 +00:00
Lang Hames
0a7caf4bb3 Added some debugging output to pre-alloc splitting.
llvm-svn: 84681
2009-10-20 21:25:13 +00:00
David Goodwin
048b80a70a Checkpoint more aggressive anti-dependency breaking for post-ra scheduler.
llvm-svn: 84658
2009-10-20 19:54:44 +00:00
Jim Grosbach
7800d00f20 Better handle instructions that re-def a scratch register
llvm-svn: 84657
2009-10-20 19:52:35 +00:00
Jim Grosbach
5ce30430a4 Register re-use for scavenged frame indices must check for re-deginition
of the register in the instruction which kills the scavenged value.

llvm-svn: 84641
2009-10-20 16:33:57 +00:00
Dan Gohman
b1528d73d1 Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks are
tracked. Instead of trying to manually keep track of these locations
while doing complex modifications, just recompute them when they're needed.
This fixes a bug in which the TopMBB and BotMBB were not correctly updated,
leading to invalid transformations.

llvm-svn: 84598
2009-10-20 04:50:37 +00:00
Evan Cheng
54a5544dd7 Trim unnecessary includes.
llvm-svn: 84597
2009-10-20 04:23:20 +00:00
Dan Gohman
1fe811cd09 Add getTopBlock and getBottomBlock member functions to MachineLoopInfo.
llvm-svn: 84596
2009-10-20 04:16:37 +00:00
Evan Cheng
029a85b791 If the physical register being spilled does not have an interval, spill its sub-registers instead.
llvm-svn: 84586
2009-10-20 01:31:09 +00:00
Jim Grosbach
c4acd85bfd Enable post-pass frame index register scavenging for ARM and Thumb2
llvm-svn: 84585
2009-10-20 01:26:58 +00:00
Jim Grosbach
c813cf9649 Adjust the scavenge register spilling to allow the target to choose an
appropriate restore location for the spill as well as perform the actual
save and restore.

The Thumb1 target uses this to make sure R12 is not clobbered while a spilled
scavenger register is live there.

llvm-svn: 84554
2009-10-19 22:27:30 +00:00
Anton Korobeynikov
26ed697cf2 Revert r84295, this unbreaks llvm-gcc bootstrap on x86-64/linux
llvm-svn: 84516
2009-10-19 18:21:09 +00:00
Dan Gohman
5a182b7b78 Fix a typo in a comment.
llvm-svn: 84504
2009-10-19 14:56:05 +00:00
Dan Gohman
05e648bef4 Change a few instance variables to be local variables.
llvm-svn: 84503
2009-10-19 14:52:05 +00:00
Evan Cheng
80017908bc Spill slots cannot alias.
llvm-svn: 84432
2009-10-18 19:58:47 +00:00
Evan Cheng
e921ebe70d -Revert parts of 84326 and 84411. Distinquishing between fixed and non-fixed
stack slots and giving them different PseudoSourceValue's did not fix the
problem of post-alloc scheduling miscompiling llvm itself.
- Apply Dan's conservative workaround by assuming any non fixed stack slots can
alias other memory locations. This means a load from spill slot #1 cannot 
move above a store of spill slot #2. 
- Enable post-alloc scheduling for x86 at optimization leverl Default and above.

llvm-svn: 84424
2009-10-18 18:16:27 +00:00
Evan Cheng
b40322ac49 Only fixed stack objects and spill slots should be get FixedStack PseudoSourceValue.
llvm-svn: 84411
2009-10-18 06:27:36 +00:00
Daniel Dunbar
54427e4a2d Fix my -Asserts warning fix.
llvm-svn: 84372
2009-10-17 23:15:04 +00:00
Daniel Dunbar
4d0f5fa69b Suppress -Asserts warning.
llvm-svn: 84327
2009-10-17 09:33:00 +00:00