Commit Graph

98 Commits

Author SHA1 Message Date
Chris Lattner cd8b421799 Fix CodeGen/Generic/bool-to-double.ll
llvm-svn: 23652
2005-10-07 04:50:48 +00:00
Chris Lattner 6169a78f46 these registers don't belong to any register classes, so don't mark them
as callee save.  They can never be generated by the compiler.

llvm-svn: 23551
2005-09-30 06:42:24 +00:00
Chris Lattner 64ca7cda3f these methods get extra args
llvm-svn: 23538
2005-09-30 01:30:55 +00:00
Chris Lattner 0815dcae3f Add FP versions of the binary operators, keeping the int and fp worlds seperate.
Though I have done extensive testing, it is possible that this will break
things in configs I can't test.  Please let me know if this causes a problem
and I'll fix it ASAP.

llvm-svn: 23505
2005-09-28 22:29:17 +00:00
Chris Lattner 9e4a4ee3dc Give all operands names
llvm-svn: 23357
2005-09-14 21:11:13 +00:00
Chris Lattner 7c8dba750c ignore generated files
llvm-svn: 23263
2005-09-07 23:47:44 +00:00
Chris Lattner 2493f0e5fd Handle ANY_EXTEND like ZERO_EXTEND. Simplify the extend/truncate code on
the observation that it only has to handle i1 -> i64 and i64 -> i1.

llvm-svn: 23201
2005-09-02 00:15:30 +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 d0dc6f4299 Fix a bug in my previous checkin
llvm-svn: 23082
2005-08-26 17:18:44 +00:00
Chris Lattner c30405e0ee Change ConstantPoolSDNode to actually hold the Constant itself instead of
putting it into the constant pool.  This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.

llvm-svn: 23081
2005-08-26 17:15:30 +00:00
Chris Lattner daae1e10f7 fix a warning in optimized build
llvm-svn: 23030
2005-08-25 00:03:21 +00:00
Chris Lattner d2f2aff484 Fix a crash I introduced into the IA64 backend with my copyfromreg change.
It used to crash on any function that took float arguments.

llvm-svn: 22973
2005-08-22 21:33:11 +00:00
Chris Lattner 9d46518e5c Add a pass name for -time-passes output
llvm-svn: 22970
2005-08-22 18:28:09 +00:00
Duraid Madina 3588ea9bf5 reenable collapse of loadimm+AND -> dep.z (thanks guys)
llvm-svn: 22944
2005-08-21 15:43:53 +00:00
Jim Laskey 9b0a275f04 Repair an out by one error for IA64.
llvm-svn: 22942
2005-08-20 11:05:23 +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 8975de187f Put register classes in namespaces
llvm-svn: 22924
2005-08-19 18:50:46 +00:00
Chris Lattner f391f286d7 This code has always been dead on itanium
llvm-svn: 22916
2005-08-19 18:34:37 +00:00
Duraid Madina fcbb38077b a bugfix (up top) and a quick repair job: disable generation of dep.z
(which died about a week ago) so we're back to load-(2^n-1)-then-AND
sequences. slow, but things should now be Almost Completely Working,
modulo those pesky alignment/ABI issues.

llvm-svn: 22904
2005-08-19 13:25:50 +00:00
Chris Lattner 3e0335c9d1 Mark some instructions as variable_ops, and PSEUDO_ALLOC as taking a GPR.
I'm not convinced this is all of them,  but I can't do much testing, because
IA64 LLC crashes on big programs :(

llvm-svn: 22892
2005-08-19 00:47:42 +00:00
Chris Lattner 7c76278242 update the backends to work with the new CopyFromReg/CopyToReg/ImplicitDef nodes
llvm-svn: 22807
2005-08-16 21:56:37 +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
Duraid Madina 1c2f9fdf71 sorry!! this is temporary; for some reason the nasty constmul code seems to
be an infinite loop when using g++-4.0.1*, this kills the ia64 nightly
tester. A proper fix shall be forthcoming!!! thanks for not killing me. :)

llvm-svn: 22748
2005-08-10 12:38:57 +00:00
Chris Lattner 6ec7745e80 Update the targets to the new SETCC/CondCodeSDNode interfaces.
llvm-svn: 22729
2005-08-09 20:21:10 +00:00
Chris Lattner 6667bdbaca Update to use the new MathExtras.h support for log2 computation.
Patch contributed by Jim Laskey!

