Commit Graph

17113 Commits

Author SHA1 Message Date
Jeff Cohen
615ed993e1 Fix VC++ compilation error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19757 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 18:50:10 +00:00
Chris Lattner
da1f03c1b5 QOI feature implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19756 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 18:45:35 +00:00
Chris Lattner
870c016934 Implement factoring of instruction pattern strings. In particular, instead of
emitting code like this:

  case PPC::ADD: O  << "add ";  printOperand(MI, 0, MVT::i64); O  << ", ";  prin
tOperand(MI, 1, MVT::i64); O  << ", ";  printOperand(MI, 2, MVT::i64); O  << '\n
'; break;
  case PPC::ADDC: O  << "addc ";  printOperand(MI, 0, MVT::i64); O  << ", ";  pr
intOperand(MI, 1, MVT::i64); O  << ", ";  printOperand(MI, 2, MVT::i64); O  << '
\n'; break;
  case PPC::ADDE: O  << "adde ";  printOperand(MI, 0, MVT::i64); O  << ", ";  pr
intOperand(MI, 1, MVT::i64); O  << ", ";  printOperand(MI, 2, MVT::i64); O  << '
\n'; break;
...

Emit code like this:

  case PPC::ADD:
  case PPC::ADDC:
  case PPC::ADDE:
  ...
    switch (MI->getOpcode()) {
    case PPC::ADD: O << "add "; break;
    case PPC::ADDC: O << "addc "; break;
    case PPC::ADDE: O << "adde "; break;
    ...
    }
    printOperand(MI, 0, MVT::i64);
    O << ", ";
    printOperand(MI, 1, MVT::i64);
    O << ", ";
    printOperand(MI, 2, MVT::i64);
    O << "\n";
    break;

This shrinks the PPC asm writer from 24785->15205 bytes (even though the new
asmwriter has much more whitespace than the old one), and the X86 printers shrink
quite a bit too.  The important implication of this is that GCC no longer hits swap
when building the PPC backend in optimized mode.  Thus this fixes PR448.

-Chris


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19755 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 18:38:13 +00:00
Chris Lattner
f11ad9ef46 Fix the ::: problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19754 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 18:18:59 +00:00
Chris Lattner
5765dba5ce Minor refactoring, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19753 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:40:38 +00:00
Jeff Cohen
741c118230 oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19752 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:37:13 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Jeff Cohen
695c9bdbd0 Add (non-working) project bugpoint to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19750 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:35:30 +00:00
Chris Lattner
b0b55e74a0 Seperate asmstring parsing from emission. This allows the code to be simpler
and more understandable.  It also allows us to do simple things like fold
consequtive literal strings together.  For example, instead of emitting this
for the X86 backend:

  O  << "adc" << "l" << " ";

we now generate this:

  O << "adcl ";

*whoa* :)

