Commit Graph

1783 Commits

Author SHA1 Message Date
Dan Gohman
febf71db2d Avoid triggering an assertion failure when an instruction pattern
is a leaf node. Patch by Brandner!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:30:55 +00:00
Dan Gohman
05aae18165 Add support for instructions with multiple ComplexPatterns, by
adding more information to the temporary variables names so that
they don't conflict.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62296 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 02:05:52 +00:00
Duncan Sands
ceb4d1aecb Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 20:38:59 +00:00
Chris Lattner
d4a2700fdc make tblgen autogenerate the nocapture intrinsics for
llvm.memcpy/memset/memmove.  This allows removal of some 
hackish code from basicaa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62071 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 02:41:37 +00:00
Chris Lattner
10dae94be2 add scaffolding to emit argument attributes. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 01:27:55 +00:00
Chris Lattner
048ffb239c make tblgen emit the entire Intrinsic::getAttributes method,
not a random piece of it.  No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 01:18:58 +00:00
Chris Lattner
a62c302ddd add nocapture attribute to llvm.mem* intrinsics and have tblgen
parse them.  tblgen doesn't yet do anything with this info though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12 01:12:03 +00:00
Misha Brukman
cb856f6d3e This has been replaced by llvm/utils/lint/cpp_lint.py, which is more
comprehensive and can support more complex style analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-09 19:46:41 +00:00
Chris Lattner
d7a97f06ae remove some exclusions that don't exist anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61932 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 19:02:03 +00:00
Misha Brukman
5539a1ecda Use VIM's built-in shorthand for whitespace in regex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61906 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 02:17:30 +00:00
Misha Brukman
cb5852d1f7 Be sure to ignore the end-of-line character when considering trailing
whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-08 02:16:13 +00:00
Bob Wilson
bc03979536 Improve support for type-generic vector intrinsics by teaching TableGen how
to handle LLVMMatchType intrinsic parameters, and by adding new subclasses
of LLVMMatchType to match vector types with integral elements that are 
either twice as wide or half as wide as the elements of the matched type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 00:09:01 +00:00
Dan Gohman
de0e7f2481 Fix a thinko in the grammar for thread_local variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 23:03:03 +00:00
Dan Gohman
1eb49a0a5e Delete an unused variable and simplify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-05 19:31:28 +00:00
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