Commit Graph

365 Commits

Author SHA1 Message Date
Chris Lattner 580f5bfae3 This method takes sys::Path objects now.
llvm-svn: 19773
2005-01-23 03:32:16 +00:00
Chris Lattner dff29cd72e Drop dead #include
llvm-svn: 19768
2005-01-23 03:16:56 +00:00
Chris Lattner c5a20a5dd4 The meat of this utility has been moved to FileUtilities, where it can be
used by other tools.

llvm-svn: 19767
2005-01-23 03:15:47 +00:00
Chris Lattner 97cf8fd4a9 Minor fix.
llvm-svn: 19761
2005-01-22 20:59:38 +00:00
Chris Lattner 59a7f5c2f3 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.

llvm-svn: 19760
2005-01-22 20:31:17 +00:00
Chris Lattner 92275bb6bb 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!

llvm-svn: 19759
2005-01-22 19:22:23 +00:00
Chris Lattner 945e8655dd Refactor code for numbering instructions into CodeGenTarget.
llvm-svn: 19758
2005-01-22 18:58:51 +00:00
Jeff Cohen da636b3783 Fix VC++ compilation error
llvm-svn: 19757
2005-01-22 18:50:10 +00:00
Chris Lattner 9ceb7c8f23 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

llvm-svn: 19755
2005-01-22 18:38:13 +00:00
Chris Lattner b6f5d9a82a Fix the ::: problem
llvm-svn: 19754
2005-01-22 18:18:59 +00:00
Chris Lattner 3baf682110 Minor refactoring, no functionality change.
llvm-svn: 19753
2005-01-22 17:40:38 +00:00
Chris Lattner 0c23ba5c0f 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.