This shrinks the X86 asmwriters from 62729->58267 and 65176->58644 bytes
for the intel/att asm writers respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19749 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:32:42 +00:00
Jeff Cohen
2fce6d1a69 Don't exclude FileUtilies and ToolRunner from VC++ build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 16:32:47 +00:00
Jeff Cohen
83881957ed Fix VC++ complaint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19747 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 16:30:58 +00:00
Jeff Cohen
c690cc0465 Fix destroyDirectory bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19746 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 16:28:33 +00:00
Chris Lattner
5037a15910 Implicitly defined registers can clobber callee saved registers too!
This fixes the return-address-not-being-saved problem in the Alpha backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19741 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:49:16 +00:00
Andrew Lenharth
2202bfa5a3 make double-dollar properly escape asmstrings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19740 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:35:22 +00:00
Chris Lattner
7cd50cf286 More bugfixes for IA64 shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19739 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:33:03 +00:00
Chris Lattner
27ff112948 Fix problems with non-x86 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19738 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:31:52 +00:00
Chris Lattner
a7306db5f7 Add a nasty hack to fix Alpha/IA64 multiplies by a power of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19737 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 00:20:42 +00:00
Chris Lattner
9bb86f46e1 Remove unneeded line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19736 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 23:43:12 +00:00
Chris Lattner
1e7ceaf0a0 test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19735 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 23:38:56 +00:00
Chris Lattner
45f57b8ee3 Handle comparisons of gep instructions that have different typed indices
as long as they are the same size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19734 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 23:06:49 +00:00
Chris Lattner
fb0f53f9c1 Speed up folding operations into loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19733 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 21:43:02 +00:00
Chris Lattner
0442fbfadb Keep track of node depth for each node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19732 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 21:39:38 +00:00
Chris Lattner
67b1c3c404 The ever-important vanity pass name :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19731 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 21:35:14 +00:00
Chris Lattner
4e7dd8f7c4 If the interpreter tries to execute an external function, kill it. Of course
since we are dirty, special case __main.  This should fix the infinite loop
horrible stuff that happens on linux-alpha when configuring llvm-gcc.  It
might also help cygwin, who knows??


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 19:59:37 +00:00
Chris Lattner
b62e1e296e Fix a FIXME: realize that argument stores are all independent (don't alias)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19728 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 19:46:38 +00:00
Chris Lattner
a93ec3ebfb Unary token factor nodes are unneeded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 18:01:22 +00:00
Chris Lattner
77e77a6aa0 Refactor libcall code a bit. Initial implementation of expanding int -> FP
operations for 64-bit integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19724 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-21 06:05:23 +00:00
Chris Lattner
fb01550ace Apparently destroyFile() now throws an exception. Since this class is
designed to be put on the stack, that's not cool.  Catch and ignore the
exception.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 23:31:35 +00:00
Chris Lattner
87a9b716c1 Remove this test. This test is already in PR269, so it should be
readded when the bug is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19722 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 20:58:42 +00:00
Chris Lattner
e5544f851a Simplify the shift-expansion code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19721 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 20:29:23 +00:00
Chris Lattner
19ad0620bc Implement ADD_PARTS/SUB_PARTS so that 64-bit integer add/sub work. This
fixes most of the remaining llc-beta failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19716 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 18:53:00 +00:00
Chris Lattner
84f6788044 Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19715 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 18:52:28 +00:00
Chris Lattner
17eee18f40 implement add_parts/sub_parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 18:50:55 +00:00
Chris Lattner
5880b9fa3e Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19713 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 18:50:39 +00:00
Chris Lattner
353c3e4981 Add missing entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19712 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 17:32:28 +00:00
Chris Lattner
bf52d49f36 Fix a crash compiling 134.perl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19711 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 16:50:16 +00:00
Jeff Cohen
b1923f8dd5 Get analyze to show all analysis options when compiled with VC++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19710 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 05:19:40 +00:00
Jeff Cohen
d0d2051c20 Add analyze project to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19709 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 04:52:59 +00:00
Jeff Cohen
23f9708bda Add project llvm-proj to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19708 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-20 04:41:49 +00:00
Chris Lattner
2c49f27955 Support targets that do not use i8 shift amounts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19707 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 22:31:21 +00:00
Chris Lattner
6fb5a4a5f8 Add two optimizations. The first folds (X+Y)-X -> Y
The second folds operations into selects, e.g. (select C, (X+Y), (Y+Z))
-> (Y+(select C, X, Z)

This occurs a few times across spec, e.g.

         select    add/sub
mesa:    83        0
povray:  5         2
gcc      4         2
parser   0         22
perlbmk  13        30
twolf    0         3


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19706 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 21:50:18 +00:00
Chris Lattner
d4dd775a24 Add some new tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19705 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 21:48:31 +00:00
Chris Lattner
3ca6a2c72c Add an assertion that would have made more sense to duraid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 21:32:07 +00:00
Chris Lattner
3d9dffc586 Add support for targets that pass args in registers to calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19703 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 20:24:35 +00:00
Chris Lattner
02b86f52ed Add an accessor for targets that pass args in regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19702 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 20:19:58 +00:00
Chris Lattner
1e81b9e511 Fold single use token factor nodes into other token factor nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19701 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 19:10:54 +00:00
Chris Lattner
ec39a45bdb Realize the individual pieces of an expanded copytoreg/store/load are
independent of each other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19700 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 18:02:17 +00:00
Chris Lattner
39908e0ce0 Know some identities about tokenfactor nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 18:01:40 +00:00
Chris Lattner
88218ef706 Know some simple identities. This improves codegen for (1LL << N).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19698 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 17:29:49 +00:00
Chris Lattner
c3c021bcad Fix a problem where were were literally selecting for INCREASED register
pressure, not decreases register pressure.  Fix problem where we accidentally
swapped the operands of SHLD, which caused fourinarow to fail.  This fixes
fourinarow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19697 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 17:24:34 +00:00