Commit Graph

554 Commits

Author SHA1 Message Date
Chris Lattner
417c4d5b4a This method takes sys::Path objects now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19773 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:32:16 +00:00
Chris Lattner
220df9c13d Drop dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19768 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:16:56 +00:00
Chris Lattner
537a49a85a The meat of this utility has been moved to FileUtilities, where it can be
used by other tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19767 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:15:47 +00:00
Chris Lattner
131ca38c60 Minor fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19761 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 20:59:38 +00:00
Chris Lattner
38c0751a12 This is the final big of factoring. This shares cases in suboperand
differences, which means that identical instructions (after stripping off
the first literal string) do not run any different code at all.  On the X86,
this turns this code:

    switch (MI->getOpcode()) {
    case X86::ADC32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::ADC32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::ADC32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::ADD32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::ADD32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::ADD32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::AND32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::AND32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::AND32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::CMP32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::CMP32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::MOV32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::MOV32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::OR32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::OR32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::OR32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::ROL32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::ROR32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SAR32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SBB32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::SBB32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::SBB32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::SHL32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SHLD32mrCL: printOperand(MI, 4, MVT::i32); break;
    case X86::SHR32mi: printOperand(MI, 4, MVT::i8); break;
    case X86::SHRD32mrCL: printOperand(MI, 4, MVT::i32); break;
    case X86::SUB32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::SUB32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::SUB32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::TEST32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::TEST32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::TEST8mi: printOperand(MI, 4, MVT::i8); break;
    case X86::XCHG32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::XOR32mi: printOperand(MI, 4, MVT::i32); break;
    case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
    case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
    }

into this:

    switch (MI->getOpcode()) {
    case X86::ADC32mi:
    case X86::ADC32mr:
    case X86::ADD32mi:
    case X86::ADD32mr:
    case X86::AND32mi:
    case X86::AND32mr:
    case X86::CMP32mi:
    case X86::CMP32mr:
    case X86::MOV32mi:
    case X86::MOV32mr:
    case X86::OR32mi:
    case X86::OR32mr:
    case X86::SBB32mi:
    case X86::SBB32mr:
    case X86::SHLD32mrCL:
    case X86::SHRD32mrCL:
    case X86::SUB32mi:
    case X86::SUB32mr:
    case X86::TEST32mi:
    case X86::TEST32mr:
    case X86::XCHG32mr:
    case X86::XOR32mi:
    case X86::XOR32mr: printOperand(MI, 4, MVT::i32); break;
    case X86::ADC32mi8:
    case X86::ADD32mi8:
    case X86::AND32mi8:
    case X86::OR32mi8:
    case X86::ROL32mi:
    case X86::ROR32mi:
    case X86::SAR32mi:
    case X86::SBB32mi8:
    case X86::SHL32mi:
    case X86::SHR32mi:
    case X86::SUB32mi8:
    case X86::TEST8mi:
    case X86::XOR32mi8: printOperand(MI, 4, MVT::i8); break;
    }

After this, the generated asmwriters look pretty much as though they were
generated by hand.  This shrinks the X86 asmwriter.inc files from 55101->39669
and 55429->39551 bytes each, and PPC from 16766->12859 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19760 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 20:31:17 +00:00
Chris Lattner
f876668518 Implement *even more* factoring. In particular, if all of the instruction
strings starts out with a constant string, we emit the string first, using
a table lookup (instead of a switch statement).

Because this is usually the opcode portion of the asm string, the differences
between the instructions have now been greatly reduced.  This allows many
more case statements to be grouped together.

This patch also allows instruction cases to be grouped together when the
instruction patterns are exactly identical (common after the opcode string
has been ripped off), and when the differing operand is a MachineInstr
operand that needs to be formatted.

The end result of this is a mean and lean generated AsmPrinter!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19759 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 19:22:23 +00:00
Chris Lattner
d648867173 Refactor code for numbering instructions into CodeGenTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 18:58:51 +00:00
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
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
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
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
Reid Spencer
bd02b0a915 Fix the path from ../lib/Debug to ../Debug/lib per changes to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19550 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-14 16:32:39 +00:00
Reid Spencer
39ce11b97b Update the documentation about -enable-llcbeta vs. -enable-linscan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19530 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-13 18:02:40 +00:00
Misha Brukman
9a6127504a Use and print out BuildStatus, we don't always have build errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19497 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 03:31:38 +00:00
Misha Brukman
2bbea35ce9 No need to repeat the word build' since it's under Build status'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19481 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 19:51:24 +00:00
Misha Brukman
7f5875a56a We don't always have build errors, so call it status', not error'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19479 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-11 18:27:16 +00:00
Chris Lattner
c82a6c883e rename linscan -> LLCBETA as it should be
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19401 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 21:03:58 +00:00
Reid Spencer
6234582764 1. Make sure that "dot" can be found in the path
2. Fix a bug where the lib directory specified also had to be cwd
3. Weight the output so archive->archive edges are shorter
4. Generate two different graphs: one for libraries, one for objects.
5. Adjust the properties of the graphs till it looks nice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 17:29:29 +00:00
Chris Lattner
aad75aa1a2 Expose isConvertibleToThreeAddress and isCommutable bits to the code generator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19243 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 02:29:04 +00:00
Reid Spencer
b7e65b8a6a * Don't include weak definitions as a definition
* Make subordinate libraries presented with a vertical list instead of all
  listed on a single line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19196 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 23:13:12 +00:00
