Commit Graph

9815 Commits

Author SHA1 Message Date
Alkis Evlogimenos 13e8623a3f Cleanup debugging output.
llvm-svn: 10824
2004-01-13 21:53:20 +00:00
Chris Lattner 66f33ff6c2 Finegrainify namespacification
Using the SlotCalculator is total overkill for this file, a simple map
will suffice.  Why doesn't this use the NameMangler interface?

llvm-svn: 10823
2004-01-13 21:27:59 +00:00
Alkis Evlogimenos 33f9cb1da7 Fix output of live intervals to show correctly its closed, open
ranges, i.e. [a,b)

llvm-svn: 10822
2004-01-13 21:17:47 +00:00
Alkis Evlogimenos 9d0c3d21c8 Remove unneeded check (with the recent change in live variables a use
of a physical register is always dominated by a def).

llvm-svn: 10821
2004-01-13 21:16:25 +00:00
Alkis Evlogimenos 65bc990bda Indentation and whitespace cleanups.
llvm-svn: 10820
2004-01-13 20:42:08 +00:00
Alkis Evlogimenos 6b1ec75da9 Fix bug introduced by previous commit: check if fixed intervals
overlap before adding their spill weight.

llvm-svn: 10819
2004-01-13 20:37:01 +00:00
Brian Gaeke dbd9c33e5e Remove dump-input option.
Make addPassesToEmitAssembly() look slightly more like addPassesToJITCompile().

llvm-svn: 10818
2004-01-13 19:26:21 +00:00
Brian Gaeke f26dad5432 Regenerated using autoheader-2.57.
llvm-svn: 10817
2004-01-13 07:09:57 +00:00
Brian Gaeke 663a05917e Simplify configure rules. (I don't know if anyone else cares...)
llvm-svn: 10816
2004-01-13 07:09:56 +00:00
Brian Gaeke 07e46214d0 Whoopsie. I should remember to use aclocal next time.
llvm-svn: 10815
2004-01-13 06:52:10 +00:00
Brian Gaeke 2abe7ae3b6 Remove and/or shorten many comments in configure.ac.
Remove checks for many common Unix programs. Our build process currently
assumes they are there and makes no provisions for any other world-views.
(We can add some of these checks back at some later time if it should prove
useful, but right now, we do not need to check to see whether "rm" exists.)

Remove checks for many common standard C headers and functions. We assume
ISO/ANSI C++, and we always use the <cfoo> versions of ANSI C's <foo.h>
headers, so these checks will not help anything.

Edit configure's warning messages for clarity and content.

Change checks for "optional" programs to default to using "true" instead of
"false", so that a failure to find, e.g., etags, will be less likely to result
in make failing.

No longer shall we check for --enable-purify or --with-purify options.
No longer shall we propagate these to the Makefiles.

configure regenerated using autoconf-2.57.

Please feel free to send me any questions or comments you have. :-)

llvm-svn: 10814
2004-01-13 06:43:16 +00:00
Alkis Evlogimenos ebbd66c042 Correctly compute live variable information for physical registers
when an implicitely defined register is later used by an alias. For example:

         call foo
         %reg1024 = mov %AL

The call implicitely defines EAX but only AL is used. Before this fix
no information was available on AL. Now EAX and all its aliases except
AL get defined and die at the call instruction whereas AL lives to be
killed by the assignment.

llvm-svn: 10813
2004-01-13 06:24:30 +00:00
Chris Lattner 061da2f059 Implement a bunch of symbolic constant folding opportunities. This implements
testcase test/Regression/Assembler/ConstantExprFold.llx

Note that these kinds of things only rarely show up in source code, but are
exceedingly common in the intermediate stages of algorithms like SCCP.  By
folding things (especially relational operators) that use symbolic constants,
we are able to speculatively fold more conditional branches, which can
lead to some big simplifications.

It would be easy to add a lot more special cases here, so if you notice
SCCP missing anything "obvious", you know what to make smarter.  :)

llvm-svn: 10812
2004-01-13 05:51:55 +00:00
Chris Lattner 29d0a24201 New testcase for symbolic constant folding opportunities that LLVM should get.
llvm-svn: 10811
2004-01-13 05:32:27 +00:00
Chris Lattner dab8b6bb50 Implement new Instruction::isRelational method
llvm-svn: 10810
2004-01-12 23:18:25 +00:00
Chris Lattner bf007407c5 Add new method
llvm-svn: 10809
2004-01-12 23:18:06 +00:00
Chris Lattner 1dd054c41b Rearrange and comment code better. No functionality changes
llvm-svn: 10808
2004-01-12 22:07:24 +00:00
Chris Lattner 5a945e3616 Rename ConstantHandling.* -> ConstantFolding.*
Move a bunch of (now) private stuff from ConstantFolding.h into
ConstantFolding.cpp.

This _finally_ gets us to a place where we have a sane constant folder.  The
rules are:

1. LLVM clients now use ConstantExpr::get* methods to fold constants.  If they
   cannot be folded, a constantexpr is created, so these methods always return
   valid Constant*'s.
2. The implementation of ConstantExpr::get* uses the functions exposed by
   ConstantFolding.h to try to fold constants.  If they cannot be folded,
   they should return a null pointer.
3. The implementation of ConstantFolding can do whatever it wants, and only
   has one client (Constants.cpp)

This cuts down on the wierd dependencies, and eliminates the two interfaces.
The old constanthandling interface was especially bad for clients to use
because almost none of them took the failure condition into consideration,
thus leading to obscure problems.