llvm-svn: 22594
2005-08-02 19:26:06 +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
Chris Lattner a7220851c0 Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.
4. Now that we have Value*'s available in the lowering methods, pass them
   into any load/stores from the valist that are emitted

llvm-svn: 22339
2005-07-05 19:58:54 +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 253145299b If we support structs as va_list, we must pass pointers to them to va_copy
See last commit for LangRef, this implements it on all targets.

llvm-svn: 22273
2005-06-22 21:04:42 +00:00
Andrew Lenharth 9144ec4764 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Duraid Madina 3a5eb61899 re-enable direct calls, this should just be a performance boost
llvm-svn: 22148
2005-05-20 11:39:17 +00:00
Duraid Madina 9f406cb29b make angry compilers happy again
llvm-svn: 22054
2005-05-15 14:44:13 +00:00
Chris Lattner 8abab9b0c7 treat TAILCALL nodes identically to CALL nodes
llvm-svn: 21977
2005-05-13 20:29:26 +00:00
Chris Lattner 2e77db6af6 Add an isTailCall flag to LowerCallTo
llvm-svn: 21958
2005-05-13 18:50:42 +00:00
Chris Lattner 2dce703710 rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.
llvm-svn: 21915
2005-05-12 23:24:06 +00:00
Chris Lattner 36674a123e Pass in Calling Convention to use into LowerCallTo
llvm-svn: 21899
2005-05-12 19:56:45 +00:00
Duraid Madina 25163d8d60 add the popcount instruction and support this in the isel
the primary user of this will probably end up being find-first-set-bit/find-
last-set-bit, which i'll get around to...

llvm-svn: 21860
2005-05-11 05:16:09 +00:00
Chris Lattner 669c3b17eb No really IA*64* :)
llvm-svn: 21858
2005-05-11 05:03:56 +00:00
Duraid Madina 74a01fa211 fix and cleanup constmul code a bit, this fixes mediabench/toast and
probably a couple of other tests.

llvm-svn: 21814
2005-05-09 13:18:34 +00:00
Andrew Lenharth b8e94c3499 fix typo
llvm-svn: 21693
2005-05-04 19:25:37 +00:00
Duraid Madina 7acd5d5f06 support multiplication by constant negative integers
this constmul code is still buggy though, so beware. mul by 7427 is currently
broken, for example. will fix it when I get a moment :)

llvm-svn: 21652
2005-05-02 07:27:14 +00:00
Duraid Madina 0e73188c10 add support for bools to SELECT, this fixes Prolangs-C/bison from the
testsuite, however 09-vor is still dead (hopefully for other reasons!)

llvm-svn: 21651
2005-05-02 06:41:13 +00:00
Chris Lattner 9c6bbafc15 This target doesn't support the FSIN/FCOS/FSQRT nodes yet
llvm-svn: 21633
2005-04-30 04:26:06 +00:00
Andrew Lenharth 4a73c2cfdc Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.
(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*.  Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.

llvm-svn: 21599
2005-04-27 20:10:01 +00:00
Duraid Madina b071bef66a clean up some warnings
llvm-svn: 21590
2005-04-27 11:57:39 +00:00
Duraid Madina e06ef80244 constmul bugfix: multiply by 27611 was broken
llvm-svn: 21564
2005-04-26 09:42:50 +00:00
Duraid Madina bbd0cd71a8 clean up the code! (oops) lots more cleaning left, however.
llvm-svn: 21563
2005-04-26 08:43:47 +00:00
Duraid Madina 81ebb57771 * Add code to reduce multiplies by constant integers to shifts, adds and
subtracts. This is a very rough and nasty implementation of Lefevre's
  "pattern finding" algorithm. With a few small changes though, it should
  end up beating most other methods in common use, regardless of the size
  of the constant (currently, it's often one or two shifts worse)

  TODO: rewrite it so it's not hideously ugly (this is a translation from
        perl, which doesn't help ;)
        bypass most of it for multiplies by 2^n+1
	(eventually) teach it that some combinations of shift+add are
	cheaper than others (e.g. shladd on ia64, scaled adds on alpha)
	get it to try multiple booth encodings in search of the cheapest
	routine
	make it work for negative constants

  This is hacked up as a DAG->DAG transform, so once I clean it up I hope
  it'll be pulled out of here and put somewhere else. The only thing backends
  should really have to worry about for now is where to draw the line
  between using this code vs. going ahead and doing an integer multiply
  anyway.

llvm-svn: 21560
2005-04-26 07:23:02 +00:00