Commit Graph

9839 Commits

Author SHA1 Message Date
Chris Lattner
76f7fe25d9 Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10798 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:47:05 +00:00
Chris Lattner
7e208904ae The getShift method is no obsolete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10797 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:37:26 +00:00
Chris Lattner
7c4049c5a0 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
2004-01-12 19:35:11 +00:00
Chris Lattner
b6ac8bc586 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
2004-01-12 19:15:20 +00:00
Chris Lattner
69b9e892b6 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
2004-01-12 19:12:58 +00:00
Chris Lattner
5585b335e5 Remove use of the ConstantHandling interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:12:50 +00:00
Chris Lattner
c6646ebdb9 Remove use of ConstantExpr::getShift
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:10:58 +00:00
Chris Lattner
b16689b647 Don't use ConstantExpr::getShift anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 19:08:43 +00:00
Chris Lattner
3edd3979e1 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
2004-01-12 19:04:55 +00:00
Chris Lattner
81ebc30089 Remove use of ConstantHandling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10789 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:35:03 +00:00
Chris Lattner
e5d4f1b9e7 Remove unneeded #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10788 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:33:54 +00:00
Chris Lattner
77ab3f1c89 llvm::ConstantFoldInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:25:56 +00:00
Chris Lattner
c4a1509829 Move prototype of llvm::ConstantFoldInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:25:44 +00:00
Chris Lattner
8f90b005d6 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
2004-01-12 18:25:22 +00:00
Chris Lattner
28aabc34f7 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
2004-01-12 18:25:03 +00:00
Chris Lattner
ccd3a878d0 Remove uses of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:12:44 +00:00
Chris Lattner
d4d4ab58ef Eliminate use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:08:18 +00:00
Chris Lattner
e9028638bf Remove use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10781 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 18:02:15 +00:00
Chris Lattner
6eb88d44c9 Eliminate use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10780 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 17:57:32 +00:00
Chris Lattner
b7a5d3edee 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
2004-01-12 17:43:40 +00:00
Chris Lattner
84831642e4 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
2004-01-12 17:40:36 +00:00
Chris Lattner
d56147dc72 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
2004-01-12 16:55:30 +00:00
John Criswell
12e9b4f1e5 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
2004-01-12 16:18:21 +00:00
John Criswell
b8b80c455f 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
2004-01-12 16:14:54 +00:00
Alkis Evlogimenos
f998a7e671 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
2004-01-12 07:22:45 +00:00
Chris Lattner
c43f91fb49 Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10770 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 05:15:04 +00:00
Chris Lattner
20cd43b2f6 Testcase for PR204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10769 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 05:01:48 +00:00
Chris Lattner
e845b1aa79 Add support for %llvmgcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10768 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 05:01:13 +00:00
Chris Lattner
c6a4d6a066 * 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
2004-01-12 04:29:41 +00:00
Chris Lattner
debcbd0a46 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
2004-01-12 04:28:32 +00:00
Chris Lattner
5f16a13896 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
2004-01-12 04:13:56 +00:00
Chris Lattner
1daee8b010 Implement SCCP/phitest.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10763 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 03:57:30 +00:00
Chris Lattner
ff2ab4db20 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
2004-01-12 03:57:00 +00:00
Chris Lattner
2d11f167e6 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
2004-01-12 01:18:32 +00:00
Chris Lattner
33a79d73bd New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10760 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-12 01:17:42 +00:00
Chris Lattner
952454dbff Implement: Assembler/2004-01-11-getelementptrfolding.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10759 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-11 23:56:33 +00:00
Chris Lattner
c9f75b5700 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
2004-01-11 23:56:03 +00:00
Chris Lattner
92fa44c1cf Urg, remove testing code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10757 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-11 23:30:03 +00:00
Chris Lattner
9380297bc0 Fix a regression that I introduced yesterday. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-11 23:29:26 +00:00
Alkis Evlogimenos
b08bdc4a16 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
2004-01-11 09:18:45 +00:00
Chris Lattner
a14b0d441d 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
2004-01-10 23:46:13 +00:00
Chris Lattner
91d7efbf4b 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
2004-01-10 21:42:24 +00:00
Chris Lattner
9a0817971a Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10752 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 21:40:29 +00:00
Chris Lattner
2cacc0a306 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
2004-01-10 21:36:49 +00:00
Chris Lattner
737d3cd719 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
2004-01-10 19:56:59 +00:00
Chris Lattner
ae7fc3aede Remove use of llvm/CodeGen/InstrSelection.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10749 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 19:16:26 +00:00
Chris Lattner
e275fe834a Remove standard C header wrappers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 19:15:38 +00:00
Chris Lattner
74b1f45293 Remove config wrapper around <cerrno>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10747 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 19:15:14 +00:00
Chris Lattner
c9d2d08bc8 Remove standard C file wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10746 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 19:15:00 +00:00
Chris Lattner
f3c212a3f6 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
2004-01-10 19:12:44 +00:00