llvm-svn: 10807
2004-01-12 21:13:12 +00:00
Chris Lattner 6ff6ceaf75 Remove a whole bunch more ugliness. This is actually getting to the point of
this whole refactoring: allow constant folding methods to return something
other than predefined classes, allow them to return generic Constant*'s.

llvm-svn: 10806
2004-01-12 21:02:29 +00:00
Chris Lattner 2361bd02a1 Move ConstantHandling.h into lib/VMCore and out of include/llvm
llvm-svn: 10805
2004-01-12 20:48:11 +00:00
Chris Lattner e4867d75dd Move this file to lib/VMCore
llvm-svn: 10804
2004-01-12 20:47:29 +00:00
Chris Lattner 7998ce01d4 Eliminate a lot of out-of-date comments, and all of the wierd overloaded
operator constant folding stuff.

llvm-svn: 10803
2004-01-12 20:43:44 +00:00
Chris Lattner f8348c3549 Eliminate usage of the wierd overloaded operator constant folders
llvm-svn: 10802
2004-01-12 20:41:05 +00:00
Chris Lattner 0bba771f49 Eliminate ConstantFoldShiftInstruction reference
llvm-svn: 10801
2004-01-12 20:40:42 +00:00
Chris Lattner b1505c8594 Remove use of ConstantHandling itf
llvm-svn: 10800
2004-01-12 20:13:04 +00:00
Chris Lattner 6b052f2154 Clean up #includes
llvm-svn: 10799
2004-01-12 19:56:36 +00:00
Chris Lattner fcf21a75b0 Fix bug in previous checkin
llvm-svn: 10798
2004-01-12 19:47:05 +00:00
Chris Lattner abc7519fc8 The getShift method is no obsolete
llvm-svn: 10797
2004-01-12 19:37:26 +00:00
Chris Lattner c1e7cc0fbe Eliminate use of ConstantHandling and ConstantExpr::getShift interfaces
llvm-svn: 10796
2004-01-12 19:35:11 +00:00
Chris Lattner d7ccc9e5a5 Add header file I accidentally removed in teh shuffle
llvm-svn: 10795
2004-01-12 19:15:20 +00:00
Chris Lattner 9eb2b527ad Fix out of date comment, remove use of ConstantExpr::getShift
llvm-svn: 10794
2004-01-12 19:12:58 +00:00
Chris Lattner c9fb4a3b89 Remove use of the ConstantHandling interfaces
llvm-svn: 10793
2004-01-12 19:12:50 +00:00
Chris Lattner 429963742e Remove use of ConstantExpr::getShift
llvm-svn: 10792
2004-01-12 19:10:58 +00:00
Chris Lattner 1b7d4d7b63 Don't use ConstantExpr::getShift anymore
llvm-svn: 10791
2004-01-12 19:08:43 +00:00
Chris Lattner 5645e8a82d Make ConstantExpr::get work for shifts as well
llvm-svn: 10790
2004-01-12 19:04:55 +00:00
Chris Lattner 2853a7ed22 Remove use of ConstantHandling
llvm-svn: 10789
2004-01-12 18:35:03 +00:00
Chris Lattner 118a76cb2f Remove unneeded #include
llvm-svn: 10788
2004-01-12 18:33:54 +00:00
Chris Lattner c04cf98fb6 llvm::ConstantFoldInstruction
llvm-svn: 10787
2004-01-12 18:25:56 +00:00
Chris Lattner aecd3e8a10 Move prototype of llvm::ConstantFoldInstruction
llvm-svn: 10786
2004-01-12 18:25:44 +00:00
Chris Lattner fc6c859a0c Move llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator
llvm-svn: 10785
2004-01-12 18:25:22 +00:00
Chris Lattner 0df14b3f2b Move llvm::ConstantFoldInstruction from here to Transforms/Utils
llvm-svn: 10784
2004-01-12 18:25:03 +00:00
Chris Lattner 81d8822396 Remove uses of ConstantHandling itf
llvm-svn: 10783
2004-01-12 18:12:44 +00:00
Chris Lattner fe2aafe08a Eliminate use of ConstantHandling itf
llvm-svn: 10782
2004-01-12 18:08:18 +00:00
Chris Lattner 85f325b544 Remove use of ConstantHandling itf
llvm-svn: 10781
2004-01-12 18:02:15 +00:00
Chris Lattner c99dd898af Eliminate use of ConstantHandling itf
llvm-svn: 10780
2004-01-12 17:57:32 +00:00
Chris Lattner 0fe5b32c01 Use constantexprs for casts. Eliminate use of the ConstantHandling interfaces
llvm-svn: 10779
2004-01-12 17:43:40 +00:00
Chris Lattner fe992d4332 Fix fairly severe bug in my last checking where we treated all unfoldable
constants as being "true" when evaluating branches.  This was introduced
because we now create constantexprs for the constants instead of failing the
fold.

llvm-svn: 10778
2004-01-12 17:40:36 +00:00
Chris Lattner 4bb9bc3a65 Eliminate annoying warnings from the tester, hopefully for real this time.
llvm-svn: 10777
2004-01-12 16:55:30 +00:00
John Criswell 42967349be Modified the configure script so that it defines BISON as the bison
binary and YACC as bison -y.

llvm-svn: 10776
2004-01-12 16:18:21 +00:00
John Criswell cd08e2815f The configure script now defines BISON as the name of the bison program and
YACC as bison -y.  In this way, we ensure that bison is being used, but
the Makefiles have macros for using bison itself and for getting bison to
act like it is traditional yacc.

llvm-svn: 10774
2004-01-12 16:14:54 +00:00