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

1269 Commits

Author SHA1 Message Date
Chris Lattner
e32ab4bd47 1ULL << 64 is undefined, don't do it.
llvm-svn: 19365
2005-01-08 06:24:30 +00:00
Chris Lattner
717236fcd3 Fix a pointer invalidation problem. This fixes Generic/badarg6.ll
llvm-svn: 19361
2005-01-07 23:32:00 +00:00
Chris Lattner
53173ba1d1 Fold conditional branches on constants away.
llvm-svn: 19360
2005-01-07 22:49:57 +00:00
Chris Lattner
8f55fae569 Fix a thinko in the reassociation code, fixing Generic/badlive.ll
llvm-svn: 19359
2005-01-07 22:44:09 +00:00
Chris Lattner
6f461f406e Add support for truncating integer casts from long.
llvm-svn: 19358
2005-01-07 22:37:48 +00:00
Chris Lattner
79ca9cdb7e Fix a bug in load expansion legalization and ret legalization. This fixes
CodeGen/Generic/select.ll:castconst.

llvm-svn: 19357
2005-01-07 22:28:47 +00:00
Chris Lattner
a834e96647 Legalize unconditional branches too
llvm-svn: 19356
2005-01-07 22:12:08 +00:00
Chris Lattner
3f2ce91a99 Implement support for long GEP indices on 32-bit archs and support for
int GEP indices on 64-bit archs.

llvm-svn: 19354
2005-01-07 21:56:57 +00:00
Chris Lattner
191554c09f Simplify: truncate ({zero|sign}_extend (X))
llvm-svn: 19353
2005-01-07 21:56:24 +00:00
Chris Lattner
60e3842843 implement legalization of a bunch more operators.
llvm-svn: 19352
2005-01-07 21:45:56 +00:00
Chris Lattner
8c6c12da86 Fix another bug legalizing calls!
llvm-svn: 19350
2005-01-07 21:35:32 +00:00
Chris Lattner
86601673d6 Fix handling of dead PHI nodes.
llvm-svn: 19349
2005-01-07 21:34:19 +00:00
Chris Lattner
d671aa053c Fix a bug legalizing calls
llvm-svn: 19348
2005-01-07 21:34:13 +00:00
Chris Lattner
3871313761 After legalizing a DAG, delete dead nodes to save space.
llvm-svn: 19346
2005-01-07 21:09:37 +00:00
Chris Lattner
16faa6501a Implement RemoveDeadNodes
llvm-svn: 19345
2005-01-07 21:09:16 +00:00
Chris Lattner
39baa91b9a Teach legalize how to handle condbranches
llvm-svn: 19339
2005-01-07 08:19:42 +00:00
Chris Lattner
74f8f6f657 Initial implementation of the SelectionDAGISel class. This contains most
of the code for lowering from LLVM code to a SelectionDAG.

llvm-svn: 19331
2005-01-07 07:47:53 +00:00
Chris Lattner
89f2ccbe9c This file is obsolete
llvm-svn: 19330
2005-01-07 07:47:23 +00:00
Chris Lattner
fd473edcd8 Initial implementation of the DAG legalization. This still has a long way
to go, but it does work for some non-trivial cases now.

llvm-svn: 19329
2005-01-07 07:47:09 +00:00
Chris Lattner
c72669973a Complete rewrite of the SelectionDAG class.
llvm-svn: 19327
2005-01-07 07:46:32 +00:00
Chris Lattner
c1feb0c8fe Make the 2-address instruction lowering pass smarter in two ways:
1. If we are two-addressing a commutable instruction and the LHS is not the
   last use of the variable, see if the instruction is the last use of the
   RHS.  If so, commute the instruction, allowing us to avoid a
   register-register copy in many cases for common instructions like ADD, OR,
   AND, etc on X86.
2. If #1 doesn't hold, and if this is an instruction that also existing in
   3-address form, promote the instruction to a 3-address instruction to
   avoid the register-register copy.  We can do this for several common
   instructions in X86, including ADDrr, INC, DEC, etc.

This patch implements test/Regression/CodeGen/X86/commute-two-addr.ll,
overlap-add.ll, and overlap-shift.ll when I check in the X86 support for it.

llvm-svn: 19245
2005-01-02 02:34:12 +00:00
Chris Lattner
558a640b3c Move virtual method call out of loop
llvm-svn: 18955
2004-12-15 07:04:32 +00:00
Nate Begeman
85a2e38a56 Move virtual function call out of loop to speed up getFreePhysReg by about
20%, shaving 0.1s off hbd compile time on my g5.  Yay.

llvm-svn: 18592
2004-12-07 05:25:53 +00:00
Reid Spencer
d50c86f078 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual

llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Chris Lattner
9245823389 Prevent accessing past the end of the intervals vector, this fixes
Prolang-C/bison in the JIT

llvm-svn: 18477
2004-12-04 01:22:09 +00:00
Chris Lattner
c3750aa2a3 Fix SingleSource/UnitTests/2004-11-28-GlobalBoolLayout.c, and hopefully
PR449

