Commit Graph

304 Commits

Author SHA1 Message Date
Nate Begeman 006bb04f3a Support multiple ValueTypes per RegisterClass, needed for upcoming vector
work.  This change has no effect on generated code.

llvm-svn: 24563
2005-12-01 04:51:06 +00:00
Chris Lattner b28f214033 Add a new option to indicate we want the code generator to emit code quickly,not spending tons of time microoptimizing it. This is useful for an -O0style of build.
llvm-svn: 24233
2005-11-08 02:11:51 +00:00
Chris Lattner dcceae104e remove reference to this pass
llvm-svn: 24088
2005-10-29 05:28:34 +00:00
Chris Lattner 76b12c4d95 do not wrap this whole file in namespace llvm
llvm-svn: 23962
2005-10-24 06:38:35 +00:00
Chris Lattner 2a65d7b633 Make this build with GCC 4.1, patch contributed by Vladimir A. Merzliakov!
llvm-svn: 23956
2005-10-24 04:51:35 +00:00
Chris Lattner 42b3a5d596 This file is entirely ifdef'd out
llvm-svn: 23882
2005-10-22 19:37:08 +00:00
Chris Lattner 05da0d966e silence some warnings
llvm-svn: 23637
2005-10-05 17:15:09 +00:00
Chris Lattner a654525c1c Pass extra regclasses into spilling code
llvm-svn: 23537
2005-09-30 01:29:42 +00:00
Chris Lattner ee8113293e This has been moved to the target-indep code
llvm-svn: 23333
2005-09-13 19:32:18 +00:00
Chris Lattner 7c8dba750c ignore generated files
llvm-svn: 23263
2005-09-07 23:47:44 +00:00
Jim Laskey 19058c3989 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.

llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Chris Lattner bd26a82051 Split RegisterClass 'Methods' into MethodProtos and MethodBodies
llvm-svn: 22929
2005-08-19 19:13:20 +00:00
Chris Lattner dc89d6be04 Fix code that assumes the register info will be dumped into a target
namespace instead of the reg class namespace.  Update getRegClassForType()
to use modified names due to tblgen change.

llvm-svn: 22923
2005-08-19 18:50:11 +00:00
Chris Lattner cca0503c24 put reg classes in namespaces
llvm-svn: 22922
2005-08-19 18:49:22 +00:00
Jim Laskey 17e7599ecb Promote dependency for MathExtras.h out of Constants.h.
llvm-svn: 22839
2005-08-17 20:04:34 +00:00
Jim Laskey b74c666186 Culling out use of unions for converting FP to bits and vice versa.
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Nate Begeman 371e49515d Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nasty
fixme from the PowerPC backend.  Emit slightly better code for legalizing
select_cc.

llvm-svn: 22805
2005-08-16 19:49:35 +00:00
Jeff Cohen 5f4ef3c5a8 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Chris Lattner 53676dfd33 Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
This is the last MVTSDNode.

This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.

Also, remove some uses of dyn_cast that should really be cast (which is
cheaper in a release build).

llvm-svn: 22368
2005-07-10 01:56:13 +00:00
Chris Lattner 36db1ed06f Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNode
llvm-svn: 22366
2005-07-10 00:29:18 +00:00
Andrew Lenharth 93bf000891 some call work
llvm-svn: 22303
2005-06-27 23:59:51 +00:00
Chris Lattner f11f48ba61 Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface.

llvm-svn: 22282
2005-06-25 02:48:37 +00:00
Andrew Lenharth 9144ec4764 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Andrew Lenharth 26fc33fd2a A start at a Sparc V8 Pattern ISel. Anyone want to implement the calling
convention? ;)

llvm-svn: 22247
2005-06-17 16:52:12 +00:00
Misha Brukman d5f457c47b Wrap long lines
llvm-svn: 22125
2005-05-18 20:37:33 +00:00
Misha Brukman fd8c2265fa Convert tabs to spaces
llvm-svn: 21457
2005-04-22 18:06:01 +00:00
Misha Brukman b440243e94 Remove trailing whitespace
llvm-svn: 21425
2005-04-21 23:30:14 +00:00
Chris Lattner 531f9e92d4 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner 78394258ae Substantially improve the code generated by non-folded setcc instructions.
In particular, instead of compiling this:

bool %test(int %A, int %B) {
  %C = setlt int %A, %B
  ret bool %C
}

to this:

test:
        save %sp, -96, %sp
        subcc %i0, %i1, %g0
        bl .LBBtest_1   !
        nop
        ba .LBBtest_2   !
        nop
.LBBtest_1:     !
        or %g0, 1, %i0
        ba .LBBtest_3   !
        nop
