oota-llvm.git
20 years agoFinegrainify namespacification
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

20 years agoFix output of live intervals to show correctly its closed, open
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

20 years agoRemove unneeded check (with the recent change in live variables a use
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

20 years agoIndentation and whitespace cleanups.
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

20 years agoFix bug introduced by previous commit: check if fixed intervals
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

20 years agoRemove dump-input option.
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

20 years agoRegenerated using autoheader-2.57.
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

20 years agoSimplify configure rules. (I don't know if anyone else cares...)
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

20 years agoWhoopsie. I should remember to use aclocal next time.
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

20 years agoRemove and/or shorten many comments in configure.ac.
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

20 years agoCorrectly compute live variable information for physical registers
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

20 years agoImplement a bunch of symbolic constant folding opportunities. This implements
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

20 years agoNew testcase for symbolic constant folding opportunities that LLVM should get.
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

20 years agoImplement new Instruction::isRelational method
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

20 years agoAdd new method
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

20 years agoRearrange and comment code better. No functionality changes
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

20 years agoRename ConstantHandling.* -> ConstantFolding.*
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

20 years agoRemove a whole bunch more ugliness. This is actually getting to the point of
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

20 years agoMove ConstantHandling.h into lib/VMCore and out of include/llvm
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

20 years agoMove this file to lib/VMCore
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

20 years agoEliminate a lot of out-of-date comments, and all of the wierd overloaded
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

20 years agoEliminate usage of the wierd overloaded operator constant folders
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

20 years agoEliminate ConstantFoldShiftInstruction reference
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

20 years agoRemove use of ConstantHandling itf
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

20 years agoClean up #includes
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

20 years agoFix bug in previous checkin
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

20 years agoThe getShift method is no obsolete
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

20 years agoEliminate use of ConstantHandling and ConstantExpr::getShift interfaces
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

20 years agoAdd header file I accidentally removed in teh shuffle
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

20 years agoFix out of date comment, remove use of ConstantExpr::getShift
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

20 years agoRemove use of the ConstantHandling interfaces
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

20 years agoRemove use of ConstantExpr::getShift
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

20 years agoDon't use ConstantExpr::getShift anymore
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

20 years agoMake ConstantExpr::get work for shifts as well
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

20 years agoRemove use of ConstantHandling
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

20 years agoRemove unneeded #include
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

20 years agollvm::ConstantFoldInstruction
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

20 years agoMove prototype of llvm::ConstantFoldInstruction
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

20 years agoMove llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator
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

20 years agoMove llvm::ConstantFoldInstruction from here to Transforms/Utils
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

20 years agoRemove uses of ConstantHandling itf
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

20 years agoEliminate use of ConstantHandling itf
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

20 years agoRemove use of ConstantHandling itf
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

20 years agoEliminate use of ConstantHandling itf
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

20 years agoUse constantexprs for casts. Eliminate use of the ConstantHandling interfaces
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

20 years agoFix fairly severe bug in my last checking where we treated all unfoldable
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

20 years agoEliminate annoying warnings from the tester, hopefully for real this time.
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

20 years agoModified the configure script so that it defines BISON as the bison
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

20 years agoThe configure script now defines BISON as the name of the bison program and
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

20 years agoOutput mov %REG = 0 instead of xor %REG, %REG, %REG to clear a
Alkis Evlogimenos [Mon, 12 Jan 2004 07:22:45 +0000 (07:22 +0000)]
Output mov %REG = 0 instead of xor %REG, %REG, %REG to clear a
register so that LiveVariable analysis is not confused.

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

20 years agoBug fixed
Chris Lattner [Mon, 12 Jan 2004 05:15:04 +0000 (05:15 +0000)]
Bug fixed

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

20 years agoTestcase for PR204
Chris Lattner [Mon, 12 Jan 2004 05:01:48 +0000 (05:01 +0000)]
Testcase for PR204

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

20 years agoAdd support for %llvmgcc
Chris Lattner [Mon, 12 Jan 2004 05:01:13 +0000 (05:01 +0000)]
Add support for %llvmgcc

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

20 years ago* Implement minor performance optimization for the getelementptr case
Chris Lattner [Mon, 12 Jan 2004 04:29:41 +0000 (04:29 +0000)]
* Implement minor performance optimization for the getelementptr case
* Implement SCCP of load instructions, implementing Transforms/SCCP/loadtest.ll
  This allows us to fold expressions like "foo"[2], even if the pointer is only
  a conditional constant.

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

20 years agoTest to make sure we can SCCP load instructions
Chris Lattner [Mon, 12 Jan 2004 04:28:32 +0000 (04:28 +0000)]
Test to make sure we can SCCP load instructions

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

20 years agoDo not hack on volatile loads. I'm not sure what the point of a volatile load
Chris Lattner [Mon, 12 Jan 2004 04:13:56 +0000 (04:13 +0000)]
Do not hack on volatile loads.  I'm not sure what the point of a volatile load
from constant memory is, but lets not take chances.

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

20 years agoImplement SCCP/phitest.ll
Chris Lattner [Mon, 12 Jan 2004 03:57:30 +0000 (03:57 +0000)]
Implement SCCP/phitest.ll

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

20 years agoNew testcase, allow folding of binary operators that use PHI nodes, as long
Chris Lattner [Mon, 12 Jan 2004 03:57:00 +0000 (03:57 +0000)]
New testcase, allow folding of binary operators that use PHI nodes, as long
as the result of the binary operator is always constant.  This does not require
the PHI itself to be constant though.

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

20 years agoImplement Transforms/ScalarRepl/phinodepromote.ll, which is an important
Chris Lattner [Mon, 12 Jan 2004 01:18:32 +0000 (01:18 +0000)]
Implement Transforms/ScalarRepl/phinodepromote.ll, which is an important
case that the C/C++ front-end generates.

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

20 years agoNew testcase
Chris Lattner [Mon, 12 Jan 2004 01:17:42 +0000 (01:17 +0000)]
New testcase

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

20 years agoImplement: Assembler/2004-01-11-getelementptrfolding.llx
Chris Lattner [Sun, 11 Jan 2004 23:56:33 +0000 (23:56 +0000)]
Implement: Assembler/2004-01-11-getelementptrfolding.llx

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

20 years agoThis isn't really an assembler test. This tests to make sure the
Chris Lattner [Sun, 11 Jan 2004 23:56:03 +0000 (23:56 +0000)]
This isn't really an assembler test.  This tests to make sure the
ConstantExpr::getGetElementPtr method folds two getelementptr instructions
when possible.

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

20 years agoUrg, remove testing code.
Chris Lattner [Sun, 11 Jan 2004 23:30:03 +0000 (23:30 +0000)]
Urg, remove testing code.

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

20 years agoFix a regression that I introduced yesterday. :(
Chris Lattner [Sun, 11 Jan 2004 23:29:26 +0000 (23:29 +0000)]
Fix a regression that I introduced yesterday.  :(

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

20 years agoMake LiveVariables::HandlePhysRegUse and
Alkis Evlogimenos [Sun, 11 Jan 2004 09:18:45 +0000 (09:18 +0000)]
Make LiveVariables::HandlePhysRegUse and
LiveVariables::HandlePhysRegDef private they use information that is
not in memory when LiveVariables finishes the analysis.

Also update the TwoAddressInstructionPass to not use this interface.

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

20 years agoCheck in two changes:
Chris Lattner [Sat, 10 Jan 2004 23:46:13 +0000 (23:46 +0000)]
Check in two changes:
The first change (which is disabled) compactifies all of the function constant
pools into the global constant pool, in an attempt to reduce the amount of
duplication and overhead.  Unfortunately, as the comment indicates, this is
not yet a win, so it is disabled.

The second change sorts the typeid's so that those types that can be used
by instructions in the program appear earlier in the table than those that
cannot (such as structures and arrays).  This causes the instructions to
be able to use the dense encoding more often, saving about 5K on 254.gap.
This is only a .65% savings though, unfortunately. :(

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

20 years agoHrm, another minor cleanup, which I missed before
Chris Lattner [Sat, 10 Jan 2004 21:42:24 +0000 (21:42 +0000)]
Hrm, another minor cleanup, which I missed before

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

20 years agoMinor cleanup
Chris Lattner [Sat, 10 Jan 2004 21:40:29 +0000 (21:40 +0000)]
Minor cleanup

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

20 years agoUpdate obsolete comments
Chris Lattner [Sat, 10 Jan 2004 21:36:49 +0000 (21:36 +0000)]
Update obsolete comments
Fix iterator invalidation problems which was causing -mstrip to miss some
entries, and read free'd memory.  This shrinks the symbol table of 254.gap
from 333 to 284 bytes!  :)

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

20 years agoDo not bother to emit a BytecodeBlock for an empty symbol table. This commonly
Chris Lattner [Sat, 10 Jan 2004 19:56:59 +0000 (19:56 +0000)]
Do not bother to emit a BytecodeBlock for an empty symbol table.  This commonly
occurs when the symbol table for a module has been stripped, making all of the
function local symbols go away.

This saves 6728 bytes in the stripped bytecode file of 254.gap (which obviously
has 841 functions), which isn't a ton, but helps and was easy.

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

20 years agoRemove use of llvm/CodeGen/InstrSelection.h
Chris Lattner [Sat, 10 Jan 2004 19:16:26 +0000 (19:16 +0000)]
Remove use of llvm/CodeGen/InstrSelection.h

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

20 years agoRemove standard C header wrappers
Chris Lattner [Sat, 10 Jan 2004 19:15:38 +0000 (19:15 +0000)]
Remove standard C header wrappers

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

20 years agoRemove config wrapper around <cerrno>
Chris Lattner [Sat, 10 Jan 2004 19:15:14 +0000 (19:15 +0000)]
Remove config wrapper around <cerrno>

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

20 years agoRemove standard C file wrapper
Chris Lattner [Sat, 10 Jan 2004 19:15:00 +0000 (19:15 +0000)]
Remove standard C file wrapper

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

20 years agoRemove wrapper for standard C file, use <cstdlib> instead
Chris Lattner [Sat, 10 Jan 2004 19:12:44 +0000 (19:12 +0000)]
Remove wrapper for standard C file, use <cstdlib> instead

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

20 years agoRemove wrappers around std c files
Chris Lattner [Sat, 10 Jan 2004 19:12:09 +0000 (19:12 +0000)]
Remove wrappers around std c files

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

20 years agoDead file, use <cstring> instead of this.
Chris Lattner [Sat, 10 Jan 2004 19:10:22 +0000 (19:10 +0000)]
Dead file, use <cstring> instead of this.

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

20 years agoErr, we don't need Config/*.h files for things that are standard C++
Chris Lattner [Sat, 10 Jan 2004 19:10:01 +0000 (19:10 +0000)]
Err, we don't need Config/*.h files for things that are standard C++

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

20 years agominor comment tweaks
Chris Lattner [Sat, 10 Jan 2004 19:07:06 +0000 (19:07 +0000)]
minor comment tweaks

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

20 years agoremove obsolete file
Chris Lattner [Sat, 10 Jan 2004 19:00:26 +0000 (19:00 +0000)]
remove obsolete file

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

20 years ago* finegrainify namespacification of ArchiveReader.cpp
Chris Lattner [Sat, 10 Jan 2004 19:00:15 +0000 (19:00 +0000)]
* finegrainify namespacification of ArchiveReader.cpp
* Refactor reader stuff out of include/llvm/Bytecode/Primitives.h.  This is
  internal implementation details for the reader, not public interfaces!

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

20 years agoRefactor writer stuff out of include/llvm/Bytecode/Primitives.h. This is
Chris Lattner [Sat, 10 Jan 2004 18:56:59 +0000 (18:56 +0000)]
Refactor writer stuff out of include/llvm/Bytecode/Primitives.h.  This is
internal implementation details for the writer, not public interfaces!

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

20 years agoFinegrainify namespacification
Chris Lattner [Sat, 10 Jan 2004 18:49:43 +0000 (18:49 +0000)]
Finegrainify namespacification

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

20 years agoFix annoying warnings. W doesn't have a revision number
Chris Lattner [Fri, 9 Jan 2004 18:39:04 +0000 (18:39 +0000)]
Fix annoying warnings.  W doesn't have a revision number

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

20 years agoLive var is now in lib/Target/Sparc
Chris Lattner [Fri, 9 Jan 2004 18:16:20 +0000 (18:16 +0000)]
Live var is now in lib/Target/Sparc

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

20 years agoMove sparc-specific code into lib/Target/Sparc
Chris Lattner [Fri, 9 Jan 2004 18:15:56 +0000 (18:15 +0000)]
Move sparc-specific code into lib/Target/Sparc

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

20 years agoMove sparc-specific livevar code into lib/Target/Sparc
Chris Lattner [Fri, 9 Jan 2004 18:15:24 +0000 (18:15 +0000)]
Move sparc-specific livevar code into lib/Target/Sparc

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

20 years agoFix more incestuous #includage.
Chris Lattner [Fri, 9 Jan 2004 16:17:09 +0000 (16:17 +0000)]
Fix more incestuous #includage.

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

20 years agoFinegrainify namespacification.
Chris Lattner [Fri, 9 Jan 2004 06:30:18 +0000 (06:30 +0000)]
Finegrainify namespacification.
This should get hunked over to the Sparc backend, along with
MachineCodeForInstruction and a bunch of files in include/llvm/Codegen,
but those battles will have to wait for a later time.

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

20 years agoMove InstrSelection into lib/Target/Sparc, as it's sparc specific
Chris Lattner [Fri, 9 Jan 2004 06:24:06 +0000 (06:24 +0000)]
Move InstrSelection into lib/Target/Sparc, as it's sparc specific

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

20 years agoMove InstrSelection into lib/Target/Sparc, as it's sparc specific. This
Chris Lattner [Fri, 9 Jan 2004 06:22:34 +0000 (06:22 +0000)]
Move InstrSelection into lib/Target/Sparc, as it's sparc specific.  This
makes the incestuous #include'ing of sparc internal headers much less
disturbing.  :)

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

20 years agoMove lib/Codegen/RegAlloc into lib/Target/Sparc, as it is sparc specific
Chris Lattner [Fri, 9 Jan 2004 06:17:12 +0000 (06:17 +0000)]
Move lib/Codegen/RegAlloc into lib/Target/Sparc, as it is sparc specific

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

20 years agoFinegrainify namespacification
Chris Lattner [Fri, 9 Jan 2004 06:12:26 +0000 (06:12 +0000)]
Finegrainify namespacification

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

20 years agoRemove dependence on structure index type. s/MT/FT
Chris Lattner [Fri, 9 Jan 2004 06:02:51 +0000 (06:02 +0000)]
Remove dependence on structure index type.  s/MT/FT

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

20 years agoFinegrainify namespacification
Chris Lattner [Fri, 9 Jan 2004 06:02:20 +0000 (06:02 +0000)]
Finegrainify namespacification

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

20 years agoFinegrainify namespacification
Chris Lattner [Fri, 9 Jan 2004 05:53:38 +0000 (05:53 +0000)]
Finegrainify namespacification
add flags for PR82

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

20 years agoRemove an obsolete method, including its _long_ out of date comment.
Chris Lattner [Fri, 9 Jan 2004 05:45:58 +0000 (05:45 +0000)]
Remove an obsolete method, including its _long_ out of date comment.
This is an incremental step towards fixing PR82

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

20 years agoInching towards fixing PR82
Chris Lattner [Fri, 9 Jan 2004 05:44:50 +0000 (05:44 +0000)]
Inching towards fixing PR82

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

20 years agoInching our way towards fixing PR82
Chris Lattner [Fri, 9 Jan 2004 05:42:34 +0000 (05:42 +0000)]
Inching our way towards fixing PR82

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

20 years agoRemove yet another obsolete comment :)
Chris Lattner [Thu, 8 Jan 2004 22:28:45 +0000 (22:28 +0000)]
Remove yet another obsolete comment :)

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