Reid Spencer
579b8de1c2 A Perl script to generate an HTML definition list containing the LLVM
library dependencies, for documentation purposes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19194 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 23:07:56 +00:00
Reid Spencer
932b69f4c7 Revert the last patch so that the LLVMGCCDIR environment variable is
still viable and will make use of the resurrected --with-llvmgccdir
configure option.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19143 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-26 05:21:13 +00:00
Reid Spencer
1ac82ad26f Remove references to LLVMGCCDIR because it was only used to provide a
value for the --with-llvmgccdir configure option which is no longer
supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19135 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-24 06:32:54 +00:00
Tanya Lattner
a2dfbf96a9 Always print out DejagnuTest results to stdout so that it gets emailed to the nightly test manager. Eventually Dejagnu should be merged into the added/removed tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 20:58:34 +00:00
Chris Lattner
2fb645ac47 Portability fix, thanks to Markus F.X.J. Oberhumer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18977 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 04:56:34 +00:00
Chris Lattner
fed8a142e5 Use user time, not wall time, for optimizer time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18941 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 22:42:59 +00:00
Reid Spencer
15653afb5f For PR351:
* Change use of ReadFileIntoAddressSpace to sys::MappedFile use.
* Shorten a line > 80 chars.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18896 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:41:13 +00:00
Reid Spencer
2a3af750e7 For PR351: libLLVMSupport now depends on libLLVMSystem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18893 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:02:08 +00:00
Test Commit
b6a0d3595b Test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-09 05:46:48 +00:00
Reid Spencer
ead87b6712 For PR387:
Make this compile without warning when -Woverloaded-virtual is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18588 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-06 23:42:37 +00:00
Reid Spencer
51e615f5dd Revert previous changes to remove -enable-linscan and the *BETA columns of
the nightly test. These are still needed for iterative linear scan testing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18577 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-06 20:14:45 +00:00
Reid Spencer
2e4cdbfc5a Rather than break all the nightly test invocations, permit -enable-linscan
option to be specified, but do nothing with it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18575 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-06 18:33:54 +00:00
Reid Spencer
c537224c00 Remove LLC-BETA and linear scan options as they are no longer reported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18574 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-06 18:29:14 +00:00
Reid Spencer
b8e825b1ad Print out something useful instead of a blank table when the external tests
are skipped by user option.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18501 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-04 22:18:28 +00:00
Chris Lattner
edcc6b1e06 Move the dejagnu section to immediately before the 'trends' section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18497 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-04 20:18:21 +00:00
Chris Lattner
4b6b44c64e Remove last remnants of qmtest stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18496 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-04 19:57:27 +00:00
Tanya Lattner
59a86555a4 Run dejagnu by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18490 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-04 06:35:14 +00:00
Tanya Lattner
056ec06fee Removed QMTest functions. The nightly tester no longer runs qmtest. It now runs dejagnu by default and you must turn it off using -nodejagnu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18489 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-04 06:25:50 +00:00
John Criswell
68fa3ccf14 Removed QMTests as I will be zapping them soon.
I've done some testing, and this seems to work, but if people who use
the nightly tester regularly could spot check these changes, I'd be
appreciative.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18464 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 21:56:30 +00:00
Reid Spencer
fdd10b18f2 Make sure the timing output is also sent to the log file for dejagnu, not
the log file of the NightlyTest.pl script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18158 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 16:23:50 +00:00
Chris Lattner
4fa5fa8f61 Change formats, as suggested by Duraid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18150 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 06:51:14 +00:00
Tanya Lattner
882b8cd493 Moved dejagnu log link to the template.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-22 18:36:12 +00:00
Tanya Lattner
f35bdc18f6 Changed to catch stderror of dejagnu and fixed missing quote.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18105 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-22 17:16:01 +00:00
Tanya Lattner
794dae5687 Made dejagnu option lower case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18075 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-21 00:10:12 +00:00
Tanya Lattner
5debe8c6db Added the ability to run Dejagnu tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-21 00:02:40 +00:00
Reid Spencer
227b6d00dd Fix usage of changed function prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17798 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:30:54 +00:00
Misha Brukman
2e9ac69f8b * Add support for f2c and the -f2c switch to enable Fortran benchmarks
* Remove spurious spaces between variable names and `=' (they're not lined up
  anyway and there's no hope of doing that)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17611 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 03:28:27 +00:00
Chris Lattner
36dc5c7344 Adjust to printing user+system times instead of wall times. Run the olden
numbers in 'stable' mode so that the numbers are more stable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17525 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-06 21:35:40 +00:00