oota-llvm.git
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

19 years agoTurn on LOADABLE_MODULE so that profile.so can be loaded dynamically by
Reid Spencer [Thu, 13 Jan 2005 16:53:05 +0000 (16:53 +0000)]
Turn on LOADABLE_MODULE so that profile.so can be loaded dynamically by
the JIT.

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

19 years agoRe-enable libprofile now that llvm-ar is working better.
Reid Spencer [Thu, 13 Jan 2005 16:51:19 +0000 (16:51 +0000)]
Re-enable libprofile now that llvm-ar is working better.

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

19 years agoAdd some really pedantic assertions to the load folding code. Fix a bunch
Chris Lattner [Thu, 13 Jan 2005 05:53:16 +0000 (05:53 +0000)]
Add some really pedantic assertions to the load folding code.  Fix a bunch
of cases where we accidentally emitted a load folded once and unfolded
elsewhere.

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

19 years agoDo not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.
Chris Lattner [Wed, 12 Jan 2005 18:51:15 +0000 (18:51 +0000)]
Do not fold (zero_ext (sign_ext V)) -> (sign_ext V), they are not the same.

This fixes llvm-test/SingleSource/Regression/C/casts.c

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

19 years agoWe can only fold a load into an op if there is exactly one use of the value.
Chris Lattner [Wed, 12 Jan 2005 18:38:26 +0000 (18:38 +0000)]
We can only fold a load into an op if there is exactly one use of the value.
Checking to see if the load has two uses is not equivalent, as the chain
value may have zero uses.

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

19 years agoNew method
Chris Lattner [Wed, 12 Jan 2005 18:37:47 +0000 (18:37 +0000)]
New method

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

19 years agoNew method.
Chris Lattner [Wed, 12 Jan 2005 18:37:33 +0000 (18:37 +0000)]
New method.

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

19 years agoFix sign extend to long. When coming from sbyte, we used to generate:
Chris Lattner [Wed, 12 Jan 2005 18:19:52 +0000 (18:19 +0000)]
Fix sign extend to long.  When coming from sbyte, we used to generate:

        movsbl 4(%esp), %eax
        movl %eax, %edx
        sarl $7, %edx

Now we generate:

        movsbl 4(%esp), %eax
        movl %eax, %edx
        sarl $31, %edx

Which is right.

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

19 years agoUpdate comments to indicate CopyFrom/ToReg take physregs as well as vregs.
Chris Lattner [Wed, 12 Jan 2005 18:11:36 +0000 (18:11 +0000)]
Update comments to indicate CopyFrom/ToReg take physregs as well as vregs.

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

19 years agoTry both ways to fold an add together. This allows us to generate this code
Chris Lattner [Wed, 12 Jan 2005 18:08:53 +0000 (18:08 +0000)]
Try both ways to fold an add together.  This allows us to generate this code

        imul %EAX, %EAX, 400
        add %ECX, %EAX
        add %ESI, DWORD PTR [%ECX + 4*%EDX]
        inc %EDX
        cmp %EDX, 100

instead of this:

        imul %EAX, %EAX, 400
        add %ECX, %EAX
        mov %EAX, %EDX
        shl %EAX, 2
        add %ECX, %EAX
        add %ESI, DWORD PTR [%ECX]
        inc %EDX
        cmp %EDX, 100

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

19 years agoShut up warnings with GCC 3.4.3 about uninitialized variables.
Reid Spencer [Wed, 12 Jan 2005 14:53:45 +0000 (14:53 +0000)]
Shut up warnings with GCC 3.4.3 about uninitialized variables.

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

19 years agoFix a major miscompilation where we were overwriting the scale reg.
Chris Lattner [Wed, 12 Jan 2005 07:33:20 +0000 (07:33 +0000)]
Fix a major miscompilation where we were overwriting the scale reg.

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

19 years agoDo not use the type of the RHS constant to determine the type of the operation.
Chris Lattner [Wed, 12 Jan 2005 05:22:07 +0000 (05:22 +0000)]
Do not use the type of the RHS constant to determine the type of the operation.
This fails for shifts because the constant is always 8 bits.

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

19 years agoDo not lose the offset from teh global when peephole optimizing instructions.
Chris Lattner [Wed, 12 Jan 2005 05:17:28 +0000 (05:17 +0000)]
Do not lose the offset from teh global when peephole optimizing instructions.
This fixes FreeBench/pcompress

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

19 years agoSilence VC++ warnings.
Chris Lattner [Wed, 12 Jan 2005 04:51:37 +0000 (04:51 +0000)]
Silence VC++ warnings.

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

19 years agoAdd new file to Visual Studio CodeGen project
Jeff Cohen [Wed, 12 Jan 2005 04:32:42 +0000 (04:32 +0000)]
Add new file to Visual Studio CodeGen project

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

19 years agoFix C++ more compilatiom errors
Jeff Cohen [Wed, 12 Jan 2005 04:29:05 +0000 (04:29 +0000)]
Fix C++ more compilatiom errors

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

19 years agoFix a compile error with VC++, which things that static const arrays need
Chris Lattner [Wed, 12 Jan 2005 04:23:22 +0000 (04:23 +0000)]
Fix a compile error with VC++, which things that static const arrays need
to be dynamically initialized. :(

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

19 years agoFix a bug that caused us to crash on povray. We weren't emitting an FP_REG_KILL...
Chris Lattner [Wed, 12 Jan 2005 04:21:28 +0000 (04:21 +0000)]
Fix a bug that caused us to crash on povray.  We weren't emitting an FP_REG_KILL into a block that had a successor with a FP PHI node.

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

19 years agoPrint a load of a null pointer (in intel mode) like this:
Chris Lattner [Wed, 12 Jan 2005 04:07:11 +0000 (04:07 +0000)]
Print a load of a null pointer (in intel mode) like this:

        mov %AX, WORD PTR [0]

instead of like this:

        mov %AX, WORD PTR []

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

19 years agoPrint a load of a null pointer like this:
Chris Lattner [Wed, 12 Jan 2005 04:05:19 +0000 (04:05 +0000)]
Print a load of a null pointer like this:

        movw 0, %ax

instead of like this:

        movw , %ax

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

19 years agoFix a crash compiling povray on UINT_TO_FP from i16.
Chris Lattner [Wed, 12 Jan 2005 04:00:00 +0000 (04:00 +0000)]
Fix a crash compiling povray on UINT_TO_FP from i16.

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

19 years agoAdd an option to view the selection dags as they are generated.
Chris Lattner [Wed, 12 Jan 2005 03:41:21 +0000 (03:41 +0000)]
Add an option to view the selection dags as they are generated.

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

19 years agoUse and print out BuildStatus, we don't always have build errors.
Misha Brukman [Wed, 12 Jan 2005 03:31:38 +0000 (03:31 +0000)]
Use and print out BuildStatus, we don't always have build errors.

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

19 years agoThere are no [mem] op= reg instructions for FP, so remove their entries.
Chris Lattner [Wed, 12 Jan 2005 03:16:09 +0000 (03:16 +0000)]
There are no [mem] op= reg instructions for FP, so remove their entries.

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