Commit Graph

2990 Commits

Author SHA1 Message Date
Nate Begeman
8a6e7e1214 Revert r114596, it's breaking a few tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23 16:49:17 +00:00
Nate Begeman
e5cb26fab9 <rdar://problem/8228022> Wvector-conversions warnings in arm_neon.h
Explicitly cast arguments to the type the builtin expects, which is <vN x i8>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-22 22:28:42 +00:00
Chris Lattner
d847bc20b8 Rework passing parent pointers into complexpatterns, I forgot
that complex patterns are matched after the entire pattern has
a structural match, therefore the NodeStack isn't in a useful
state when the actual call to the matcher happens.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 22:00:25 +00:00
Chris Lattner
78d3af47f5 just like they can opt into getting the root of the pattern being
matched, allow ComplexPatterns to opt into getting the parent node
of the operand being matched.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 20:37:12 +00:00
Chris Lattner
52a261b3c1 fix a long standing wart: all the ComplexPattern's were being
passed the root of the match, even though only a few patterns
actually needed this (one in X86, several in ARM [which should
be refactored anyway], and some in CellSPU that I don't feel 
like detangling).   Instead of requiring all ComplexPatterns to
take the dead root, have targets opt into getting the root by
putting SDNPWantRoot on the ComplexPattern.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 20:31:19 +00:00
Mikhail Glushenkov
f41b75d85b Trailing whitespace, 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 14:59:50 +00:00
Mikhail Glushenkov
46aa524f0d llvmc: Allow multiple output languages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114433 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 14:59:42 +00:00
Misha Brukman
7e28460ee9 Using regexp-opt for keyword regex declarations makes the word lists more
readable and easier to edit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-19 03:44:22 +00:00
Eric Christopher
168705049c Handle the odd case where we only have one instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 18:50:27 +00:00
Daniel Dunbar
3f42dba88f lit: Bump version to 0.2.0dev, for no apparent reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 02:28:15 +00:00
Daniel Dunbar
bd26ba0b53 lit: Tweak setup.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 02:28:12 +00:00
Daniel Dunbar
3f32b444ed lit: These TODOs are done(ish).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-18 02:28:09 +00:00
Duncan Sands
7201c9f1f1 Some of the tests build an executable with llvm-gcc. For this to work, llvm-gcc
needs to find some libraries, which may require searching the directories given
by LIBRARY_PATH on curiously configured systems.  So pass on LIBRARY_PATH.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114186 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17 17:05:27 +00:00
Duncan Sands
40989a40f0 Release-Asserts no longer exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113965 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 12:30:35 +00:00
Daniel Dunbar
c2be84fd49 lit: Expose FileBasedTest object and Test module via 'lit' object that gets
exposed to config files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113923 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 03:52:38 +00:00
Daniel Dunbar
ff2dcd3ce9 lit: Rename main lit module to main.py, lit/lit/lit.py was a bit too, err,
alliterate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113922 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 03:52:31 +00:00
Bob Wilson
ee9ca07e7f Use float64 instead of int64 vector elements for NEON vget_low and vget_high
functions, since int64 is not a legal type and using it leads to inefficient
code.  PR8036.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 01:52:33 +00:00
Bob Wilson
72774c9a83 Tidy whitespace in generated arm_neon.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 21:52:34 +00:00
Michael J. Spencer
08047f6169 CBackend: Fix MSVC build.
This may produce warnings on MSVS, but it's better than failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113834 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 04:27:38 +00:00
Devang Patel
12b0179c14 Fix typo in temp. script file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 21:23:17 +00:00
Devang Patel
c7183baac6 Add little test script to check debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 20:42:15 +00:00
Michael J. Spencer
becf392e3b CMake: Add llvm-lit to CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 17:52:38 +00:00
Duncan Sands
8a6e53e116 Nowadays a release build has assertions off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 13:45:33 +00:00
Dale Johannesen
8be452545a Add x86mmx to TableGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 00:16:46 +00:00
Evan Cheng
5f54ce3473 For each instruction itinerary class, specify the number of micro-ops each
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.

This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:18:55 +00:00
Duncan Sands
ca64b6ad0e This script is executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 09:37:54 +00:00
Chris Lattner
373c458850 fix bugs in push/pop segment support, rdar://8407242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 22:13:08 +00:00
Bill Wendling
8be4e032bd Remove --with-gxx-include-dir option because it's causing problems on non-Darwin platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113401 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 20:21:11 +00:00
Bill Wendling
c248bbab04 Add an option to not test ObjC for those platforms which don't support it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 20:09:14 +00:00
Duncan Sands
cff1dbfa18 Correct variable name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 19:58:15 +00:00
Duncan Sands
d357d747de Move the number of cpus logic to somewhere more logical.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113393 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 19:50:25 +00:00
Bill Wendling
b91c71299a A script that tests a certain release candidate in several modes. It does a
2-phase build of llvm and llvm-gcc, similar to what the buildbots do, and runs
the regression testsuite.

