Commit Graph

2435 Commits

Author SHA1 Message Date
Chris Lattner 6070ee2a58 Cleanup getImplicitType
llvm-svn: 99353
2010-03-23 23:50:31 +00:00
Chris Lattner b424faa09c reject void in intrinsic type lists.
llvm-svn: 99347
2010-03-23 23:46:27 +00:00
Bill Wendling c941619a73 Use "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
Apple-style builds.

llvm-svn: 99336
2010-03-23 22:15:33 +00:00
Chris Lattner 2109cb461c Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy.  Now with a fix
for the verifier.

llvm-svn: 99206
2010-03-22 20:56:36 +00:00
Jeffrey Yasskin 544cfd76e7 When we don't pass --vg-leak to lit, pass --leak-check=no to valgrind.
llvm-svn: 99112
2010-03-21 01:47:33 +00:00
Daniel Dunbar d177edf361 Fix suggested parentheses warning.
llvm-svn: 99111
2010-03-21 01:38:21 +00:00
Jeffrey Yasskin 2f87b54f1a Add support for XFAILing valgrind runs with memory leak checking independently
of runs without leak checking.  We add -vg to the triple for non-checked runs,
or -vg_leak for checked runs.  Also use this to XFAIL the TableGen tests, since
tablegen leaks like a sieve.  This includes some valgrindArgs refactoring.

llvm-svn: 99103
2010-03-20 23:08:45 +00:00
Eric Christopher 3e2bb702db Revert r99009 temporarily it seems to be breaking the bots.
llvm-svn: 99011
2010-03-19 23:04:23 +00:00
Chris Lattner 933b2cf9a8 Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy.

llvm-svn: 99009
2010-03-19 22:40:56 +00:00
Chris Lattner 2db7abaa44 make getOperandNum a static function (since it's just used by
ApplyTypeConstraint) and make it handle multiple result nodes.

llvm-svn: 99003
2010-03-19 21:56:21 +00:00
Chris Lattner f144725ebc major surgery on tblgen: generalize TreePatternNode
to maintain a list of types (one for each result of
the node) instead of a single type.  There are liberal
hacks added to emulate the old behavior in various
situations, but they can start disolving now.

llvm-svn: 98999
2010-03-19 21:37:09 +00:00
Ben Holt b7d3d99181 Test commit (removed extra blank line)
llvm-svn: 98988
2010-03-19 21:12:29 +00:00
Daniel Dunbar c069cc8eaa FileCheck: Don't print "possibly intended match" line if it would match the
"scanning from here" one.

llvm-svn: 98971
2010-03-19 18:07:43 +00:00
Torok Edwin bc8eed000f Set numThreads to 1 by default when Python is older than 2.5.2.
Python 2.4 always hits this bug: http://bugs.python.org/issue1731717
when running check-lit on multi-core systems.
Setting numThreads to 1 makes it slower, but at least the results reported are
correct.

llvm-svn: 98969
2010-03-19 17:54:21 +00:00
Chris Lattner 6d765ebc0d make FillWithPossibleTypes take a predicate to filter types so that
we don't blow the smallvector as often.  No functionality change.

llvm-svn: 98968
2010-03-19 17:41:26 +00:00
Chris Lattner bb34b4e10f resolve fixme: we now infer the instruction-level 'isvariadic' bit
from the pattern if present, and we use it instead of the bit.

llvm-svn: 98938
2010-03-19 05:34:15 +00:00
Chris Lattner 83aeaab462 add a new SDNPVariadic SDNP node flag, and use it in
dag isel gen instead of instruction properties.  This
allows the oh-so-useful behavior of matching a variadic
non-root node.

llvm-svn: 98934
2010-03-19 05:07:09 +00:00
Chris Lattner be6b17f927 rewrite EnforceSmallerThan to be less bone headed.
llvm-svn: 98933
2010-03-19 04:54:36 +00:00
Daniel Dunbar ec71ba25e5 Fix -Asserts warning.
llvm-svn: 98927
2010-03-19 03:18:20 +00:00
Chris Lattner da5b4ad03e eliminate the last use of EEVT::isUnknown
llvm-svn: 98918
2010-03-19 01:14:27 +00:00
Chris Lattner 1802b17b65 Finally change the instruction looking map to be a densemap from
record* -> instrinfo instead of std::string -> instrinfo.

This speeds up tblgen on cellcpu from 7.28 -> 5.98s with a debug
build (20%).