llvm-svn: 19749
2005-01-22 17:32:42 +00:00
Andrew Lenharth 67e2e21353 make double-dollar properly escape asmstrings
llvm-svn: 19740
2005-01-22 00:35:22 +00:00
Reid Spencer 9dcfffd730 Fix the path from ../lib/Debug to ../Debug/lib per changes to Makefiles.
llvm-svn: 19550
2005-01-14 16:32:39 +00:00
Reid Spencer 74bc42304c Update the documentation about -enable-llcbeta vs. -enable-linscan
llvm-svn: 19530
2005-01-13 18:02:40 +00:00
Misha Brukman 732daa5b9d Use and print out BuildStatus, we don't always have build errors.
llvm-svn: 19497
2005-01-12 03:31:38 +00:00
Misha Brukman 7b98f7407b No need to repeat the word `build' since it's under `Build status'
llvm-svn: 19481
2005-01-11 19:51:24 +00:00
Misha Brukman 870b872bfa We don't always have build errors, so call it `status', not `error'
llvm-svn: 19479
2005-01-11 18:27:16 +00:00
Chris Lattner d7a3ee6d20 rename linscan -> LLCBETA as it should be
llvm-svn: 19401
2005-01-08 21:03:58 +00:00
Reid Spencer e153fb3523 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.

llvm-svn: 19293
2005-01-05 17:29:29 +00:00
Chris Lattner 733c82bfbf Expose isConvertibleToThreeAddress and isCommutable bits to the code generator.
llvm-svn: 19243
2005-01-02 02:29:04 +00:00
Reid Spencer 266325e6d8 * Don't include weak definitions as a definition
* Make subordinate libraries presented with a vertical list instead of all
  listed on a single line.

llvm-svn: 19196
2004-12-30 23:13:12 +00:00
Reid Spencer 271ed74132 A Perl script to generate an HTML definition list containing the LLVM
library dependencies, for documentation purposes.

llvm-svn: 19194
2004-12-30 23:07:56 +00:00
Reid Spencer d2020acea0 Revert the last patch so that the LLVMGCCDIR environment variable is
still viable and will make use of the resurrected --with-llvmgccdir
configure option.

llvm-svn: 19143
2004-12-26 05:21:13 +00:00
Reid Spencer 920b83d709 Remove references to LLVMGCCDIR because it was only used to provide a
value for the --with-llvmgccdir configure option which is no longer
supported.

llvm-svn: 19135
2004-12-24 06:32:54 +00:00
Tanya Lattner 96f6909ae1 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.
llvm-svn: 19023
2004-12-17 20:58:34 +00:00
Chris Lattner 56a874b0d6 Portability fix, thanks to Markus F.X.J. Oberhumer.
llvm-svn: 18977
2004-12-16 04:56:34 +00:00
Chris Lattner 2617b5033b Use user time, not wall time, for optimizer time.
llvm-svn: 18941
2004-12-14 22:42:59 +00:00
Reid Spencer 1a14e28ade For PR351:
* Change use of ReadFileIntoAddressSpace to sys::MappedFile use.
* Shorten a line > 80 chars.

llvm-svn: 18896
2004-12-13 17:41:13 +00:00
Reid Spencer f51f490b7b For PR351: libLLVMSupport now depends on libLLVMSystem
llvm-svn: 18893
2004-12-13 17:02:08 +00:00
Test Commit ecf3c41054 Test commit
llvm-svn: 18687
2004-12-09 05:46:48 +00:00
Reid Spencer 1c48c2deee For PR387:
Make this compile without warning when -Woverloaded-virtual is used.

llvm-svn: 18588
2004-12-06 23:42:37 +00:00
Reid Spencer 46f5c4f214 Revert previous changes to remove -enable-linscan and the *BETA columns of
the nightly test. These are still needed for iterative linear scan testing.

llvm-svn: 18577
2004-12-06 20:14:45 +00:00
Reid Spencer ecec7939bc Rather than break all the nightly test invocations, permit -enable-linscan
option to be specified, but do nothing with it.

llvm-svn: 18575
2004-12-06 18:33:54 +00:00
Reid Spencer 1443c4f039 Remove LLC-BETA and linear scan options as they are no longer reported.
llvm-svn: 18574
2004-12-06 18:29:14 +00:00
Reid Spencer 5ae9a04e40 Print out something useful instead of a blank table when the external tests
are skipped by user option.

llvm-svn: 18501
2004-12-04 22:18:28 +00:00
Chris Lattner 77e8f43c72 Move the dejagnu section to immediately before the 'trends' section.
llvm-svn: 18497
2004-12-04 20:18:21 +00:00
Chris Lattner af045fa120 Remove last remnants of qmtest stuff
llvm-svn: 18496
2004-12-04 19:57:27 +00:00
Tanya Lattner 03dfe165e1 Run dejagnu by default.
llvm-svn: 18490
2004-12-04 06:35:14 +00:00
Tanya Lattner 24726f9a5d Removed QMTest functions. The nightly tester no longer runs qmtest. It now runs dejagnu by default and you must turn it off using -nodejagnu.
llvm-svn: 18489
2004-12-04 06:25:50 +00:00
John Criswell 8e18e88392 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.

llvm-svn: 18464
2004-12-03 21:56:30 +00:00
Reid Spencer f675b49722 Make sure the timing output is also sent to the log file for dejagnu, not
the log file of the NightlyTest.pl script.

llvm-svn: 18158
2004-11-23 16:23:50 +00:00
Chris Lattner 96826dbaf3 Change formats, as suggested by Duraid
llvm-svn: 18150
2004-11-23 06:51:14 +00:00
Tanya Lattner 69ecc03683 Moved dejagnu log link to the template.
llvm-svn: 18111
2004-11-22 18:36:12 +00:00
Tanya Lattner 94556b33eb Changed to catch stderror of dejagnu and fixed missing quote.
llvm-svn: 18105
2004-11-22 17:16:01 +00:00
Tanya Lattner 72aca859c2 Made dejagnu option lower case.
llvm-svn: 18075
2004-11-21 00:10:12 +00:00
Tanya Lattner c3d696fe04 Added the ability to run Dejagnu tests.
llvm-svn: 18074
2004-11-21 00:02:40 +00:00
Reid Spencer b2d0fa0823 Fix usage of changed function prototype
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Misha Brukman c350bd2056 * 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)

llvm-svn: 17611
2004-11-08 03:28:27 +00:00
Chris Lattner 0ff1828349 Adjust to printing user+system times instead of wall times. Run the olden
numbers in 'stable' mode so that the numbers are more stable.

llvm-svn: 17525
2004-11-06 21:35:40 +00:00