Things to do:

- Work out some bugs with llvm-gcc flags.
- Not all platforms support ObjC.
- Run the test-suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113382 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:32:31 +00:00
Bill Wendling
d8dd5757e0 Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:03:56 +00:00
Bill Wendling
72d1027d87 Fix whitespace, because I'm OCD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113250 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 18:49:14 +00:00
Dale Johannesen
86097c384f Add patterns for MMX that use the new intrinsics.
Enable palignr intrinsic.
These may need adjustment for a new VT in due course.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 18:10:56 +00:00
Chris Lattner
32c685cb67 attempt to appease msvc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113198 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 06:10:48 +00:00
Gabor Greif
e53ee3b112 fix comment typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 06:06:06 +00:00
Chris Lattner
9bb9fa19a5 generalize my previous operand loc info hack. If the same operand
is busted for all variants, report it as the location.  This allows
us to get the operand right for bugs like:

t.s:3:12: error: invalid operand for instruction
	outb %al, %gs
	          ^

Even though there are reg/imm and reg/reg forms of this instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 23:37:39 +00:00
Chris Lattner
ce4a3355d9 in the case where an instruction only has one implementation
of a mneumonic, report operand errors with better location
info.  For example, we now report:

t.s:6:14: error: invalid operand for instruction
        cwtl $1
             ^

but we fail for common cases like:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1
   ^

because we don't know if this is supposed to be the reg/imm or imm/reg
form.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 22:11:18 +00:00
Chris Lattner
a008e8ac73 Now that we know if we had a total fail on the instruction mnemonic,
give a more detailed error.  Before:

t.s:11:4: error: unrecognized instruction
   addl $1, $1
   ^
t.s:12:4: error: unrecognized instruction
   f2efqefa $1
   ^

After:

t.s:11:4: error: invalid operand for instruction
   addl $1, $1
   ^
t.s:12:4: error: invalid instruction mnemonic 'f2efqefa'
   f2efqefa $1
   ^

This fixes rdar://8017912 - llvm-mc says "unrecognized instruction" when it means "invalid operands"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113176 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:54:15 +00:00
Chris Lattner
fa0d74d58e simplify DEBUG_WITH_TYPE usage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:28:52 +00:00
Chris Lattner
44b0daad44 this if can now be an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113173 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:25:43 +00:00
Chris Lattner
80db4e51d2 ;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:23:43 +00:00
Chris Lattner
2b1f943444 now that the opcode is trivially exposed, start matching instructions
by doing a binary search over the mnemonic instead of doing a linear
search through all possible instructions.  This implements rdar://7785064


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113171 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:22:45 +00:00
Chris Lattner
96352e5ceb emit the match table at global scope instead of within the
MatchInstructionImpl. This makes it easier to read/understand
MatchInstructionImpl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:08:38 +00:00
Chris Lattner
e206fcf0e9 special case the mnemonic operand of the instruction in the
generated matcher, emiting it as a column in the MatchEntry
table instead of forcing it to go through classification and
everything else.  Making it be classified caused tblgen to
produce a ton of one-off classes for each mneumonic.  This
should reduce the size of the generated matcher significantly
while paving the way for future improvements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113169 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 21:01:37 +00:00
Chris Lattner
87410368e1 The "ambiguous instructions" check only produces anything with -debug,
so only do the N^2 loop with debug mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113168 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 20:21:47 +00:00
Chris Lattner
ec6789f4f9 have tblgen detect when an instruction would have matched, but
failed because a subtarget feature was not enabled.  Use this to
remove a bunch of hacks from the X86AsmParser for rejecting things
like popfl in 64-bit mode.  Previously these hacks weren't needed,
but were important to get a message better than "invalid instruction"
when used in the wrong mode.

This also fixes bugs where pushal would not be rejected correctly in
32-bit mode (just pusha).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113166 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 20:08:02 +00:00
Chris Lattner
79ed3f77e8 change MatchInstructionImpl to return an enum instead of bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 19:22:17 +00:00
Chris Lattner
0692ee676f have AsmMatcherEmitter.cpp produce the hunk of code that gets included
into the middle of the class, and rework how the different sections of
the generated file are conditionally included for simplicity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 19:11:01 +00:00