Commit Graph

1769 Commits

Author SHA1 Message Date
Bob Wilson
e035fa50f3 Handle iAny and fAny types in TreePatternNode::UpdateNodeType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61713 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:52:54 +00:00
Dan Gohman
1ed7942e4f Add the keyword 'default'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61710 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:44:11 +00:00
Misha Brukman
105a91a3fa Renamed Google Test license file from COPYING to LICENSE.TXT to match LLVM
conventions, per John Criswell.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:42:15 +00:00
Dan Gohman
8f56ebaf5c A few more polygen grammar updates.
- After GlobalAssign, emit addrspace before global/constant, to follow
   the new syntax.
 - Eliminate "type void", which is now invalid.
 - Fix invalid liblists like [, "foo"].
 - Tweak whitespace in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:29:42 +00:00
Bob Wilson
6c01ca9e29 Fix spelling in some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 17:23:09 +00:00
Dan Gohman
6a9e75ec13 gc is not an obsolete keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 03:22:02 +00:00
Dan Gohman
571238acc5 Update polygen grammar for recent language changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61669 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 03:21:23 +00:00
Dan Gohman
7e638cd366 The .llx suffix is obsolete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 23:10:00 +00:00
Dan Gohman
5d8ab65ea4 Update VIM LLVM IR syntax highlighting.
- Add several new keywords
 - Clean up some obsolete keywords
 - Improve the patterns for constants.
 - Add syntax-highlighting for dejagnu test command comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 23:09:38 +00:00
