1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

1026 Commits

Author SHA1 Message Date
Chris Lattner
59a4d8dfcd Fix a long-standing wart in the code generator: two-address instruction lowering
actually *removes* one of the operands, instead of just assigning both operands
the same register.  This make reasoning about instructions unnecessarily complex,
because you need to know if you are before or after register allocation to match
up operand #'s with the target description file.

Changing this also gets rid of a bunch of hacky code in various places.

This patch also includes changes to fold loads into cmp/test instructions in
the X86 backend, along with a significant simplification to the X86 spill
folding code.

llvm-svn: 30108
2006-09-05 02:12:02 +00:00
Chris Lattner
997e7e3d45 Make sure to clear CurDefmPrefix = 0, otherwise stuff after a defm won't
parse right.  This fixes TableGen/MultiClass.td

llvm-svn: 30037
2006-09-01 22:07:27 +00:00
Chris Lattner
4c597bb380 fix an assertion with multidefs. Def inside of multiclasses don't need to
be complete.

llvm-svn: 30034
2006-09-01 21:59:03 +00:00
Chris Lattner
67e2187a04 regenerate
llvm-svn: 30029
2006-09-01 21:14:42 +00:00
Chris Lattner
948354e18e Add often-requested support for defining "multiclasses" which can be instantiated.
This allows you to define multiple definitions with one line, encouraging
more .td file factoring.

llvm-svn: 30027
2006-09-01 21:13:49 +00:00
Evan Cheng
77da6a9609 Issue cvs co with -P option to prune empty directories. Remove the unnecessary
update stage.

llvm-svn: 29955
2006-08-29 18:01:18 +00:00
Reid Spencer
3e62da9ed1 Add virtual methods to all subclasses so they are not overloaded.
llvm-svn: 29930
2006-08-28 00:12:25 +00:00
Chris Lattner
7890c00e2c Use compiler.h instead of hand rolling our own macro
llvm-svn: 29913
2006-08-27 13:16:24 +00:00
Evan Cheng
10a7268b85 Do not emit getTargetNode() and SelectNodeTo() which takes more than 3
SDOperand arguments. Use the variants which take an array and number instead.

llvm-svn: 29906
2006-08-27 08:11:28 +00:00
Evan Cheng
1c3d571e4b SelectNodeTo now returns a SDNode*.
llvm-svn: 29901
2006-08-26 08:00:10 +00:00
Evan Cheng
36c38110c4 Minor getCopyToReg() call change.
llvm-svn: 29900
2006-08-26 07:39:28 +00:00
Evan Cheng
2db7799507 Select() no longer require Result operand by reference.
llvm-svn: 29898
2006-08-26 05:34:46 +00:00
Evan Cheng
930bc5331d Remove dead code.
llvm-svn: 29897
2006-08-26 01:34:15 +00:00
Evan Cheng
2cc7e2ce0c A bit more clean up.
llvm-svn: 29893
2006-08-26 01:02:19 +00:00
Evan Cheng
b96b719724 - Clean up tablegen dag isel generator code.
- Clean up the code generated by tablegen:
  * AddToISelQueue now takes one argument.
  * ComplexPattern matching condition can now be shared.
  * Eliminate passing unnecessary arguments to emit routines.
  * Eliminate some unneeded SDOperand declarations in select routines.
  * Other minor clean ups.
- This reduces foot print slightly: X86ISelDAGToDAG.o is reduced from 971k
  to 823k.

llvm-svn: 29892
2006-08-26 00:59:04 +00:00
Patrick Jenkins
6c18e5e7b7 Corrected an error that was introduced yesterday that caused the GCC
version to be left blank if the build failed.

Also corrected a problem where if the build failed the nightly tester
would still try to read the results of the Dejagnutests log even
though it didnt exist.

llvm-svn: 29829
2006-08-22 18:11:19 +00:00
Patrick Jenkins
d3d74dec7b The new nightly tester should stop outputing a message stating the
testresults directory is not present unless the script is run as verbose.

llvm-svn: 29797
2006-08-21 20:45:57 +00:00
Patrick Jenkins
253fe71c46 These changes reflect the changes in the database for how tests are stored
and bring the handing of dejagnu tests into compliance with this new scheme.

