oota-llvm.git
19 years agoNew testcase for a problem that occurred in 132.ijpeg
Chris Lattner [Mon, 17 Jan 2005 06:25:59 +0000 (06:25 +0000)]
New testcase for a problem that occurred in 132.ijpeg

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19630 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDelete PHI nodes that are not dead but are locked in a cycle of single
Chris Lattner [Mon, 17 Jan 2005 05:10:15 +0000 (05:10 +0000)]
Delete PHI nodes that are not dead but are locked in a cycle of single
useness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19629 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMove code out of indentation one level to make it easier to read.
Chris Lattner [Mon, 17 Jan 2005 03:20:02 +0000 (03:20 +0000)]
Move code out of indentation one level to make it easier to read.

Disable the xform for < > cases.  It turns out that the following is being
miscompiled:

bool %test(sbyte %S) {
        %T = cast sbyte %S to uint
        %V = setgt uint %T, 255
        ret bool %V
}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19628 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd methods
Chris Lattner [Mon, 17 Jan 2005 02:24:59 +0000 (02:24 +0000)]
Add methods

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19627 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDo not fold a load into a comparison that is used by more than one place.
Chris Lattner [Mon, 17 Jan 2005 01:34:14 +0000 (01:34 +0000)]
Do not fold a load into a comparison that is used by more than one place.
The comparison will probably be folded, so this is not ok to do.
This fixed 197.parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19624 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agosysconfdir -> PROJ_etcdir
Reid Spencer [Mon, 17 Jan 2005 00:42:31 +0000 (00:42 +0000)]
sysconfdir -> PROJ_etcdir

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19623 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDo not codegen 'xor bool, true' as 'not reg'. not reg inverts the upper bits
Chris Lattner [Mon, 17 Jan 2005 00:23:16 +0000 (00:23 +0000)]
Do not codegen 'xor bool, true' as 'not reg'.  not reg inverts the upper bits
of the bytereg.  This fixes yacr2, 300.twolf and probably others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19622 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix typos noticed by Gabor Greif, thanks Gabor!
Chris Lattner [Mon, 17 Jan 2005 00:12:04 +0000 (00:12 +0000)]
Fix typos noticed by Gabor Greif, thanks Gabor!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19621 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSet up the shift and setcc types.
Chris Lattner [Mon, 17 Jan 2005 00:00:33 +0000 (00:00 +0000)]
Set up the shift and setcc types.
If we emit a load because we followed a token chain to get to it, try to
fold it into its single user if possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19620 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoShift and setcc types default to the pointer type.
Chris Lattner [Sun, 16 Jan 2005 23:59:48 +0000 (23:59 +0000)]
Shift and setcc types default to the pointer type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19619 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd comments
Chris Lattner [Sun, 16 Jan 2005 23:59:30 +0000 (23:59 +0000)]
Add comments
Add fields to hold the result type of setcc operations and shift amounts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19618 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement legalize of call nodes.
Chris Lattner [Sun, 16 Jan 2005 19:46:48 +0000 (19:46 +0000)]
Implement legalize of call nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19617 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix llvm-java project autconfiguration.
Alkis Evlogimenos [Sun, 16 Jan 2005 09:44:58 +0000 (09:44 +0000)]
Fix llvm-java project autconfiguration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19616 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdded paramters to a few functions in order to allow me to change the functions to...
Tanya Lattner [Sun, 16 Jan 2005 08:51:10 +0000 (08:51 +0000)]
Added paramters to a few functions in order to allow me to change the functions to preserve SSA

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19615 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago* Adjust to changes in TargetLowering interfaces.
Chris Lattner [Sun, 16 Jan 2005 07:34:08 +0000 (07:34 +0000)]
* Adjust to changes in TargetLowering interfaces.
* Remove custom promotion for bool and byte select ops.  Legalize now
  promotes them for us.
* Allow folding ConstantPoolIndexes into EXTLOAD's, useful for float immediates.
* Declare which operations are not supported better.
* Add some hacky code for TRUNCSTORE to pretend that we have truncstore
  for i16 types.  This is useful for testing promotion code because I can
  just remove 16-bit registers all together and verify that programs work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19614 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRevamp supported ops. Instead of just being supported or not, we now keep