Dan Gohman
a0741ba2cc Set a few more vimrc indentation options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61628 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 18:59:55 +00:00
Dan Gohman
f225d2e4d6 Use softtabstop instead of redefining tabstop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 00:05:43 +00:00
Dan Gohman
96eafe2d4f Switch the vimrc file from smartindent to cindent, which is
smarter about C-ish syntax, and supports the cinoptions
variable. Set cinoptions to suppress the extra indentation
for switch case labels.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-04 00:03:54 +00:00
Misha Brukman
27c1e89a4b VerifyLineLength() actually takes a max length parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 21:24:29 +00:00
Misha Brukman
653222fc99 Added some basic lint tools for C++ and generic lint tool applicable to all
types of files (TableGen, LLVM assembly, HTML files, etc.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 21:15:30 +00:00
Misha Brukman
12c8d1b6e8 Deleted trailing whitespace; no functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 16:28:18 +00:00
Misha Brukman
adf4e4d06a vimrc
* Fixed cursors in terminal by setting nocompatible (sorry, vi users)
* Enable syntax highlighting so that this file can stand on its own
* Highlight trailing whitespace
* Fixed commands to delete trailing whitespaces and convert tabs to spaces

llvm.vim and tablegen.vim
* Removed trailing whitespace, as it's now very visible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 16:26:14 +00:00
Misha Brukman
715a958565 We also removed gtest-all.cc from the distribution tarball.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61581 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 15:28:00 +00:00
Misha Brukman
8fb520eb4f Original patch by Talin.
* Added the first LLVM unittest -- DenseMap.
* Updated mkpatch utility to include llvm/unittests dir
* Added top-level target "unittests" to run all unittests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-01 02:24:48 +00:00
Misha Brukman
e5f9471bd2 * Removed gtest-all.cc; .cc files including other .cc files is weird
* Removed gtest_main.cc: we have our own main() elsewhere
* Simplified the Makefile as we don't need SOURCES

* Moved the internal header to gtest/internal/
* Simplified the Makefile to remove -I param to CPP.Flags

* Updated README.LLVM with all the steps I took to massage GTest to
  work in LLVM so far


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-01 02:05:43 +00:00
Misha Brukman
3aae44e19f Moved Google Test code up one directory so that we can use a standard LLVM
Makefile with it, without resorting to the use of VPATH.

Also added Makefiles at every level of the directory tree to properly recurse
to Google Test and build it as a library (original Makefiles by Talin).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-01 01:29:44 +00:00
Misha Brukman
7ae6ff442a Import of Google Test 1.2.1, with the non-essential bits removed.
Added a README.LLVM file to indicate which files and directories
were removed from the original source tarball.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-31 17:34:06 +00:00
Dan Gohman
0b53d98c29 Use dyn_cast intead of isa + cast in the generated DAGISel code. This
reduces the amount of code slightly when assertions are enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-19 18:13:39 +00:00
Mon P Wang
87c8a8f304 Added support for vector widening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 20:03:17 +00:00
Mikhail Glushenkov
65ee1e6ff4 Fix typo in error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61191 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-18 04:06:58 +00:00
Mikhail Glushenkov
5c2b6b26c9 Some enhancements for the 'case' expression.
Add (error) and (empty).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-17 02:47:01 +00:00
Bill Wendling
fc953d149f Change so that buildit won't need a parent directory with only the build scripts in them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61061 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-16 00:42:25 +00:00
Mikhail Glushenkov
e1d44b59ee Put Edge* classes into anonymous namespace.
Prevents conflicts between plugins.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-11 10:34:18 +00:00
Mikhail Glushenkov
b4ced5a3c4 Make 'extern' an option property.
Makes (forward) work better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60667 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:47:12 +00:00
Mikhail Glushenkov
ad889a7f88 Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60664 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:45:12 +00:00
Mikhail Glushenkov
15b71ba122 Re-apply Cedric's changes.
Use B instead of Beg (for consistency), but NodeA and NodeB instead of A
and B.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:44:47 +00:00
Mikhail Glushenkov
b59dbad710 Try to guess when the auto-generated cl::Sink option should be marked 'extern'.
This would be much easier to do if the CommandLine library didn't use
global state. Global state is evil.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60659 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:42:47 +00:00
Mikhail Glushenkov
08509493e5 Add a (progn)-like construct for (actions). Implemented as a DAG list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60658 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:42:22 +00:00
Mikhail Glushenkov
f915253dfc Use (actions) instead of option properties, support external options.
Also includes a major refactoring. See documentation for more
information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60656 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 16:41:11 +00:00
Cedric Venet
8f241b0efb The use of the construct:
for(Type1 B = ...;;) { Type2 B ; ... }
is bad: code is hard to read and VS VS don't like it (it ignore the second declaration of B).
This patch fix the problem in tablegen. Please don't write code like this. 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60590 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05 13:37:30 +00:00
Dan Gohman
15511cf166 Rename isSimpleLoad to canFoldAsLoad, to better reflect its meaning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 18:15:48 +00:00
Dan Gohman
62c939d7d5 Mark x86's V_SET0 and V_SETALLONES with isSimpleLoad, and teach X86's
foldMemoryOperand how to "fold" them, by converting them into constant-pool
loads. When they aren't folded, they use xorps/cmpeqd, but for example when
register pressure is high, they may now be folded as memory operands, which
reduces register pressure.

Also, mark V_SET0 isAsCheapAsAMove so that two-address-elimination will
remat it instead of copying zeros around (V_SETALLONES was already marked).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60461 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 05:21:24 +00:00
Dan Gohman
41474baac8 Add a sanity-check to tablegen to catch the case where isSimpleLoad
is set but mayLoad is not set. Fix all the problems this turned up.

Change code to not use isSimpleLoad instead of mayLoad unless it
really wants isSimpleLoad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60459 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-03 02:30:17 +00:00
Mikhail Glushenkov
ad746beb64 Support multiple compilation graph definitions. Not terribly useful, but makes the code more generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60199 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-28 00:13:47 +00:00
Mikhail Glushenkov
739c720e66 Add 'hidden' and 'really_hidden' option properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60198 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-28 00:13:25 +00:00
Evan Cheng
884c70c912 On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax

is 2 bytes shorter than

movl $4, %eax
addl 4(%esp), %eax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-27 00:49:46 +00:00
Mikhail Glushenkov
3acc921b26 Small fix: the error message was incorrect in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60099 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-26 10:55:45 +00:00
Bill Wendling
ce5ac1606f Copy the tblgen utility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20 00:11:57 +00:00
Mikhail Glushenkov
35fde15059 Support dependencies between plugins by priority-sorting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 17:30:25 +00:00
Mikhail Glushenkov
fa2707709d Filter ToolPropertiesList to exclude all Tools not mentioned in the compilation graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59448 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 17:29:42 +00:00
Mikhail Glushenkov
010887765a Add a layer of indirection to make plugins more flexible.
Use strings instead of TableGen defs in the compilation graph
definition. Makes it easier for the plugins to modify an existing graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-17 17:29:18 +00:00
Bill Wendling
023422a6eb Fix to record comparator to make it work for return values > 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59242 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 12:03:00 +00:00
Bill Wendling
20072af3b0 Put comma in correct place for call to StructType::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59241 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 10:18:35 +00:00
Bill Wendling
cdcc3e6e12 Modify the intrinsics pattern to separate out the "return" types from the
"parameter" types. An intrinsic can now return a multiple return values like
this:

  def add_with_overflow : Intrinsic<[llvm_i32_ty, llvm_i1_ty],
                                    [LLVMMatchType<0>, LLVMMatchType<0>]>;



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59237 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-13 09:08:33 +00:00
Oscar Fuentes
e40db4a2f3 Tell GenLibDeps.pl to inspect .so and .dylib shared files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12 20:39:06 +00:00
Mikhail Glushenkov
6766572dcb Check the return value of std::getenv.
When constructing std::strings from C strings, we should check the input
value to be not NULL so that the std::string constructor does not
segfault.
Fixes #3047.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59131 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-12 12:41:18 +00:00