.LBBtest_2:     !
        or %g0, 0, %i0
        ba .LBBtest_3   !
        nop
.LBBtest_3:     !
        restore %g0, %g0, %g0
        retl
        nop

We now compile it to this:

test:
        save %sp, -96, %sp
        subcc %i0, %i1, %g0
        or %g0, 1, %i0
        bl .LBBtest_2   !
        nop
.LBBtest_1:     !
        or %g0, %g0, %i0
.LBBtest_2:     !
        restore %g0, %g0, %g0
        retl
        nop

llvm-svn: 19213
2005-01-01 16:06:57 +00:00
Chris Lattner 227010bb31 Remove unused #include
llvm-svn: 19021
2004-12-17 19:07:04 +00:00
Brian Gaeke 4bc39bef79 The mystery of Olden/tsp solved, and more opportunities for speedup.
llvm-svn: 18932
2004-12-14 09:10:10 +00:00
Brian Gaeke 36c14da84f Get rid of shifts by zero in most cases.
llvm-svn: 18931
2004-12-14 08:21:02 +00:00
Chris Lattner 951e94e867 Add some notes
llvm-svn: 18911
2004-12-13 20:13:10 +00:00
Brian Gaeke cf2c1866cb Add V8 SPEC status.
llvm-svn: 18844
2004-12-13 00:27:35 +00:00
Chris Lattner 17550c456c Use the target triple to pick this target.
llvm-svn: 18830
2004-12-12 17:40:28 +00:00
Brian Gaeke 23b2bc54b0 Complete the list of MultiSource failures.
llvm-svn: 18826
2004-12-12 08:22:11 +00:00
Brian Gaeke ed9346820d hbd should be working now.
llvm-svn: 18824
2004-12-12 07:42:59 +00:00
Brian Gaeke 27358a44d1 Finally enable the setcc-branch folding code.
Also, fix a bug where ubyte 255 would sometimes be output as -1. This
was afflicting hbd.

llvm-svn: 18823
2004-12-12 07:42:58 +00:00
Brian Gaeke e5351ad5f0 Add (currently disabled) code for canFoldSetCC
llvm-svn: 18820
2004-12-12 06:22:30 +00:00
Brian Gaeke aa40b7d080 Add stubs for setcc-branch folding support.
llvm-svn: 18818
2004-12-12 06:01:26 +00:00
Brian Gaeke 25ac83565e Print llvm code one function at a time.
llvm-svn: 18805
2004-12-11 22:17:07 +00:00
Brian Gaeke 72daaa46eb JIT should print LLVM each function before selecting instructions for it.
llvm-svn: 18803
2004-12-11 18:41:09 +00:00
Brian Gaeke b3095dd88f Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
ctor parameters can be defaulted.

Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.

llvm-svn: 18794
2004-12-11 05:19:04 +00:00
Brian Gaeke ba5e9f107c Look for many more moves to fold (previously, we only
*or g0, x      add g0, x          recognized * as a move)
 or  x, g0     add  x, g0
 or  0, x      add  0, x
 or  x, 0      add  x, 0

llvm-svn: 18793
2004-12-11 05:19:03 +00:00
Brian Gaeke 52a9ed63b5 Make GEPs not suck so much:
* Don't emit the Index * ElementSize multiply if Index is a constant.
* Use a shift, not a multiply, if ElementSize is 1/2/4/8.
* If ElementSize fits in the immediate field of SMUL, then put it there.

Fix a bug where struct offsets might be truncated (ConstantSInt::get is
now used instead of ConstantInt::get).

llvm-svn: 18792
2004-12-11 05:19:02 +00:00
Brian Gaeke cba3135ba8 Update lists of failing benchmarks, including info on which
ones are failing in cbe.

llvm-svn: 18791
2004-12-11 05:19:01 +00:00
Brian Gaeke 2e2f3e26ba Move -lowerselect later in the chain; some select instructions were
slipping through into the instruction selector, which can't deal with
them yet.

llvm-svn: 18758
2004-12-10 08:39:30 +00:00
Brian Gaeke 2ccff7c256 Add the rest of the multiply instructions.
llvm-svn: 18757
2004-12-10 08:39:29 +00:00
Brian Gaeke 4bfd3f7c98 Support binary operations with immediates for <= cInt.
llvm-svn: 18756
2004-12-10 08:39:28 +00:00
Brian Gaeke 428037be05 Update lists of failing benchmarks (except C++...something is the
matter with my sparcv8 libstdc++.a) and to-do list.

llvm-svn: 18755
2004-12-10 08:39:27 +00:00