llvm-svn: 18306
2004-11-28 17:56:47 +00:00
Chris Lattner
70c19defde Fix the FIXME, nuke the JIT specific forceCompilationOf method.
llvm-svn: 18131
2004-11-22 21:54:35 +00:00
Chris Lattner
d38029313a These methods are obsolete
llvm-svn: 18129
2004-11-22 21:48:33 +00:00
Chris Lattner
37fc0d8b95 Adjust to changed interfaces
llvm-svn: 18064
2004-11-20 23:53:26 +00:00
Chris Lattner
c0599d0f14 Add getCurrentPCOffset() and addRelocation() methods.
llvm-svn: 18034
2004-11-20 03:44:39 +00:00
Chris Lattner
2978400c23 Match change in MachineCodeEmitter prototype.
llvm-svn: 18009
2004-11-19 20:56:46 +00:00
Chris Lattner
ccd7bfb561 * There is no reason for SpillWeights to be an instance var
* Do not put fixed registers into the unhandled set.  This means they will
  never find their way into the inactive, active, or handled sets, so we
  can simplify a bunch of code.

llvm-svn: 17945
2004-11-18 06:01:45 +00:00
Chris Lattner
60c90d623f There is no need to check to see if j overflowed in this loop as we're only
incrementing i.

llvm-svn: 17944
2004-11-18 05:28:21 +00:00
Chris Lattner
2c16205a0d Moderate head scratching reveals that this conditional is not needed. If
i->start == j->start, then certainly i->end > j->start.

llvm-svn: 17943
2004-11-18 05:19:02 +00:00
Chris Lattner
e9ab36314d Fix a couple of bugs where we considered physregs past their range as possibly
intersecting an interval.

llvm-svn: 17939
2004-11-18 04:33:31 +00:00
Chris Lattner
c23cebb206 Fix typeo
llvm-svn: 17938
2004-11-18 04:31:10 +00:00
Chris Lattner
3a6991f745 Start using the iterators in the fixed_ intervals to avoid having to binary
search physreg intervals every time we access it.  This takes another
half second off of linscan.

llvm-svn: 17937
2004-11-18 04:13:02 +00:00
Chris Lattner
189acb3955 Take another .7 seconds off of linear scan time.
llvm-svn: 17936
2004-11-18 04:02:11 +00:00
Chris Lattner
a52650a18a Add a counter for the number of times linscan has to backtrack. Start using
the iterator hints we have to speed up overlaps().  This speeds linscan up
by about .2s (out of 8.7) on 175.vpr for PPC.

llvm-svn: 17935
2004-11-18 03:49:30 +00:00
Chris Lattner
2edc3cec62 Add ability to give hints to the overlaps routines.
llvm-svn: 17934
2004-11-18 03:47:34 +00:00
Chris Lattner
18ced80110 * Improve comments/documentation substantially
* Eliminate the releaseMemory method, this is not an analysis
* Change the fixed, active, and inactive lists of intervals to maintain an
  iterator for the current position in the interval.  This allows us to do
  constant time increments of the iterator instead of having to do a binary
  search to find our liverange in our liveinterval all of the time, which
  substantially speeds up cases where LiveIntervals have many LiveRanges
  - which is very common for physical registers.  On targets with many
  physregs, this can make a noticable difference.

  With a release build of LLC for PPC, this halves the time in
  processInactiveIntervals and processActiveIntervals, from 1.5s to .75s.

  This also lays the ground for more to come.

llvm-svn: 17933
2004-11-18 02:42:27 +00:00
Chris Lattner
3bf87c8f95 Add new advanceTo method
llvm-svn: 17932
2004-11-18 02:37:31 +00:00
Chris Lattner
77a4102d91 Fix a minor bug in expiredAt. endNumber() is the first number that is not valid.
llvm-svn: 17931
2004-11-18 01:34:44 +00:00
Chris Lattner
ddc898639f Rename some methods, use 'begin' instead of 'start', add new LiveInterval
iterator/begin/end members.

llvm-svn: 17930
2004-11-18 01:29:39 +00:00
Brian Gaeke
23b56332bc Give a better message for a common assertion failure.
llvm-svn: 17887
2004-11-16 06:52:35 +00:00
Chris Lattner
bde92f3c03 Do not make i have bigger scope that we need
llvm-svn: 17483
2004-11-05 04:47:37 +00:00
Reid Spencer
d3f7233495 Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Chris Lattner
2c73917686 Move method bodies that depend on <algorithm> from MBB.h to MBB.cpp
llvm-svn: 17253
2004-10-26 15:43:42 +00:00
Chris Lattner
a361504a90 Clean up the MachineBasicBlock.h file, percolating #includes into this file.
Patch contributed by Morten Ofstad

llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Chris Lattner
6e775d56cf Reduce usage of MRegisterInfo::getRegClass
llvm-svn: 17238
2004-10-26 05:29:18 +00:00