Brian Gaeke [Thu, 15 Jan 2004 18:15:58 +0000 (18:15 +0000)]
Make this assertion more self-explanatory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 17:59:29 +0000 (17:59 +0000)]
Hrm, thanks to misha for paying attention to my foolishness!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10878
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 17:55:21 +0000 (17:55 +0000)]
PR73 is finally fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10877
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 17:55:09 +0000 (17:55 +0000)]
Fix PR73: bytecode format inconsistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10876
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 17:55:01 +0000 (17:55 +0000)]
Fix PR73
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10875
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 16:56:15 +0000 (16:56 +0000)]
Fix brokenness in my last checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10874
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 15 Jan 2004 06:22:37 +0000 (06:22 +0000)]
Remove configure support for endianness checking, the need for which
Chris has helpfully expunged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10873
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 06:13:58 +0000 (06:13 +0000)]
Remove ENDIAN_* support. LLVM does not need it anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10872
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 06:13:09 +0000 (06:13 +0000)]
Change all of the bytecode reader primitives to throw exceptions instead of
returning error codes. Because they don't return an error code, they can
return the value read, which simplifies the code and makes the reader more
efficient (yaay!).
Also eliminate the special case code for little endian machines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10871
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 06:11:30 +0000 (06:11 +0000)]
Remove the optimization that depends on ENDIAN_LITTLE: it's not worth it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10870
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 15 Jan 2004 04:37:10 +0000 (04:37 +0000)]
Remove broken doxygen comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10869
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 15 Jan 2004 00:14:41 +0000 (00:14 +0000)]
* Conform to HTML 4.01 strict DTD
* Use stylesheets instead of hard-coding formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10868
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 15 Jan 2004 00:13:59 +0000 (00:13 +0000)]
Make the stylesheet conform to CSS standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10867
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 23:37:43 +0000 (23:37 +0000)]
Improve comments, add support for remembering the constants strings that
are to be emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10866
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 23:37:22 +0000 (23:37 +0000)]
add support for -- for symmetry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10865
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 23:36:54 +0000 (23:36 +0000)]
The new bytecode format supports emitting strings a special case. This is
intended to save size (and does on small programs), but on big programs it
actually increases the size of the program slightly. The deal is that many
functions end up using the characters that the string contained, and the
characters are no longer in the global constant table, so they have to be
emitted in function specific constant pools.
This pessimization will be fixed in subsequent patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10864
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 23:35:21 +0000 (23:35 +0000)]
Version 1.2 now supports encoding strings as a special case, to avoid having
to emit all of those sbyte constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10863
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 23:34:39 +0000 (23:34 +0000)]
When emitting bytecode, handle strings specially. Do not add the characters
that make up the strings to the slotcalculator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10862
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 23:03:22 +0000 (23:03 +0000)]
Like output_data, it's obvious that input_data was only used with 1 character
data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10861
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 21:18:03 +0000 (21:18 +0000)]
"fix" a nasty race condition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10860
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 20:58:17 +0000 (20:58 +0000)]
Fix some exception safety problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10859
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 20:41:29 +0000 (20:41 +0000)]
Hrm, apparently I missed lowering this intrinsic. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10858
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 18:50:28 +0000 (18:50 +0000)]
It is obvious that this has never been used for outputing more than a single
byte, it's totally endian incorrect!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10857
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 18:41:38 +0000 (18:41 +0000)]
Be const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10856
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 17:51:53 +0000 (17:51 +0000)]
Fix bug in previous checkin: Demorgan would be ashamed of me, I need to
lay off the crack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10855
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 17:15:17 +0000 (17:15 +0000)]
Eliminate the isStringCompatible function, using ConstantArray::isString.
It's not clear why the code was looking for signed chars < 0, but it can't
matter to the assembler anyway, so the check goes away. This also fixes
compatibility with arrays of [us]byte that have constantexprs in them.
Also slightly restructure some code to be cleaner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10854
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 17:14:42 +0000 (17:14 +0000)]
Eliminate the isStringCompatible function, using ConstantArray::isString.
It's not clear why the code was looking for signed chars < 0, but it can't
matter to the assembler anyway, so the check goes away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10853
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 17:07:46 +0000 (17:07 +0000)]
Use new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10852
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 17:06:38 +0000 (17:06 +0000)]
Implement ConstantArray::isString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10851
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 17:06:21 +0000 (17:06 +0000)]
Add new ConstantArray::isString(), as the conditions for using getString()
are complex enough to check that it should be a seperate method.
While I'm here, improve ConstantArray::getNullValue a bit, though the
FIXME is still quite valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10850
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 16:54:21 +0000 (16:54 +0000)]
Ok, I can't handle it. This is a temporary checkin of a ton of statistics that
i'm using in my work to reduce the bytecode file sizes. These will eventually
be removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10849
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 16:44:44 +0000 (16:44 +0000)]
Remove support for the pre-1.0 bytecode version #1. This will become
the bytecode revision generated by LLVM 1.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10848
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Wed, 14 Jan 2004 10:44:29 +0000 (10:44 +0000)]
Properly update #intervals statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10847
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 06:06:08 +0000 (06:06 +0000)]
Fix InstCombine/2004-01-13-InstCombineInvokePHI.ll, which also fixes lots
of C++ programs in Shootout-C++, including lists1 and moments, etc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10845
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 14 Jan 2004 06:02:53 +0000 (06:02 +0000)]
Don't pass anything to the IntrinsicLowering class that is not_intrinsic,
because that makes it abort. Also, fix a typo in a comment.
This checkin brought to you by the "It only takes about 30 seconds to run
ENABLE_LLI tests on Shootout on zion, even if they all dump core" fund.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10844
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 05:53:11 +0000 (05:53 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10843
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 05:42:52 +0000 (05:42 +0000)]
Fix check. PHI nodes must be handled specially, of course.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10842
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 04:25:59 +0000 (04:25 +0000)]
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 03:39:46 +0000 (03:39 +0000)]
Make sure to verify the result before writing out the bytecode file. Not doing
so can cause obscure errors downstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10840
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 03:38:37 +0000 (03:38 +0000)]
finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10839
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 02:50:16 +0000 (02:50 +0000)]
Toggle sense of flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2004 02:49:34 +0000 (02:49 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10837
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Wed, 14 Jan 2004 00:20:09 +0000 (00:20 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10835
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Wed, 14 Jan 2004 00:09:36 +0000 (00:09 +0000)]
Improve debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10834
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 22:26:14 +0000 (22:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10833
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 22:22:19 +0000 (22:22 +0000)]
You know you like Makefiles with fewer variables. Next up on the victim list
is TOOLS, which is how you say LLVMTOOLCURRENT in Oldspeak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10832
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 22:10:43 +0000 (22:10 +0000)]
Remove allocatable registers vector. It is already provided by
LiveVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10830
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 22:10:06 +0000 (22:10 +0000)]
Get rid of dead defns of LCC, LCXX, LAS, as per FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10829
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 21:59:51 +0000 (21:59 +0000)]
Fix overzealous fixme fixing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10827
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 21:56:30 +0000 (21:56 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10825
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 21:53:20 +0000 (21:53 +0000)]
Cleanup debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10824
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Jan 2004 21:27:59 +0000 (21:27 +0000)]
Finegrainify namespacification
Using the SlotCalculator is total overkill for this file, a simple map
will suffice. Why doesn't this use the NameMangler interface?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10823
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 21:17:47 +0000 (21:17 +0000)]
Fix output of live intervals to show correctly its closed, open
ranges, i.e. [a,b)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10822
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 21:16:25 +0000 (21:16 +0000)]
Remove unneeded check (with the recent change in live variables a use
of a physical register is always dominated by a def).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10821
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 20:42:08 +0000 (20:42 +0000)]
Indentation and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10820
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 20:37:01 +0000 (20:37 +0000)]
Fix bug introduced by previous commit: check if fixed intervals
overlap before adding their spill weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10819
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 19:26:21 +0000 (19:26 +0000)]
Remove dump-input option.
Make addPassesToEmitAssembly() look slightly more like addPassesToJITCompile().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10818
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 07:09:57 +0000 (07:09 +0000)]
Regenerated using autoheader-2.57.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10817
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 07:09:56 +0000 (07:09 +0000)]
Simplify configure rules. (I don't know if anyone else cares...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10816
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 06:52:10 +0000 (06:52 +0000)]
Whoopsie. I should remember to use aclocal next time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10815
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 13 Jan 2004 06:43:16 +0000 (06:43 +0000)]
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. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10814
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Tue, 13 Jan 2004 06:24:30 +0000 (06:24 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10813
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Jan 2004 05:51:55 +0000 (05:51 +0000)]
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. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10812
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Jan 2004 05:32:27 +0000 (05:32 +0000)]
New testcase for symbolic constant folding opportunities that LLVM should get.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10811
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 23:18:25 +0000 (23:18 +0000)]
Implement new Instruction::isRelational method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10810
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 23:18:06 +0000 (23:18 +0000)]
Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10809
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 22:07:24 +0000 (22:07 +0000)]
Rearrange and comment code better. No functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10808
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 21:13:12 +0000 (21:13 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10807
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 21:02:29 +0000 (21:02 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10806
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 20:48:11 +0000 (20:48 +0000)]
Move ConstantHandling.h into lib/VMCore and out of include/llvm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10805
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 20:47:29 +0000 (20:47 +0000)]
Move this file to lib/VMCore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10804
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 20:43:44 +0000 (20:43 +0000)]
Eliminate a lot of out-of-date comments, and all of the wierd overloaded
operator constant folding stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10803
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 20:41:05 +0000 (20:41 +0000)]
Eliminate usage of the wierd overloaded operator constant folders
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10802
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 20:40:42 +0000 (20:40 +0000)]
Eliminate ConstantFoldShiftInstruction reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10801
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 20:13:04 +0000 (20:13 +0000)]
Remove use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10800
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:56:36 +0000 (19:56 +0000)]
Clean up #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10799
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:47:05 +0000 (19:47 +0000)]
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10798
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:37:26 +0000 (19:37 +0000)]
The getShift method is no obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10797
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:35:11 +0000 (19:35 +0000)]
Eliminate use of ConstantHandling and ConstantExpr::getShift interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10796
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:15:20 +0000 (19:15 +0000)]
Add header file I accidentally removed in teh shuffle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10795
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:12:58 +0000 (19:12 +0000)]
Fix out of date comment, remove use of ConstantExpr::getShift
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10794
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:12:50 +0000 (19:12 +0000)]
Remove use of the ConstantHandling interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10793
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:10:58 +0000 (19:10 +0000)]
Remove use of ConstantExpr::getShift
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10792
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:08:43 +0000 (19:08 +0000)]
Don't use ConstantExpr::getShift anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10791
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 19:04:55 +0000 (19:04 +0000)]
Make ConstantExpr::get work for shifts as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10790
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:35:03 +0000 (18:35 +0000)]
Remove use of ConstantHandling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:33:54 +0000 (18:33 +0000)]
Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10788
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:25:56 +0000 (18:25 +0000)]
llvm::ConstantFoldInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10787
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:25:44 +0000 (18:25 +0000)]
Move prototype of llvm::ConstantFoldInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:25:22 +0000 (18:25 +0000)]
Move llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10785
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:25:03 +0000 (18:25 +0000)]
Move llvm::ConstantFoldInstruction from here to Transforms/Utils
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10784
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:12:44 +0000 (18:12 +0000)]
Remove uses of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10783
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:08:18 +0000 (18:08 +0000)]
Eliminate use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10782
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 18:02:15 +0000 (18:02 +0000)]
Remove use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10781
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 17:57:32 +0000 (17:57 +0000)]
Eliminate use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10780
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 17:43:40 +0000 (17:43 +0000)]
Use constantexprs for casts. Eliminate use of the ConstantHandling interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10779
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 17:40:36 +0000 (17:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10778
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Jan 2004 16:55:30 +0000 (16:55 +0000)]
Eliminate annoying warnings from the tester, hopefully for real this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10777
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 12 Jan 2004 16:18:21 +0000 (16:18 +0000)]
Modified the configure script so that it defines BISON as the bison
binary and YACC as bison -y.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10776
91177308-0d34-0410-b5e6-
96231b3b80d8
John Criswell [Mon, 12 Jan 2004 16:14:54 +0000 (16:14 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10774
91177308-0d34-0410-b5e6-
96231b3b80d8