llvm-svn: 29772
2006-08-18 18:00:21 +00:00
Patrick Jenkins
8a8893471f Changing the format dejagnu tests are submitted. We used to only submit multisource information for pass fail. Now we submit all pass/fail test information. This should fix the issue where some results were not being reported.
llvm-svn: 29757
2006-08-17 22:11:03 +00:00
Patrick Jenkins
de01f0e1c2 My last commit added some experimental features I have been working on. This commit rolls those back.
llvm-svn: 29738
2006-08-16 22:32:20 +00:00
Patrick Jenkins
ca80c08de2 Changed the call to countloc.sh so that the correct topdirectory of the llvm build is set.
llvm-svn: 29736
2006-08-16 22:18:41 +00:00
Evan Cheng
7fb75bbc8d SelectNodeTo() may return a SDOperand that is different from the input.
llvm-svn: 29726
2006-08-16 07:30:09 +00:00
Chris Lattner
9611f01574 The generated runloop shouldn't require Select to update 'Result'. In fact
we'd like to remove result entirely.

llvm-svn: 29713
2006-08-15 23:42:26 +00:00
Chris Lattner
3771e3035f allow Select to return the node being selected if RAU isn't needed.
llvm-svn: 29712
2006-08-15 23:27:50 +00:00
Reid Spencer
452be375b7 Simplify this a little bit.
llvm-svn: 29695
2006-08-15 03:50:10 +00:00
Reid Spencer
9d1b18e36e This script takes arguments so remove the check for number of arguments,
just check the first arg to see if its -topdir.

llvm-svn: 29694
2006-08-15 03:48:22 +00:00
Reid Spencer
7f2ce5b626 Make all tools that use llvmdo have a -topdir option that allows the top
source dir for LLVM to be specified explicitly. This removes the dependency
on the llvm-config script. If the option is not given, then the scripts use
llvm-config which should be both built and in the PATH. This arrangement
provides a useful default for most developers but also allows the nightly
tester to execute countloc.sh before llvm-config is built and without
altering the PATH.

llvm-svn: 29663
2006-08-14 18:49:05 +00:00
Patrick Jenkins
08a5429d76 Added some comments to clarify code around sub TestDirectory
llvm-svn: 29658
2006-08-14 16:07:14 +00:00
Reid Spencer
accb07b254 1. fix bug by ensuring we start at the llvm source root.
2. make use of the -code-only option on llvmdo
3. Add some debug print statements to find #1

llvm-svn: 29655
2006-08-13 19:03:06 +00:00
Reid Spencer
e309e97cbd Count the documentation. Otherwise we take a 30,000 hit in the LOC on the
nightly test graph. And, documentation is important.

llvm-svn: 29654
2006-08-13 18:59:40 +00:00
Reid Spencer
283f511a60 Use the new -code-only option to llvmdo so that we only count things that
are considered to be code. This will give a drop in the LOC count on the
nightly testers, but it is more accurate than previous estimates.

llvm-svn: 29653
2006-08-13 18:29:21 +00:00
Reid Spencer
08a7d6413f Add a -code-only option which restricts llvmdo to visiting just those
files that are considered to be code. Documentation is excluded.