Chris Lattner [Sun, 16 Jan 2005 07:29:19 +0000 (07:29 +0000)]
Revamp supported ops.  Instead of just being supported or not, we now keep
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.

Implement custom lowering for a couple of ops, implement promotion for select
operations (which x86 needs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19613 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoadd method stub
Chris Lattner [Sun, 16 Jan 2005 07:28:41 +0000 (07:28 +0000)]
add method stub

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19612 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't mash stuff together.
Chris Lattner [Sun, 16 Jan 2005 07:28:31 +0000 (07:28 +0000)]
Don't mash stuff together.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19611 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUse enums, move virtual dtor out of line.
Chris Lattner [Sun, 16 Jan 2005 07:28:11 +0000 (07:28 +0000)]
Use enums, move virtual dtor out of line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19610 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRevamp supported ops. Instead of just being supported or not, we now keep
Chris Lattner [Sun, 16 Jan 2005 07:27:49 +0000 (07:27 +0000)]
Revamp supported ops.  Instead of just being supported or not, we now keep
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19609 91177308-0d34-0410-b5e6-96231b3b80d8

19 years ago* Revise the projects section and make reference to Projects.html
Reid Spencer [Sun, 16 Jan 2005 07:18:31 +0000 (07:18 +0000)]
* Revise the projects section and make reference to Projects.html
* the dist-clean target no longer implies a check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19608 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't confuse the LLVM_OBJ_DIR and the PROJ_OBJ_DIR because there might be
Reid Spencer [Sun, 16 Jan 2005 06:53:48 +0000 (06:53 +0000)]
Don't confuse the LLVM_OBJ_DIR and the PROJ_OBJ_DIR because there might be
a symbolic link making the autoconf name for the directory (LLVM_OBJ_ROOT)
and the "make" name for the directory (PROJ_OBJ_ROOT) different.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19607 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement some more missing promotions.
Chris Lattner [Sun, 16 Jan 2005 05:06:12 +0000 (05:06 +0000)]
Implement some more missing promotions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19606 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix bugpoint
Chris Lattner [Sun, 16 Jan 2005 04:23:22 +0000 (04:23 +0000)]
Fix bugpoint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19605 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agocycles_t -> CycleCount_t
Chris Lattner [Sun, 16 Jan 2005 04:20:30 +0000 (04:20 +0000)]
cycles_t -> CycleCount_t

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19604 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd some .cvsignores to the win32 hierarchy to account for generated files
Jeff Cohen [Sun, 16 Jan 2005 03:18:23 +0000 (03:18 +0000)]
Add some .cvsignores to the win32 hierarchy to account for generated files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19603 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoProvide support for HP/UX aCC compiler's variant of hash_map and hash_set
Reid Spencer [Sun, 16 Jan 2005 02:58:39 +0000 (02:58 +0000)]
Provide support for HP/UX aCC compiler's variant of hash_map and hash_set
(RogueWave). These are implemented in rw/stdex/hash_map.h and
rw/stdex/hash_set.h on HP/UX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19600 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix locations of libraries and executables to match makefiles.
Reid Spencer [Sun, 16 Jan 2005 02:38:06 +0000 (02:38 +0000)]
Fix locations of libraries and executables to match makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19599 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoBUILD_* to PROJ_*
Reid Spencer [Sun, 16 Jan 2005 02:35:47 +0000 (02:35 +0000)]
BUILD_* to PROJ_*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19598 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoClarify assertion.
Chris Lattner [Sun, 16 Jan 2005 02:23:34 +0000 (02:23 +0000)]
Clarify assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19597 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd assertions.
Chris Lattner [Sun, 16 Jan 2005 02:23:22 +0000 (02:23 +0000)]
Add assertions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19596 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd support for promoted registers being live across blocks.
Chris Lattner [Sun, 16 Jan 2005 02:23:07 +0000 (02:23 +0000)]
Add support for promoted registers being live across blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19595 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUpdate per new Makefile requirements for projects
Reid Spencer [Sun, 16 Jan 2005 02:21:42 +0000 (02:21 +0000)]
Update per new Makefile requirements for projects

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19594 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoRename BUILD_* to PROJ_*
Reid Spencer [Sun, 16 Jan 2005 02:21:29 +0000 (02:21 +0000)]
Rename BUILD_* to PROJ_*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19592 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUpdate documentation on how to set up a project
Reid Spencer [Sun, 16 Jan 2005 02:21:18 +0000 (02:21 +0000)]
Update documentation on how to set up a project

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19591 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSeveral changes:
Reid Spencer [Sun, 16 Jan 2005 02:20:54 +0000 (02:20 +0000)]
Several changes:
* Rename BUILD_* to PROJ_*
* Differentiate between LLVM's Makefile.conf and the project's
* Use project specific install locations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19590 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSeveral changes:
Reid Spencer [Sun, 16 Jan 2005 02:20:42 +0000 (02:20 +0000)]
Several changes:
* Get rid of variables that are duplicates of autoconf variables.
* Rename BUILD_* to PROJ_*
* Define some project related install locations
* Don't assume LLVM's configured values are the project's

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19589 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake this file capable of being used by both LLVM and its projects
Reid Spencer [Sun, 16 Jan 2005 02:20:30 +0000 (02:20 +0000)]
Make this file capable of being used by both LLVM and its projects

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19588 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFixed a couple of instructions that broke SSA.
Tanya Lattner [Sun, 16 Jan 2005 02:14:17 +0000 (02:14 +0000)]
Fixed a couple of instructions that broke SSA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19587 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImprove compatiblity with HPUX on Itanium, patch by Duraid Madina
Chris Lattner [Sun, 16 Jan 2005 01:31:31 +0000 (01:31 +0000)]
Improve compatiblity with HPUX on Itanium, patch by Duraid Madina

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19586 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImprove compatibility with aCC on HPUX. Patch by Duraid Madina
Chris Lattner [Sun, 16 Jan 2005 01:22:18 +0000 (01:22 +0000)]
Improve compatibility with aCC on HPUX.  Patch by Duraid Madina

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19585 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoSet up identity transforms.
Chris Lattner [Sun, 16 Jan 2005 01:20:18 +0000 (01:20 +0000)]
Set up identity transforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19584 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMove some information into the TargetLowering object.
Chris Lattner [Sun, 16 Jan 2005 01:11:45 +0000 (01:11 +0000)]
Move some information into the TargetLowering object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19583 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUse the new TLI method to get this.
Chris Lattner [Sun, 16 Jan 2005 01:11:19 +0000 (01:11 +0000)]
Use the new TLI method to get this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19582 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMove some information out of LegalizeDAG into the generic Target interface.
Chris Lattner [Sun, 16 Jan 2005 01:10:58 +0000 (01:10 +0000)]
Move some information out of LegalizeDAG into the generic Target interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19581 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agolegalize a bunch of operations that I missed.
Chris Lattner [Sun, 16 Jan 2005 00:38:00 +0000 (00:38 +0000)]
legalize a bunch of operations that I missed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19580 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd support for targets that require promotions.
Chris Lattner [Sun, 16 Jan 2005 00:37:38 +0000 (00:37 +0000)]
Add support for targets that require promotions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19579 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix some serious bugs in promotion.
Chris Lattner [Sun, 16 Jan 2005 00:17:42 +0000 (00:17 +0000)]
Fix some serious bugs in promotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19578 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoEliminate unneeded extensions.
Chris Lattner [Sun, 16 Jan 2005 00:17:20 +0000 (00:17 +0000)]
Eliminate unneeded extensions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19577 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement promotion of a whole bunch more operators. I think that this is
Chris Lattner [Sat, 15 Jan 2005 22:16:26 +0000 (22:16 +0000)]
Implement promotion of a whole bunch more operators.  I think that this is
basically everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19576 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPrint extra type for nodes with extra type info.
Chris Lattner [Sat, 15 Jan 2005 21:11:37 +0000 (21:11 +0000)]
Print extra type for nodes with extra type info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19575 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd new file to Visual Studio CodeGen project
Jeff Cohen [Sat, 15 Jan 2005 07:33:52 +0000 (07:33 +0000)]
Add new file to Visual Studio CodeGen project

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19574 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and
Chris Lattner [Sat, 15 Jan 2005 07:15:18 +0000 (07:15 +0000)]
Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and
ZERO_EXTEND_INREG for targets that don't support them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19573 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoCommon code factored out.
Chris Lattner [Sat, 15 Jan 2005 07:14:32 +0000 (07:14 +0000)]
Common code factored out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19572 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoimplement these methods.
Chris Lattner [Sat, 15 Jan 2005 06:52:40 +0000 (06:52 +0000)]
implement these methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19571 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd some helper methods.
Chris Lattner [Sat, 15 Jan 2005 06:52:18 +0000 (06:52 +0000)]
Add some helper methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19570 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd support for promoting ADD/MUL.
Chris Lattner [Sat, 15 Jan 2005 06:18:18 +0000 (06:18 +0000)]
Add support for promoting ADD/MUL.
Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Realize that if we do any promotions, we need to iterate SelectionDAG
construction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19569 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Chris Lattner [Sat, 15 Jan 2005 06:17:04 +0000 (06:17 +0000)]
Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19568 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd a new target-independent code generator flag.
Chris Lattner [Sat, 15 Jan 2005 06:00:32 +0000 (06:00 +0000)]
Add a new target-independent code generator flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19567 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd support for truncstore and *extload.
Chris Lattner [Sat, 15 Jan 2005 05:22:24 +0000 (05:22 +0000)]
Add support for truncstore and *extload.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19566 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd intitial support for promoting some operators.
Chris Lattner [Sat, 15 Jan 2005 05:21:40 +0000 (05:21 +0000)]
Add intitial support for promoting some operators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19565 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImprove output precision.
Chris Lattner [Sat, 15 Jan 2005 00:07:19 +0000 (00:07 +0000)]
Improve output precision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19564 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoWe don't distribute the operating system specific directories any more.
Reid Spencer [Fri, 14 Jan 2005 22:43:01 +0000 (22:43 +0000)]
We don't distribute the operating system specific directories any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19563 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdjust to CopyFromReg changes, implement deletion of truncating/extending
Chris Lattner [Fri, 14 Jan 2005 22:38:01 +0000 (22:38 +0000)]
Adjust to CopyFromReg changes, implement deletion of truncating/extending
stores/loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19562 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdjust to CopyFromREg changes.
Chris Lattner [Fri, 14 Jan 2005 22:37:41 +0000 (22:37 +0000)]
Adjust to CopyFromREg changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19561 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoChange CopyFromReg to take and produce a chain node, allowing it to be used
Chris Lattner [Fri, 14 Jan 2005 22:37:20 +0000 (22:37 +0000)]
Change CopyFromReg to take and produce a chain node, allowing it to be used
with physregs that are not live across the entire block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19560 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoStart implementing truncating stores and extending loads.
Chris Lattner [Fri, 14 Jan 2005 22:08:15 +0000 (22:08 +0000)]
Start implementing truncating stores and extending loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19559 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoStart adding some new operators, give IMPLICIT_DEF a chain operand.
Chris Lattner [Fri, 14 Jan 2005 22:07:46 +0000 (22:07 +0000)]
Start adding some new operators, give IMPLICIT_DEF a chain operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19558 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll
Chris Lattner [Fri, 14 Jan 2005 20:22:02 +0000 (20:22 +0000)]
Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19557 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoNew testcase, problem found by Rob.
Chris Lattner [Fri, 14 Jan 2005 20:21:51 +0000 (20:21 +0000)]
New testcase, problem found by Rob.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19556 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll
Chris Lattner [Fri, 14 Jan 2005 19:31:00 +0000 (19:31 +0000)]
Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19555 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTestcase that crashes the PPC backend. Thanks to Rob for finding this.
Chris Lattner [Fri, 14 Jan 2005 19:30:42 +0000 (19:30 +0000)]
Testcase that crashes the PPC backend.  Thanks to Rob for finding this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19554 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix some bugs in an xform added yesterday. This fixes Prolangs-C/allroots.
Chris Lattner [Fri, 14 Jan 2005 17:35:12 +0000 (17:35 +0000)]
Fix some bugs in an xform added yesterday.  This fixes Prolangs-C/allroots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19553 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix a compile crash on spiff
Chris Lattner [Fri, 14 Jan 2005 17:17:59 +0000 (17:17 +0000)]
Fix a compile crash on spiff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19552 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAllow the Echo and EchoCmd variables to be overridden.
Reid Spencer [Fri, 14 Jan 2005 16:33:36 +0000 (16:33 +0000)]
Allow the Echo and EchoCmd variables to be overridden.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19551 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix the path from ../lib/Debug to ../Debug/lib per changes to Makefiles.
Reid Spencer [Fri, 14 Jan 2005 16:32:39 +0000 (16:32 +0000)]
Fix the path from ../lib/Debug to ../Debug/lib per changes to Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19550 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImprove compatibility with acc
Chris Lattner [Fri, 14 Jan 2005 15:54:24 +0000 (15:54 +0000)]
Improve compatibility with acc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19549 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake this compatible with the HP/intel compiler. Fix by Duraid, thanks!
Chris Lattner [Fri, 14 Jan 2005 15:53:26 +0000 (15:53 +0000)]
Make this compatible with the HP/intel compiler.  Fix by Duraid, thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19548 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoCorrectly update configure to configure the llvm-java project
Alkis Evlogimenos [Fri, 14 Jan 2005 07:52:28 +0000 (07:52 +0000)]
Correctly update configure to configure the llvm-java project

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19546 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix and improve win32 path validation.
Jeff Cohen [Fri, 14 Jan 2005 04:09:39 +0000 (04:09 +0000)]
Fix and improve win32 path validation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19545 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMake asctime_r work for HP/UX.
Reid Spencer [Fri, 14 Jan 2005 00:50:50 +0000 (00:50 +0000)]
Make asctime_r work for HP/UX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19544 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoMore testcases
Chris Lattner [Fri, 14 Jan 2005 00:26:25 +0000 (00:26 +0000)]
More testcases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19543 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoif two gep comparisons only differ by one index, compare that index directly.
Chris Lattner [Fri, 14 Jan 2005 00:20:05 +0000 (00:20 +0000)]
if two gep comparisons only differ by one index, compare that index directly.
This allows us to better optimize begin() -> end() comparisons in common cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19542 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDo not overrun iterators. This fixes a 176.gcc crash
Chris Lattner [Thu, 13 Jan 2005 23:26:48 +0000 (23:26 +0000)]
Do not overrun iterators.  This fixes a 176.gcc crash

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19541 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd a method
Chris Lattner [Thu, 13 Jan 2005 23:26:28 +0000 (23:26 +0000)]
Add a method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19540 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agonew testcase
Chris Lattner [Thu, 13 Jan 2005 23:26:14 +0000 (23:26 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19539 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd a method
Chris Lattner [Thu, 13 Jan 2005 22:58:50 +0000 (22:58 +0000)]
Add a method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19538 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoTurn select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y))). This occurs in
Chris Lattner [Thu, 13 Jan 2005 22:52:24 +0000 (22:52 +0000)]
Turn select C, (X+Y), (X-Y) --> (X+(select C, Y, (-Y))).  This occurs in
the 'sim' program and probably elsewhere.  In sim, it comes up for cases
like this:

#define round(x) ((x)>0.0 ? (x)+0.5 : (x)-0.5)
double G;
void T(double X) { G = round(X); }

(it uses the round macro a lot).  This changes the LLVM code from:

        %tmp.1 = setgt double %X, 0.000000e+00          ; <bool> [#uses=1]
        %tmp.4 = add double %X, 5.000000e-01            ; <double> [#uses=1]
        %tmp.6 = sub double %X, 5.000000e-01            ; <double> [#uses=1]
        %mem_tmp.0 = select bool %tmp.1, double %tmp.4, double %tmp.6
        store double %mem_tmp.0, double* %G

to:

        %tmp.1 = setgt double %X, 0.000000e+00          ; <bool> [#uses=1]
        %mem_tmp.0.p = select bool %tmp.1, double 5.000000e-01, double -5.000000e-01
        %mem_tmp.0 = add double %mem_tmp.0.p, %X
        store double %mem_tmp.0, double* %G
        ret void

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19537 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoImplement an optimization for == and != comparisons like this:
Chris Lattner [Thu, 13 Jan 2005 22:25:21 +0000 (22:25 +0000)]
Implement an optimization for == and != comparisons like this:

_Bool test2(int X, int Y) {
  return &arr[X][Y] == arr;
}

instead of generating this:

bool %test2(int %X, int %Y) {
        %tmp.3.idx = mul int %X, 160            ; <int> [#uses=1]
        %tmp.3.idx1 = shl int %Y, ubyte 2               ; <int> [#uses=1]
        %tmp.3.offs2 = sub int 0, %tmp.3.idx            ; <int> [#uses=1]
        %tmp.7 = seteq int %tmp.3.idx1, %tmp.3.offs2            ; <bool> [#uses=1]
        ret bool %tmp.7
}

generate this:

bool %test2(int %X, int %Y) {
        seteq int %X, 0         ; <bool>:0 [#uses=1]
        seteq int %Y, 0         ; <bool>:1 [#uses=1]
        %tmp.7 = and bool %0, %1                ; <bool> [#uses=1]
        ret bool %tmp.7
}

This idiom occurs in C++ programs when iterating from begin() to end(),
in a vector or array.  For example, we now compile this:

void test(int X, int Y) {
  for (int *i = arr; i != arr+100; ++i)
    foo(*i);
}

to this:

no_exit:                ; preds = %entry, %no_exit
...
        %exitcond = seteq uint %indvar.next, 100                ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit

instead of this:

no_exit:                ; preds = %entry, %no_exit
...
        %inc5 = getelementptr [100 x [40 x int]]* %arr, int 0, int 0, int %inc.rec              ; <int*> [#uses=1]
        %tmp.8 = seteq int* %inc5, getelementptr ([100 x [40 x int]]* %arr, int 0, int 100, int 0)              ; <bool> [#uses=1]
        %indvar.next = add uint %indvar, 1              ; <uint> [#uses=1]
        br bool %tmp.8, label %return, label %no_exit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19536 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
Chris Lattner [Thu, 13 Jan 2005 20:50:02 +0000 (20:50 +0000)]
Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19535 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix some bugs in code I didn't mean to check in.
Chris Lattner [Thu, 13 Jan 2005 20:40:58 +0000 (20:40 +0000)]
Fix some bugs in code I didn't mean to check in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19534 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoFix a crash compiling 129.compress
Chris Lattner [Thu, 13 Jan 2005 20:14:25 +0000 (20:14 +0000)]
Fix a crash compiling 129.compress

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19533 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoCodegen factor nodes more intelligently according to perceived register pressure.
Chris Lattner [Thu, 13 Jan 2005 19:56:00 +0000 (19:56 +0000)]
Codegen factor nodes more intelligently according to perceived register pressure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19532 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoDon't forget the existing root.
Chris Lattner [Thu, 13 Jan 2005 19:53:14 +0000 (19:53 +0000)]
Don't forget the existing root.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19531 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoUpdate the documentation about -enable-llcbeta vs. -enable-linscan
Reid Spencer [Thu, 13 Jan 2005 18:02:40 +0000 (18:02 +0000)]
Update the documentation about -enable-llcbeta vs. -enable-linscan

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19530 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoInitial trivial (but stupid) codegen for this node.
Chris Lattner [Thu, 13 Jan 2005 18:01:36 +0000 (18:01 +0000)]
Initial trivial (but stupid) codegen for this node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19529 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoCodegen independent ops as being independent.
Chris Lattner [Thu, 13 Jan 2005 17:59:43 +0000 (17:59 +0000)]
Codegen independent ops as being independent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19528 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoLegalize new node, add assertion.
Chris Lattner [Thu, 13 Jan 2005 17:59:25 +0000 (17:59 +0000)]
Legalize new node, add assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19527 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoPrint new node.
Chris Lattner [Thu, 13 Jan 2005 17:59:10 +0000 (17:59 +0000)]
Print new node.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19526 91177308-0d34-0410-b5e6-96231b3b80d8

19 years agoAdd a new node type, add comments.
Chris Lattner [Thu, 13 Jan 2005 17:58:35 +0000 (17:58 +0000)]
Add a new node type, add comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19525 91177308-0d34-0410-b5e6-96231b3b80d8