llvm-svn: 98916
2010-03-19 01:07:44 +00:00
Chris Lattner 4763dbeaf6 make inst_begin/inst_end iterate over InstructionsByEnumValue.
Use CodeGenTarget::getInstNamespace in one place and fix it.

llvm-svn: 98915
2010-03-19 01:00:55 +00:00
Chris Lattner 2d822ab185 revert 98912
llvm-svn: 98914
2010-03-19 00:50:47 +00:00
Chris Lattner 45e2fc5ac1 make inst_begin/inst_end iterate over InstructionsByEnumValue.
llvm-svn: 98912
2010-03-19 00:40:22 +00:00
Chris Lattner 918be520dc change Target.getInstructionsByEnumValue to return a reference
to a vector that CGT stores instead of synthesizing it on every 
call.

llvm-svn: 98910
2010-03-19 00:34:35 +00:00
Chris Lattner c9ae94c793 factor copy and paste code.
llvm-svn: 98908
2010-03-19 00:23:20 +00:00
Chris Lattner 70eb897d7c don't go through getInstructions().
llvm-svn: 98906
2010-03-19 00:18:23 +00:00
Chris Lattner 9aec14b560 look up instructions by record, not by name.
llvm-svn: 98904
2010-03-19 00:07:20 +00:00
Chris Lattner 63a627cd88 expand tblgen's support for instructions with implicit defs.
llvm-svn: 98900
2010-03-18 23:57:40 +00:00
Chris Lattner fdc20711e8 infer results of a pattern from implicit defs. This allows you to do something
like this:

 def : Pat<(add ...),
           (FOOINST)>;

When fooinst only has a single implicit def (e.g. to R1).  This will be handled
as if written as (set R1, (FOOINST ...))

llvm-svn: 98897
2010-03-18 23:15:10 +00:00
Chris Lattner 2130a3e0af capture implicit uses and defs in CodeGenInstruction
llvm-svn: 98879
2010-03-18 21:42:03 +00:00
Chris Lattner 13590892e7 simplify this code, the # of sets in the pattern for an instruction
shouldn't change this.

llvm-svn: 98872
2010-03-18 21:15:05 +00:00
Chris Lattner 81fd1f20ba disallow concatenation of two dags with different operators.
llvm-svn: 98871
2010-03-18 21:07:51 +00:00
Chris Lattner 1f22d278f3 rewrite this to not artificially force concat the ins/outs list.
llvm-svn: 98870
2010-03-18 21:07:39 +00:00
Chris Lattner 0f03747577 eliminate support for "ops" in the input/output list of an
instruction.  Instructions must use 'ins' and 'outs' now.

llvm-svn: 98868
2010-03-18 20:56:35 +00:00
Chris Lattner 5f418eafdc remove some code that was working around old sparc v9 backend bugs.
Add checking that the input/output operand list in spelled right.

llvm-svn: 98865
2010-03-18 20:50:52 +00:00
Daniel Dunbar 9e6437ee7d lit: Tweak example tests config.
llvm-svn: 98859
2010-03-18 20:06:05 +00:00
Daniel Dunbar 451a435473 MC/AsmMatcher: Add support for target specific "instruction cleanup" functions,
to allow custom post-processing of matched instructions.

llvm-svn: 98857
2010-03-18 20:05:56 +00:00
Kovarththanan Rajaratnam dae75defc8 Add an extra newline to separate PP directives from the contents
llvm-svn: 98820
2010-03-18 13:16:38 +00:00
Jeffrey Yasskin fa22878d9d Avoid a problem in libc_freeres() seen on a linux-i686 buildbot when running
under valgrind:

==19577== Invalid free() / delete / delete[]
==19577==    at 0x4C9C866: free (vg_replace_malloc.c:325)
==19577==    by 0x5121104: ??? (in /lib/libc-2.10.2.so)
==19577==    by 0x4C97412: _vgnU_freeres (vg_preloaded.c:62)
==19577==    by 0x5041486: __run_exit_handlers (exit.c:93)
==19577==    by 0x50414FE: exit (exit.c:100)
==19577==    by 0x5028B5C: (below main) (libc-start.c:254)
==19577==  Address 0xffffffff is not stack'd, malloc'd or (recently) free'd
==19577== 

Apparently this happens under certain versions of glibc, so valgrind provides
the --run-libc-freeres=no option to avoid calling freeres().  This may increase
the number of "still reachable" blocks valgrind reports, but we don't care
about those, while this error breaks the buildbots.

There are upstream bugs about this at
http://sourceware.org/bugzilla/show_bug.cgi?id=10610 and
http://bugs.kde.org/show_bug.cgi?id=167483, but they don't look likely to be
fixed.

