Commit Graph

9879 Commits

Author SHA1 Message Date
Chris Lattner 02062823f7 Fix check. PHI nodes must be handled specially, of course.
llvm-svn: 10842
2004-01-14 05:42:52 +00:00
Chris Lattner ec5089a223 Tighten up verifier checks. The result of an invoke instruction only
dominates the normal destination, not the exceptional dest (ie, the result
of a call is undefined on an exception)

llvm-svn: 10841
2004-01-14 04:25:59 +00:00
Chris Lattner 298d2f090f Make sure to verify the result before writing out the bytecode file. Not doing
so can cause obscure errors downstream.

llvm-svn: 10840
2004-01-14 03:39:46 +00:00
Chris Lattner 2f1aa118a4 finegrainify namespacification
llvm-svn: 10839
2004-01-14 03:38:37 +00:00
Chris Lattner 1f018c2d01 Toggle sense of flag
llvm-svn: 10838
2004-01-14 02:50:16 +00:00
Chris Lattner 6089bb1f19 The only clients of the slot calculator are now the asmwriter and bcwriter.
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not.  This makes it
reasonable to add bcwriter specific stuff to it as necessary.

llvm-svn: 10837
2004-01-14 02:49:34 +00:00
Alkis Evlogimenos 2615c98042 Fix bug in LiveIntervals::Interval::overlaps and
LiveIntervals::Interval::liveAt. Both were considering the live ranges
closed in the end, when they are actually open.

llvm-svn: 10835
2004-01-14 00:20:09 +00:00
Alkis Evlogimenos a0865cec3f Improve debugging output.
llvm-svn: 10834
2004-01-14 00:09:36 +00:00
Alkis Evlogimenos 0431621429 Fix miscomputation of live intervals. The catch is that registers can
be dead at the defining instruction but can only be killed in
subsequent ones.

llvm-svn: 10833
2004-01-13 22:26:14 +00:00
Brian Gaeke edf6c9d5a4 You know you like Makefiles with fewer variables. Next up on the victim list
is TOOLS, which is how you say LLVMTOOLCURRENT in Oldspeak.

llvm-svn: 10832
2004-01-13 22:22:19 +00:00
Alkis Evlogimenos 1a01c80f1b Remove allocatable registers vector. It is already provided by
LiveVariables.

llvm-svn: 10830
2004-01-13 22:10:43 +00:00
Brian Gaeke c0e7e5341e Get rid of dead defns of LCC, LCXX, LAS, as per FIXME.
llvm-svn: 10829
2004-01-13 22:10:06 +00:00
Brian Gaeke b96e5772f0 Fix overzealous fixme fixing
llvm-svn: 10827
2004-01-13 21:59:51 +00:00
Brian Gaeke 493c4c7f12 Remove dead definitions of NATGCC and CP, and dead .tll, .tbc rules.
Make should continue even if compilation cmds fail, for the sake of
the nightly tester, so use minuses on them.

Use LLVMAS, LLVMGCC, LLVMGXX instead of LAS, LCC, LCXX (as per FIXME).

llvm-svn: 10825
2004-01-13 21:56:30 +00:00
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