llvm-svn: 29652
2006-08-13 18:28:27 +00:00
Reid Spencer
24b0f0757f Changes for LLVM coding standard compliance:
1. Remove tabs
  2. Wrap to 80 columns
  3. Put spaces between "if" or "elsif" and expression
  4. Put { on same line as if statement.
  5. Make indentation be 2 spaces.
Functionality change:
  Run utils/countloc.sh after the build is done. This is necessary because
  that script now uses llvm-config to find the top src directory.

llvm-svn: 29651
2006-08-13 09:53:02 +00:00
Reid Spencer
21f214fa6b Lexer.cpp is a generated file both in lib/AsmParser and projects/Stacker
so we remove it from being counted.

llvm-svn: 29641
2006-08-11 23:58:58 +00:00
Reid Spencer
69ce7523c9 Weed out some cruft and add in some missing extensions.
llvm-svn: 29638
2006-08-11 23:51:05 +00:00
Reid Spencer
89414d003f Weed out cruft that should not be counted and add in extensions we
previously missed.

llvm-svn: 29637
2006-08-11 23:50:27 +00:00
Patrick Jenkins
2428c13b4e Added two flags (-submit-server and -submit-script) which allow the user to specify where the test results are submitted too. If these are not specified they default to the LLVM.org server.
llvm-svn: 29633
2006-08-11 23:02:09 +00:00
Reid Spencer
8966f69927 Make this script not care where it is run from by getting the llvm src
root from the llvm-config script.

llvm-svn: 29632
2006-08-11 21:55:31 +00:00
Reid Spencer
c8a4b914d4 Make llvmdo and llvmgrep invulnerable to where they are run from by getting
the llvm source root from the llvm-config command. The dependency now is
that the correct llvm-config command is in the path. For most developers
this is the case.

llvm-svn: 29630
2006-08-11 21:53:27 +00:00
Reid Spencer
15ed5aec07 Clean up the HTML output. Add a -filedetails option to report the number of
lines contributed by each user to each file.

llvm-svn: 29624
2006-08-11 20:44:17 +00:00
Reid Spencer
d06abd82a2 Remove blank line at end of file, removing test user "foo" from CVS history.
llvm-svn: 29623
2006-08-11 19:42:11 +00:00
Reid Spencer
8746dd4a70 Drop the -details option, it was broken. If you want to know about a
particular directory, just pass that directory to the script. Also, clean
up the HTML output, put list of skipped dirs at the end, and make a few
other minor improvements.

llvm-svn: 29620
2006-08-11 18:36:55 +00:00
Evan Cheng
963d61dc86 Use SmallVector instead.
llvm-svn: 29619
2006-08-11 18:33:41 +00:00
Evan Cheng
5950c56f73 - Prevent some functions from being inlined to eliminate the code size bloat
introduced by previous commit.
- SelectCode now returns a SDNode*. If it is not null, the selected node
  produces the same number of results as the input node. The seletion loop
  is responsible for calling ReplaceAllUsesWith() to replace the input node
  with the output target node. For other cases, e.g. when load is folded,
  the selection code is responsible for calling ReplaceAllUsesOfValueWith()
  and SelectCode returns NULL.
- Other clean ups.

llvm-svn: 29602
2006-08-11 08:59:35 +00:00
Reid Spencer
99112f11ec Fix a comment.
llvm-svn: 29590
2006-08-09 19:40:13 +00:00
Chris Lattner
947ac60771 Revert previous patch
llvm-svn: 29585
2006-08-09 16:44:44 +00:00
Tanya Lattner
3707c6e4e3 Reverting back to original 1.8 version so I can manually merge in patch.
llvm-svn: 29584
2006-08-09 16:41:21 +00:00
Evan Cheng
3a9bcad4c4 Merge some NightlyTest.pl changes.
llvm-svn: 29579
2006-08-09 05:45:12 +00:00
Chris Lattner
7b1362fa52 Start eliminating temporary vectors used to create DAG nodes. Instead, pass
in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.

I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.

We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.

It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.

llvm-svn: 29566
2006-08-08 02:23:42 +00:00
Patrick Jenkins
b2c90ef2c6 Removed unneccesary output from nightly tester
llvm-svn: 29565
2006-08-08 02:03:53 +00:00
Evan Cheng
c6627fc5d7 Making TableGen'd instruction selection code non-recursive. This fixes PR805.
llvm-svn: 29548
2006-08-07 22:17:58 +00:00
Patrick Jenkins
9ca71b7632 Reinstated the sending of a list of all dejagnutests run. Also fixed a rather embarresing error introduced during version 1.41 where i commented out the actual sending of the data to the results server.
llvm-svn: 29538
2006-08-07 01:54:37 +00:00
Patrick Jenkins
e9d04e428a no longer sending the list of all dejagnu tests because it is too big at the present time
llvm-svn: 29537
2006-08-06 21:47:43 +00:00
Patrick Jenkins
81b25121b6 Changed a = to a .= so we now append tests we have performed to the master list of all tests instead of assigning it as the master list.
llvm-svn: 29531
2006-08-04 21:42:58 +00:00
Patrick Jenkins
a24161d470 Made some more changes to the print statements in the nightly tester. The last commit was a preemptive strike.
llvm-svn: 29526
2006-08-04 17:55:01 +00:00
Patrick Jenkins
92b5a09795 Encapsulated all of the print statements in "if( $VERBOSE) { }". The testing script will be absoutely silent now except for errors, which will still be printed to the annoyance of the user.
llvm-svn: 29525
2006-08-04 17:53:27 +00:00
Patrick Jenkins
0f14694533 We should now send the correct list of dejagnu tests instead of the csv file of test results when we submit results back to the nightly tester.
llvm-svn: 29523
2006-08-04 17:40:54 +00:00
Reid Spencer
7b84a401c4 Print an error message if the lib directory (first argument) is not a
directory.

llvm-svn: 29508
2006-08-03 19:10:03 +00:00
Patrick Jenkins
7ec4fed8cf One of the directories we were searching in for .o and .a files was wrong. We now search /lib instead of /libs.
llvm-svn: 29496
2006-08-03 16:28:58 +00:00
Chris Lattner
6f475f0904 Remove some extraneous newlines.
llvm-svn: 29492
2006-08-03 00:42:26 +00:00
Chris Lattner
8afa040b03 Really add support for compilers without noinline
llvm-svn: 29491
2006-08-03 00:26:13 +00:00
Patrick Jenkins
a100384417 We now only search the following directories for .o and .a files:
utils/
libs/
tools/
Release/ & Debug/
as per Chris.

llvm-svn: 29488
2006-08-02 23:48:07 +00:00
Patrick Jenkins
cc89dd84d7 Removed some dead code and hopefully fixed the issue where the total list of tests was not being sent
llvm-svn: 29476
2006-08-02 18:37:40 +00:00
Reid Spencer
eb2516f29e Fix a problem with use of undefined variables. Print an error message if
the first argument is omitted. Attempt to use a standard/default font.
Make the generation of the DOT file readable.

llvm-svn: 29429
2006-08-01 08:09:03 +00:00
Evan Cheng
64b9364083 Pass N by reference to select functions to prevent gcc from allocating more stack.
llvm-svn: 29423
2006-08-01 01:07:48 +00:00
Evan Cheng
1335c08549 Remove an unneeded match condition: the type check for root node has been
moved to outside the actual select routine.

llvm-svn: 29415
2006-07-31 19:01:58 +00:00
Andrew Lenharth
c9b52f1f1b fix externals
llvm-svn: 29409
2006-07-29 04:27:34 +00:00
Evan Cheng
09f9f995f5 Split each select function for a particular opcode into multiple ones. One
per possible ValueType of the node. e.g. Select_add is split into Select_add_i8,
Select_add_i16, etc.

For opcodes which do not produce a non-chain result, it is split on the
ValueType of its first non-chain operand. e.g. Select_store.

On X86 / Mac OS X, Select_store used to be the largest function. It had a stack
frame size of 8.5k. Now the largest one is Store_i32 with a frame size of 3.1k.

llvm-svn: 29404
2006-07-28 22:51:01 +00:00
Evan Cheng
1ffea6db32 Clean up.
llvm-svn: 29378
2006-07-28 01:19:22 +00:00
Patrick Jenkins
25437ea178 Removed some unneccesary printing from the nightly tester.
llvm-svn: 29377
2006-07-28 01:06:18 +00:00
Evan Cheng
5f0e94c299 Rename IsFoldableBy to CanBeFoldedleBy
llvm-svn: 29376
2006-07-28 01:03:48 +00:00
Evan Cheng
3b5f1c6248 Remove InFlightSet hack. No longer needed.
llvm-svn: 29373
2006-07-28 00:47:19 +00:00
Reid Spencer
dc6201bb05 Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to
have a compile-host version of "nm", not build-host. In order to effect this
we must use autoconf to determine the correct "nm" to use and propagate that
through the makefiles, through llvm-config and finally to GenLibDeps.pl as
an optional argument.
Patch contributed by Anton Korobeynikov. Thanks!

llvm-svn: 29368
2006-07-27 23:00:30 +00:00
Patrick Jenkins
bee251acdd Removed some unneccesary print statemnts
llvm-svn: 29362
2006-07-27 21:01:39 +00:00
Patrick Jenkins
bf01a5d7a7 ChangeDir now returns the correct value
llvm-svn: 29361
2006-07-27 20:21:26 +00:00
Evan Cheng
35cdbdb796 Remove dead code.
llvm-svn: 29359
2006-07-27 19:59:34 +00:00
Patrick Jenkins
32c79d77eb Fixed a stupid error where changedir returned false upon success.
llvm-svn: 29357
2006-07-27 19:22:06 +00:00
Patrick Jenkins
9d77695860 Added more descriptive output to singlesource,multisource tests.
llvm-svn: 29353
2006-07-27 19:00:01 +00:00
Patrick Jenkins
83e48f5155 Removed some clutter that was left over from development.
Changed how changedir worked. Hopefully now when it fails it will tell us why.

llvm-svn: 29352
2006-07-27 18:28:50 +00:00
Evan Cheng
1e640aeee8 Let each target specific isel provide routine to check if a chain producing node is foldable by another.
llvm-svn: 29335
2006-07-27 06:36:49 +00:00
Patrick Jenkins
68d735bbca I made a stupid mistake when adding support for -use-gmake. ~PJ
llvm-svn: 29321
2006-07-27 01:24:35 +00:00
Patrick Jenkins
c839718eec added support for the -use-gmake option. This will come in handy when running the test on SunOS.
llvm-svn: 29319
2006-07-27 01:17:17 +00:00
Patrick Jenkins
ba02cd76ce This change will allow support for SunOS to the testing script. It adds a check to see if we're running on SunOS and if so, then uses gmake instead of make.
llvm-svn: 29316
2006-07-27 01:03:46 +00:00
Evan Cheng
978280e425 Fix for bug 840. Only use noinline attribute if gcc version >= 3.4
llvm-svn: 29311
2006-07-26 23:06:27 +00:00
Reid Spencer
4198005703 Add a feature for debugging library dependency cycles, -why option. This
implies -flat and will produce a list of all the symbols for each library
that another library depends on. Run the output through c++filt for
better readability. Also, don't generate a temporary file for storing the
dependent library names. Perl can handle it in a %hash.

llvm-svn: 29273
2006-07-25 19:12:06 +00:00
Patrick Jenkins
77199e9893 Fixing a syntax error and adding buildtype to the .a and .o file size information.
llvm-svn: 29270
2006-07-23 22:57:28 +00:00
Patrick Jenkins
ac3524e81d When the ability to gather .a and .o file sizes was added, it changed the directory the perl script was in so when we tried to run dejagnu tests, everything failed.
llvm-svn: 29269
2006-07-23 21:38:07 +00:00
Patrick Jenkins
b8bacbaf5d added status message during nightly test
llvm-svn: 29263
2006-07-22 00:00:08 +00:00
Evan Cheng
a80a26a5f8 Removed a hack intended to allow (store (op (load))) folding. Will handle this with preprocessing.
llvm-svn: 29258
2006-07-21 22:19:51 +00:00
Patrick Jenkins
889052bcba Added a check to skip dejagnu test results gathering if we did not run dejagnu tests
llvm-svn: 29252
2006-07-21 21:58:06 +00:00
Patrick Jenkins
3d34e1c416 Fixed an issue of variable scope that prevented file size from being submitted to the server.
llvm-svn: 29251
2006-07-21 21:43:09 +00:00
Jim Laskey
085a8477a7 Eliminate data relocations by using NULL instead of global empty list.
llvm-svn: 29250
2006-07-21 21:15:20 +00:00
Jim Laskey
a67adda697 Use an enumeration to eliminate data relocations.
llvm-svn: 29249
2006-07-21 20:57:35 +00:00
Patrick Jenkins
79ee516a92 Added code to get .a and .o file sizes and submit them to the server in the nightly report.
llvm-svn: 29248
2006-07-21 19:51:40 +00:00
Patrick Jenkins
e23fc52a3a Fixed issue where nightly test always tells you you need to use -nickname
llvm-svn: 29241
2006-07-21 01:39:42 +00:00
Patrick Jenkins
335a1ff9e5 The nightly tester will no longer report numbers instead of tests performed.
llvm-svn: 29240
2006-07-21 01:34:01 +00:00
Evan Cheng
94c6f2c3b5 Also checks for noResults field.
llvm-svn: 29235
2006-07-20 23:36:20 +00:00
Patrick Jenkins
b246f08be0 We now fail and print an error message if a nightly tester does not specify a nickname on the command line
llvm-svn: 29230
2006-07-20 22:28:43 +00:00
Patrick Jenkins
93ab06eda2 Fixed a problem that caused the script to abort right before it sent out the information
llvm-svn: 29218
2006-07-20 16:54:43 +00:00
Patrick Jenkins
9f7c5e1b28 Removed the portion that determines which tests are newly passing/failing because we no longer keep the previos days list on the testing machines.
Added functionality to send lists of all tests, all passing tests, all failing tests all unexpected failing tests.

llvm-svn: 29209
2006-07-19 17:52:51 +00:00