llvm-svn: 98813
2010-03-18 07:00:12 +00:00
Jim Grosbach 86bcdccb65 Use llvm-gcc to build ARM when it's available
llvm-svn: 98770
2010-03-17 21:25:13 +00:00
Jeffrey Yasskin 11122eafe7 Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
non-unit tests.

llvm-svn: 98741
2010-03-17 17:04:56 +00:00
Bob Wilson 1b4e8cc69c --- Reverse-merging r98637 into '.':
U    test/CodeGen/ARM/tls2.ll
U    test/CodeGen/ARM/arm-negative-stride.ll
U    test/CodeGen/ARM/2009-10-30.ll
U    test/CodeGen/ARM/globals.ll
U    test/CodeGen/ARM/str_pre-2.ll
U    test/CodeGen/ARM/ldrd.ll
U    test/CodeGen/ARM/2009-10-27-double-align.ll
U    test/CodeGen/Thumb2/thumb2-strb.ll
U    test/CodeGen/Thumb2/ldr-str-imm12.ll
U    test/CodeGen/Thumb2/thumb2-strh.ll
U    test/CodeGen/Thumb2/thumb2-ldr.ll
U    test/CodeGen/Thumb2/thumb2-str_pre.ll
U    test/CodeGen/Thumb2/thumb2-str.ll
U    test/CodeGen/Thumb2/thumb2-ldrh.ll
U    utils/TableGen/TableGen.cpp
U    utils/TableGen/DisassemblerEmitter.cpp
D    utils/TableGen/RISCDisassemblerEmitter.h
D    utils/TableGen/RISCDisassemblerEmitter.cpp
U    Makefile.rules
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/Makefile
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
D    lib/Target/ARM/Disassembler
U    lib/Target/ARM/ARMInstrFormats.td
U    lib/Target/ARM/ARMAddressingModes.h
U    lib/Target/ARM/Thumb2ITBlockPass.cpp

llvm-svn: 98640
2010-03-16 16:59:47 +00:00
Johnny Chen 3d9327bd06 Initial ARM/Thumb disassembler check-in. It consists of a tablgen backend
(RISCDisassemblerEmitter) which emits the decoder functions for ARM and Thumb,
and the disassembler core which invokes the decoder function and builds up the
MCInst based on the decoded Opcode.

Added sub-formats to the NeonI/NeonXI instructions to further refine the NEONFrm
instructions to help disassembly.

We also changed the output of the addressing modes to omit the '+' from the
assembler syntax #+/-<imm> or +/-<Rm>.  See, for example, A8.6.57/58/60.

And modified test cases to not expect '+' in +reg or #+num.  For example,

; CHECK:       ldr.w	r9, [r7, #28]

llvm-svn: 98637
2010-03-16 16:36:54 +00:00
Daniel Dunbar 0b5310b9f2 NNT: Add -nouname option, so machine uniquing can occur across physical machines.
llvm-svn: 98633
2010-03-16 15:53:02 +00:00
Chris Lattner f57437abb1 don't form a RecordChild or CheckChildType for child #'s over 7, we don't
have enums for them.

llvm-svn: 98597
2010-03-16 00:35:11 +00:00
Chris Lattner 0db1d6500a eliminate some #if 0 code I added in r96905, type inference
now enforces that input/output named values have hte same type.

llvm-svn: 98535
2010-03-15 06:03:22 +00:00
Chris Lattner cabe037b2d Completely rewrite tblgen's type inference mechanism,
changing the primary datastructure from being a 
"std::vector<unsigned char>" to being a new TypeSet class
that actually has (gasp) invariants!

This changes more things than I remember, but one major
innovation here is that it enforces that named input 
values agree in type with their output values.

This also eliminates code that transparently assumes (in 
some cases) that SDNodeXForm input/output types are the
same, because this is wrong in many case.

This also eliminates a bug which caused a lot of ambiguous
patterns to go undetected, where a register class would
sometimes pick the first possible type, causing an
ambiguous pattern to get arbitrary results.

With all the recent target changes, this causes no 
functionality change!

llvm-svn: 98534
2010-03-15 06:00:16 +00:00
Evan Cheng 44be5362d6 Check in tablegen changes to fix disassembler related failures caused by r98465.
llvm-svn: 98468
2010-03-14 05:15:39 +00:00
Jeffrey Yasskin 754d2dc041 Make lit pay attention to --vg for unittests too.
llvm-svn: 98449
2010-03-13 20:45:41 +00:00