1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

2382 Commits

Author SHA1 Message Date
Dan Gohman
ef102f1ed3 Fix the position of the caret in the FileCheck error message.
Before:

test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
                                 ^

After:

test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
         ^

llvm-svn: 94846
2010-01-29 21:53:18 +00:00
Daniel Dunbar
f65b05e7e1 FileCheck: Switch "possible match" calculation to use StringRef::edit_distance.
- Thanks Doug, who is obviously less lazy than me!

llvm-svn: 94795
2010-01-29 03:22:19 +00:00
Sean Callanan
2112298100 Quick fix to make the header file for the enhanced
disassembly information have a better comment (and
better guard macros).

llvm-svn: 94781
2010-01-29 01:34:29 +00:00
Ted Kremenek
1eca6e4925 Recognize 'add_executable' when analyzing CMake files.
llvm-svn: 94777
2010-01-29 01:10:55 +00:00
Ted Kremenek
cce1825bc9 Update CMake build.
llvm-svn: 94776
2010-01-29 01:10:25 +00:00
Sean Callanan
59ba2433b0 Added a custom TableGen backend to support the
enhanced disassembler, and the necessary makefile
rules to build the table for X86.

llvm-svn: 94764
2010-01-29 00:21:04 +00:00
Mikhail Glushenkov
ee410352c8 Escape double quotes in 'help'.
llvm-svn: 94543
2010-01-26 14:55:04 +00:00
Chris Lattner
5a57121631 make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
llvm-svn: 94378
2010-01-24 20:43:08 +00:00
Sean Callanan
1942b96584 Modified the register matcher function in AsmMatcher to
be static.  Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.

llvm-svn: 94266
2010-01-23 00:40:33 +00:00
Daniel Dunbar
a0ef4e4068 AsmMatcher: Add a comment.
llvm-svn: 94261
2010-01-23 00:26:16 +00:00
Daniel Dunbar
856d040f58 Make GetSourceVersion more portable, thanks Pawel!
llvm-svn: 94186
2010-01-22 18:14:21 +00:00
Daniel Dunbar
ca283162fa lit: Separate test suite from test name with spaces, to make it easier to cut and paste.
llvm-svn: 94134
2010-01-22 02:04:28 +00:00
Daniel Dunbar
55d6538336 Add a simple script for getting a version tag from a svn/git-svn/git
repository. Feel free to add support for your favorite VCS.

llvm-svn: 94077
2010-01-21 16:09:59 +00:00
Bob Wilson
c82f536a5c The change in r90189 adds a link in a directory outside the iPhone platform
directory when building the llvmCore_Embedded project.  Fix this by putting
the iPhone platform directory into DEST_DIR instead of DEST_ROOT.  I also
noticed what appears to be an unintentional use of DEVELOPER_BIN instead of
DEVELOPER_DIR, so I fixed that and changed to use DEVELOPER_DIR in some places
that were hardcoded to "Developer".  Finally, the other changes here allowed
some refactoring and simplification, which I have done.

llvm-svn: 93878
2010-01-19 16:42:10 +00:00
Chris Lattner
b9ad4c901e update mkpatch, patch by Garrison Venn!
llvm-svn: 93771
2010-01-18 21:09:05 +00:00
Eric Christopher
3c5d9dc0e3 Remove the InlineHint attribute. There are no current or planned
users.

llvm-svn: 93558
2010-01-15 21:36:30 +00:00
Dale Johannesen
c396179c7e Remove DEBUG_DECLARE, looks like we don't need it.
Also, DEBUG_VALUE has side effects.

llvm-svn: 93498
2010-01-15 01:50:44 +00:00
Chris Lattner
882cb240a6 Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands.  A new MatchInstruction interface is used to
turn the operand list into an MCInst.

This requires new/deleting all the operands, but it also gives 
targets the ability to use polymorphic operands if they want to. 

llvm-svn: 93469
2010-01-14 22:21:20 +00:00
Bill Wendling
56464738cc Use ENABLE_ASSERTIONS throughout.
llvm-svn: 93423
2010-01-14 10:19:55 +00:00
Stuart Hastings
a27112f01a Erm, previous patch was wrong; Thanks Bill\!
llvm-svn: 93381
2010-01-14 00:34:53 +00:00
Stuart Hastings
47cfd4abc0 Enable assertions by default for Apple-style builds.
llvm-svn: 93380
2010-01-14 00:22:05 +00:00
Benjamin Kramer
cdbc36f961 Reimplement getToken and SplitString as "StringRef helper functions"
- getToken is modeled after StringRef::split but it can split on multiple
  separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
  same behaviour as getToken.

llvm-svn: 93161
2010-01-11 18:03:24 +00:00
Dan Gohman
123aee69c0 Tighten up the vim LLVM IR syntax highlighting regex for labels, and add a
highlighting rule for identifiers.

llvm-svn: 93056
2010-01-09 17:22:48 +00:00
Dan Gohman
03fedbe06b Set the vim auto-indent setting for open braces after case statements to
follow LLVM source convention.

Before:
  case X: {
            stuff;
          }

After:
  case X: {
    stuff;
  }

llvm-svn: 93055
2010-01-09 17:15:21 +00:00
Dale Johannesen
0e21161e32 Add DEBUG_DECLARE. Not used yet.
llvm-svn: 93040
2010-01-09 01:24:25 +00:00
Dale Johannesen
610f0ce9aa Add DEBUG_VALUE. Not used yet.
llvm-svn: 93030
2010-01-08 23:51:25 +00:00
Duncan Sands
4ef1119d94 Partially address a README by having functionattrs consider calls to
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.

llvm-svn: 92829
2010-01-06 08:45:52 +00:00
Dan Gohman
9ef9e2c758 Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
uses several kinds of opcode values which are not declared within
that enum. This fixes PR5946.

llvm-svn: 92794
2010-01-05 22:26:32 +00:00
David Greene
19324a5b81 Add an !eq() operator to TableGen. It operates on strings only.
Use !cast<string>() to compare other types of objects.

llvm-svn: 92754
2010-01-05 19:11:42 +00:00
David Greene
eef5772b46 Have TableGen emit code that uses dbgs() rather than errs().
llvm-svn: 92738
2010-01-05 17:47:41 +00:00
Dan Gohman
9bcfdf98f1 Change SelectCode's argument from SDValue to SDNode *, to make it more
clear what information these functions are actually using.

This is also a micro-optimization, as passing a SDNode * around is
simpler than passing a { SDNode *, int } by value or reference.

llvm-svn: 92564
2010-01-05 01:24:18 +00:00
Daniel Dunbar
3e856e5f8f tblgen/OptParser: Use EmitSourceFileHeader.
llvm-svn: 92521
2010-01-04 22:03:51 +00:00
Dan Gohman
a89531ec4f Replace some special-case code which probably was buggy with an assertion
verifying that the special case does not occur.

llvm-svn: 92504
2010-01-04 20:36:57 +00:00
Dan Gohman
f47c2a2335 Remove the CPAttrParentAsRoot code, which is unused, and inconvenient
for a refactoring I'm working on.

llvm-svn: 92503
2010-01-04 20:31:55 +00:00
Mikhail Glushenkov
3a5fc21b12 Typo.
llvm-svn: 92392
2010-01-01 04:40:54 +00:00
Mikhail Glushenkov
226e1c7f11 Make CheckForSuperfluousOptions handle list form of 'switch_on' correctly.
llvm-svn: 92391
2010-01-01 03:51:02 +00:00
Mikhail Glushenkov
f697106fb7 Minor simplifications.
llvm-svn: 92390
2010-01-01 03:50:51 +00:00
Mikhail Glushenkov
72ce967c39 Better error message.
llvm-svn: 92389
2010-01-01 03:50:34 +00:00
Daniel Dunbar
e7b673bbc4 lit: Add setuptools support.
llvm-svn: 92169
2009-12-26 22:58:39 +00:00
Daniel Dunbar
8dae6490fd lit: Sink code into a 'lit' package.
llvm-svn: 92168
2009-12-26 22:58:23 +00:00
Bill Wendling
318224b8f1 Use the 'MadeChange' variable instead of returning 'false' all of the time.
llvm-svn: 92155
2009-12-25 13:35:40 +00:00
Daniel Dunbar
cb80704195 Don't emit trailing semicolon.
llvm-svn: 92133
2009-12-24 17:49:28 +00:00
Mikhail Glushenkov
1de24c23ea Cosmetic issue: more consistent naming.
llvm-svn: 91998
2009-12-23 12:49:41 +00:00
Mikhail Glushenkov
7db8203dd2 Allow (set_option SwitchOption, true).
llvm-svn: 91997
2009-12-23 12:49:30 +00:00
Daniel Dunbar
0c5f079749 Suppress compiler warning.
llvm-svn: 91959
2009-12-23 00:45:10 +00:00
Sean Callanan
983f906451 Fixes to the X86 disassembler:
Made LEA memory operands emit only 4 MCInst operands.
Made the scale operand equal 1 for instructions that have no
SIB byte.

llvm-svn: 91919
2009-12-22 21:12:55 +00:00
David Greene
3bfe36b5d9 Fix a bug in !subst where TableGen would go and resubstitute text it had
just substituted.  This could cause infinite looping in certain
pathological cases.

llvm-svn: 91843
2009-12-21 21:21:34 +00:00
Chris Lattner
2c532518c0 .llx is no more.
llvm-svn: 91784
2009-12-19 20:56:53 +00:00
Nuno Lopes
d0b1ef8875 fix build and while at it remove a redudant include
llvm-svn: 91774
2009-12-19 11:52:18 +00:00
Daniel Dunbar
bc03a42df1 More bzero -> memset that I missed.
llvm-svn: 91757
2009-12-19 04:16:57 +00:00
Daniel Dunbar
a1563328bb Add missing newlines at EOF (for clang++).
llvm-svn: 91756
2009-12-19 04:16:48 +00:00
Sean Callanan
18fa59f381 Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit
incarnations), integrated into the MC framework.  

The disassembler is table-driven, using a custom TableGen backend to 
generate hierarchical tables optimized for fast decode.  The disassembler 
consumes MemoryObjects and produces arrays of MCInsts, adhering to the 
abstract base class MCDisassembler (llvm/MC/MCDisassembler.h).

The disassembler is documented in detail in

- lib/Target/X86/Disassembler/X86Disassembler.cpp (disassembler runtime)
- utils/TableGen/DisassemblerEmitter.cpp (table emitter)

You can test the disassembler by running llvm-mc -disassemble for i386
or x86_64 targets.  Please let me know if you encounter any problems
with it.

llvm-svn: 91749
2009-12-19 02:59:52 +00:00
Dan Gohman
17556ab401 Fix a comment.
llvm-svn: 91741
2009-12-19 01:46:09 +00:00
Eli Friedman
241630ece5 Fix an issue in googletest where a name was used before it was defined.
llvm-svn: 91718
2009-12-18 21:38:44 +00:00
Mikhail Glushenkov
606e829658 Make 'set_option' work with list options.
This works now: (set_option "list_opt", ["val_1", "val_2", "val_3"])

llvm-svn: 91679
2009-12-18 11:27:26 +00:00
Mikhail Glushenkov
40eeddfb23 Add a 'set_option' action for use in OptionPreprocessor.
llvm-svn: 91594
2009-12-17 07:49:16 +00:00
Mikhail Glushenkov
29f6764c94 Refactoring, no functionality change.
llvm-svn: 91593
2009-12-17 07:48:49 +00:00
Mikhail Glushenkov
f95b51aeac s/TokenizeCmdline/TokenizeCmdLine/
llvm-svn: 91592
2009-12-17 07:48:34 +00:00
Jim Grosbach
483afaa7f7 Add @earlyclobber TableGen constraint
llvm-svn: 91554
2009-12-16 19:43:02 +00:00
Bill Wendling
18fe802d05 Remove superfluous 'extern' variable that was causing a warning with clang.
llvm-svn: 91552
2009-12-16 19:36:42 +00:00
Bill Wendling
0de1598c3b Some command lines don't like numbers with leading zeros. Remove them.
llvm-svn: 91463
2009-12-15 22:42:19 +00:00
Daniel Dunbar
8747fc993f lit: Improve error when gtest discovery fails.
llvm-svn: 91458
2009-12-15 22:00:37 +00:00
Dan Gohman
1b3e6a82f8 Revert 90628, which was incorrect.
llvm-svn: 91448
2009-12-15 20:21:44 +00:00
Jim Grosbach
114ea00f73 whitespace
llvm-svn: 91442
2009-12-15 19:28:13 +00:00
Mikhail Glushenkov
7743ee06be Convert llvmc tests to FileCheck.
llvm-svn: 91420
2009-12-15 07:21:14 +00:00
Mikhail Glushenkov
2d69ef4077 Support hook invocation from 'append_cmd'.
llvm-svn: 91419
2009-12-15 07:20:50 +00:00
Mikhail Glushenkov
93c8d86be9 Validate the generated C++ code in llvmc tests.
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:

- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional

llvm-svn: 91404
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov
39b16212f2 Allow $CALL(Hook, '$INFILE') for non-join tools.
llvm-svn: 91402
2009-12-15 03:04:02 +00:00
Daniel Dunbar
96d1aed265 NNT: Make sure stderr for build commands goes to log file, as intended but misdirected.
llvm-svn: 91379
2009-12-15 00:41:47 +00:00
Daniel Dunbar
dfb16eea66 NNT: Use [e]grep -a when scanning logs, its possibly they will have non-text
characters in them, in which case the grep will just return 'Binary file
matches' and the whole thing falls over.

llvm-svn: 91302
2009-12-14 17:58:33 +00:00
Daniel Dunbar
d3f3848384 NNT: Always create the -sentdata.txt file.
llvm-svn: 91301
2009-12-14 17:58:27 +00:00
Daniel Dunbar
b7c5aa749a Remove unneeded ';' and a class/struct mismatch (noticed by clang).
llvm-svn: 90934
2009-12-09 02:58:09 +00:00
Daniel Dunbar
ea0c099b04 lit: Prevent crash-on-invalid (when run on directory which has no test suite).
llvm-svn: 90871
2009-12-08 19:49:30 +00:00
Mikhail Glushenkov
f4370545f2 Simplify a bit.
llvm-svn: 90785
2009-12-07 19:16:13 +00:00
Mikhail Glushenkov
8fc2b0daed Throw 'const char*' instead of 'std::string'.
llvm-svn: 90784
2009-12-07 19:15:57 +00:00
Mikhail Glushenkov
c05e105f51 Deprecate 'unpack_values'.
Use 'forward_values' + 'comma_separated' instead.

llvm-svn: 90774
2009-12-07 18:25:54 +00:00
Mikhail Glushenkov
9f567e2e67 Implement 'forward_value' and 'forward_transformed_value'.
llvm-svn: 90770
2009-12-07 17:03:05 +00:00
Mikhail Glushenkov
cc733b27be Refactoring, no functionality change.
llvm-svn: 90764
2009-12-07 10:51:55 +00:00
Dan Gohman
247374da74 Minor code simplification.
llvm-svn: 90628
2009-12-05 00:05:43 +00:00
Daniel Dunbar
91a54350f8 OptParser: Emit HelpText field for option groups.
llvm-svn: 90599
2009-12-04 21:41:24 +00:00
Mikhail Glushenkov
00a1410d6d Forward -save-temps to llvm-gcc.
llvm-svn: 90214
2009-12-01 06:51:30 +00:00
Eric Christopher
7c99bfd96e Add a soft link so that in an apple style build we can find libLTO.dylib.
llvm-svn: 90189
2009-12-01 02:26:01 +00:00
Daniel Dunbar
f7eaf3980c Fix FileCheck crash when fuzzy scanning starting at the end of the file.
llvm-svn: 90065
2009-11-29 08:30:24 +00:00
Daniel Dunbar
43465889de Sketch TableGen disassembler emitter, based on patch by Sean Callanan.
llvm-svn: 89833
2009-11-25 02:13:23 +00:00
Dan Gohman
7c41aa00c0 Delete some dead and non-obvious code.
llvm-svn: 89729
2009-11-24 01:48:15 +00:00
Dan Gohman
b5ec39e2dc Remove ISD::DEBUG_LOC and ISD::DBG_LABEL, which are no longer used.
Note that "hasDotLocAndDotFile"-style debug info was already broken;
people wanting this functionality should implement it in the
AsmPrinter/DwarfWriter code.

llvm-svn: 89711
2009-11-23 23:20:51 +00:00
Daniel Dunbar
da651bf31a FileCheck, PR5239: Try to find the intended match on failures, but looking for a
good nearby fuzzy match. Frequently the input is nearly correct, and just
showing the user the a nearby sensible match is enough to diagnose the problem.
 - The "fuzzyness" is pretty simple and arbitrary, but worked on my three test
   cases. If you encounter problems, or places you think FileCheck should have
   guessed but didn't, please add test cases to PR5239.

For example, previously FileCheck would report this:
--
t.cpp:21:55: error: expected string not found in input
// CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]] %a0)
                                                      ^
<stdin>:19:30: note: scanning from here
define void @_Z2f15f1_s1(%1) nounwind {
                             ^
<stdin>:19:30: note: with variable "i64_i64_ty" equal to "%0"
--

and now it also reports this:
--
<stdin>:27:1: note: possible intended match here
define void @_Z2f25f2_s1(%0) nounwind {
^
--

which makes it clear that the CHECK just has an extra ' %a0' in it, without
having to check the input.

llvm-svn: 89631
2009-11-22 22:59:26 +00:00
Daniel Dunbar
acbdd9f541 FileCheck: When a string using variable references fails to match, print
additional information about the current definitions of the variables used in
the string.

llvm-svn: 89628
2009-11-22 22:08:06 +00:00
Daniel Dunbar
1b60708ac9 Allow '_' in FileCheck variable names, it is nice to have at least one
separate character.
 - Chris, OK?

llvm-svn: 89626
2009-11-22 22:07:50 +00:00
Bob Wilson
f8f20e67a3 Fix whitespace.
llvm-svn: 89582
2009-11-22 04:24:42 +00:00
Bob Wilson
5d46596707 Fix pr5470. Tablegen handles template arguments by temporarily setting their
values, resolving references to them, and then removing the definitions.
If a template argument is set to an undefined value, we need to resolve
references to that argument to an explicit undefined value.  The current code
leaves the reference to the template argument as it is, which causes an
assertion failure later when the definition of the template argument is
removed.

llvm-svn: 89581
2009-11-22 03:58:57 +00:00
Bob Wilson
ca49051ec8 Fix some spelling in comments.
llvm-svn: 89566
2009-11-21 22:44:20 +00:00
Bob Wilson
35c5b307d6 Avoid a redundant assertion.
llvm-svn: 89565
2009-11-21 22:39:27 +00:00
Daniel Dunbar
d03317047d TableGen/OptParser: When ordering options, make "sentinel" options appear before
everything else.

llvm-svn: 89368
2009-11-19 18:22:16 +00:00
Douglas Gregor
1c10c07e9c De-bork CMake build
llvm-svn: 89272
2009-11-18 23:20:09 +00:00
Daniel Dunbar
51400811c2 TableGen: Add initial backend for clang Driver's option parsing.
llvm-svn: 89245
2009-11-18 21:29:51 +00:00
Daniel Dunbar
157d7f6596 lit: Fix exclude dirs functionality.
llvm-svn: 89210
2009-11-18 17:42:17 +00:00
Jeffrey Yasskin
0f846dbb3e Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

llvm-svn: 88984
2009-11-16 22:41:33 +00:00
Daniel Dunbar
20a9eda5a2 lit: Factor a new OneCommandPerFileTest out of SyntaxCheckTest.
- Used for running a single fixed command on a directory of files, with the
   option of deriving a temporary input file from the test source.

llvm-svn: 88844
2009-11-15 08:10:29 +00:00
Daniel Dunbar
b077010494 Remove duplicate implementation of excludes functionality, and support excluding
dirnames.

Also, add support for the 'unsupported' config property.

llvm-svn: 88838
2009-11-15 07:22:58 +00:00
Daniel Dunbar
a812eb66b3 lit: Add --repeat=N option, for running each test N times.
- Currently just useful for timing, although it could be extended as one (bad) way to deal with flaky tests.

llvm-svn: 88827
2009-11-15 01:02:09 +00:00
Benjamin Kramer
e9ba686ab8 Implement DISABLE_INLINE for MSVC. This required changing the position in all
forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi!

llvm-svn: 88798
2009-11-14 16:37:18 +00:00
Evan Cheng
b8c04e1226 Added getSubRegIndex(A,B) that returns subreg index of A to B. Use it to replace broken code in VirtRegRewriter.
llvm-svn: 88753
2009-11-14 03:42:17 +00:00
Sandeep Patel
a167903217 Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
llvm-svn: 86797
2009-11-11 03:23:46 +00:00
Daniel Dunbar
fbe1d52c6a lit: Add ExampleTests, for testing lit and demonstrating test suite features.
llvm-svn: 86654
2009-11-10 02:41:17 +00:00
Daniel Dunbar
da307a7868 lit: Fix bug in --show-suites which accidentally override the list of tests.
llvm-svn: 86653
2009-11-10 02:40:21 +00:00
Daniel Dunbar
c5f49f8e59 Add a 'zkill' script, which is more-or-less a fancy (although not necessarily
very robust) version of killall. Because I like making shiny new wheels out of
spare parts.

For use by buildbots when people insist on making cc1 infinite loop. :)

llvm-svn: 86484
2009-11-08 21:51:53 +00:00
Anton Korobeynikov
7b3a35eee8 It is invalid to infer the value type from the result #0 of the node
since the instruction might use the other result of different type.

llvm-svn: 86462
2009-11-08 12:14:54 +00:00
Daniel Dunbar
ec7a3ae5f7 NNT: Remove DejaGNU test from NewNightlyTest reports, this aspect of testing is
handled by buildbots now.

llvm-svn: 86454
2009-11-08 09:34:14 +00:00
Daniel Dunbar
d4dcd76f71 lit: Hardcode whence seek value, os.SEEK_END isn't always available.
llvm-svn: 86449
2009-11-08 09:07:33 +00:00
Daniel Dunbar
761032e17e lit: Warn when a test suite contains no tests.
llvm-svn: 86448
2009-11-08 09:07:26 +00:00
Daniel Dunbar
642e76ff50 lit: Drop require_and_and support.
llvm-svn: 86447
2009-11-08 09:07:13 +00:00
Daniel Dunbar
dedae84dd3 lit: Workaround a Win32/subprocess bug when appending.
llvm-svn: 86437
2009-11-08 03:43:06 +00:00
Daniel Dunbar
a8040023d7 lit: Preserve the PATHEXT variable when running subcommands, this is important on Win32
llvm-svn: 86436
2009-11-08 03:35:19 +00:00
Chris Lattner
cfd2ade9d2 clang++ points out that this is pointless.
llvm-svn: 86239
2009-11-06 06:33:01 +00:00
Daniel Dunbar
7120fca782 NewNighlytTest: Fix timestamp format to actually make sense (it was missing the hour).
llvm-svn: 86229
2009-11-06 04:12:13 +00:00
Daniel Dunbar
f575d48158 NewNightlyTest: Add -noclean option, which doesn't run 'make clean' before building LLVM (for testing).
Also, switch to always running 'make clean' in the test-suite directories.

llvm-svn: 86228
2009-11-06 04:12:07 +00:00
Daniel Dunbar
1680b4426a NewNightlyTest: Unbreak passing the build directory via a positional argument.
llvm-svn: 86227
2009-11-06 04:12:02 +00:00
Daniel Dunbar
1a83579e17 NewNightlyTest: Add -llvmgccdir as alternative to environment variable.
llvm-svn: 86226
2009-11-06 04:11:29 +00:00
Dan Gohman
35331c1dcd Don't print a redundant tab for inline asm, and do use the new printKill.
llvm-svn: 86206
2009-11-06 00:19:43 +00:00
Douglas Gregor
1dc69ca319 Teach lit's SyntaxCheckTest two new tricks:
- skip .svn directories
  - add a set of excluded filenames so we can easily skip tests

llvm-svn: 86185
2009-11-05 22:58:04 +00:00
Daniel Dunbar
47718a1f47 lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
arbitrary command line arguments to the test suite).

llvm-svn: 86137
2009-11-05 16:27:33 +00:00
Evan Cheng
e83f2304f2 Look for llvm-gcc under /Developer/usr/bin first.
llvm-svn: 86023
2009-11-04 08:36:50 +00:00
Bill Wendling
eb0ca3bad7 Use llvm-gcc on newer Darwins.
llvm-svn: 85963
2009-11-03 22:50:10 +00:00
Chris Lattner
d8b3330ada mark some constant global const.
llvm-svn: 85910
2009-11-03 18:30:31 +00:00
Daniel Dunbar
3d3f9b9c83 lit: Update Clang's test style to use XFAIL: and XTARGET: lines that match
LLVM's tests.

llvm-svn: 85882
2009-11-03 07:26:38 +00:00
Ted Kremenek
1489a35df9 Support updating 'llvm_add_target' lists as well.
llvm-svn: 85860
2009-11-03 04:06:58 +00:00
Jim Grosbach
104a2c2b79 Missing bit of universal built + hosted
llvm-svn: 85785
2009-11-02 03:46:35 +00:00
Anton Korobeynikov
9737bfedeb Do not infer the target type for COPY_TO_REGCLASS from dest regclass, this won't work if it can contain several types. Require explicit result type for the node for now. This fixes PR5364.
PS: It seems that blackfin usage of copy_to_regclass is completely bogus!
llvm-svn: 85766
2009-11-02 00:11:39 +00:00
Jim Grosbach
b95117d568 The universal SDKROOT should only be assigned when hosted. Otherwise the
SDKROOT can refer to the target when we're building for the host.

llvm-svn: 85672
2009-10-31 18:00:10 +00:00
Jim Grosbach
16b4042036 Allow cross target build
llvm-svn: 85611
2009-10-30 20:54:59 +00:00
Dan Gohman
6b7d1390d7 Initial target-independent CodeGen support for BlockAddresses.
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Dan Gohman
7f5acc4b57 Move some code from being emitted as boilerplate duplicated in every
*ISelDAGToDAG.cpp to being regular code in SelectionDAGISel.cpp.

llvm-svn: 85530
2009-10-29 22:30:23 +00:00
Dan Gohman
3393a4c997 Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
bunch of associated comments, because it doesn't have anything to do
with DAGs or scheduling. This is another step in decoupling MachineInstr
emitting from scheduling.

llvm-svn: 85517
2009-10-29 18:10:34 +00:00
Johnny Chen
bcb6d87c9d Sorry to break the build.
I was trying to check the WIP file to some local repository, but ended up
checking in the llvm repository.  Oops!

llvm-svn: 85470
2009-10-29 02:04:53 +00:00
Johnny Chen
19209e26ff Minor tweak to forgo the the curly braces for most case blocks, except when
declaring local variables.

llvm-svn: 85467
2009-10-29 01:45:07 +00:00
Dan Gohman
3f9f33080a Add indirectbr and blockaddress to the vim syntax highlighting file.
llvm-svn: 85451
2009-10-29 00:14:44 +00:00
Mikhail Glushenkov
a97449946b 80-col violation.
llvm-svn: 85215
2009-10-27 09:02:49 +00:00
Julien Lerouge
d2861eb219 Remove / use flags that are now set in the Makefile.config.
llvm-svn: 85149
2009-10-26 20:01:35 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Daniel Dunbar
499815e9f9 lit: Add --config-prefix option, to override default config file names.
llvm-svn: 85035
2009-10-25 03:30:55 +00:00
Daniel Dunbar
69b298e1c2 lit: Allow use of /dev/null in redirects on Windows (replace by a temporary
file).

llvm-svn: 85028
2009-10-25 01:37:26 +00:00
Dan Gohman
3c62b33053 Delete a spurious semicolon.
llvm-svn: 85018
2009-10-24 23:24:45 +00:00
Daniel Dunbar
e66bb298d4 lit: Support '>>' redirections when executing scripts internally.
llvm-svn: 85014
2009-10-24 20:32:49 +00:00
Victor Hernandez
e8998896f5 Auto-upgrade free instructions to calls to the builtin free function.
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.

llvm-svn: 84987
2009-10-24 04:23:03 +00:00
Stuart Hastings
89d8dc1bde Trying again to tweak the top-level Makefile to facilitate an Apple-style build.
Now with Clang-compatibility.

llvm-svn: 84872
2009-10-22 17:22:37 +00:00
Mikhail Glushenkov
747a5035b9 Make 'unset_option' work on list options.
llvm-svn: 84827
2009-10-22 04:15:07 +00:00
Chris Lattner
683419400b Set comment string, patch by Johnny Chen!
llvm-svn: 84743
2009-10-21 05:07:57 +00:00
Mikhail Glushenkov
33e504aef1 Implement any_[not_]empty and list versions of switch_on and [not_]empty.
Useful for OptionPreprocessor.

llvm-svn: 84728
2009-10-21 02:13:13 +00:00
Daniel Dunbar
0d8b79cc2e NNT: Implement "config mode", use -config path/to/llvm-config
- This runs the nightly test and does all the submission logic, but using the
   LLVM build specified by the llvm-config.

 - Useful for, among other things, testing NNT itself.

llvm-svn: 84620
2009-10-20 07:30:54 +00:00
Daniel Dunbar
738ce34659 NNT: Remove unused BUILDTYPE argument.
llvm-svn: 84619
2009-10-20 07:30:46 +00:00
Daniel Dunbar
25f8a7e4fd Revert "Tweak top-level Makefile to facilitate Apple-style build.", this is
breaking Clang's Apple-style build.

llvm-svn: 84592
2009-10-20 02:23:13 +00:00
Daniel Dunbar
793dfbc945 NNT: Remove duplicate verbose print.
llvm-svn: 84591
2009-10-20 02:23:05 +00:00
Mikhail Glushenkov
7c31bb2adc More refactoring...
llvm-svn: 84537
2009-10-19 21:24:28 +00:00
Stuart Hastings
0e0c090f5d Tweak top-level Makefile to facilitate Apple-style build.
llvm-svn: 84507
2009-10-19 17:53:54 +00:00
Daniel Dunbar
cb08b1506f NNT: Add -parallel-test option, which runs llvm-test with
ENABLE_PARALLEL_REPORT.

llvm-svn: 84497
2009-10-19 13:20:56 +00:00
Daniel Dunbar
82c9679c3c NNT: Don't hard code -l3.0 argument to make, this is very server dependent. Users who care can use -compileflags for this.
Also, fix make clean call and a few other tweaks.

llvm-svn: 84496
2009-10-19 13:20:50 +00:00
Daniel Dunbar
43a3425c05 NNT: Fix refactoro, I dropped the list of all (llvm-test) tests. I'm sure it was named dejagnu_test_list for a good reason.
llvm-svn: 84495
2009-10-19 13:20:44 +00:00
Daniel Dunbar
596da5540e NNT: Lift conditional logic out of test steps.
llvm-svn: 84494
2009-10-19 13:20:38 +00:00
Daniel Dunbar
48768a77f1 NNT: Now that build & test steps are factored out, coalesce all the logic together.
llvm-svn: 84493
2009-10-19 13:20:31 +00:00
Daniel Dunbar
3e21f0e5f2 NNT: Sink code for running nightly test into subroutine.
llvm-svn: 84492
2009-10-19 13:20:25 +00:00
Daniel Dunbar
5af56e66c2 NNT: Tweaks and simplifications.
- Split out configure log.
 - Kill off GetRegexNum.
 - Fix GetRegex to not return previous match on failure.
 - Remove dead code.

llvm-svn: 84491
2009-10-19 13:20:19 +00:00
Daniel Dunbar
6c0be45d6a NNT: Move build code into subroutine.
llvm-svn: 84490
2009-10-19 13:20:13 +00:00
Daniel Dunbar
909b1e1428 NNT: Move source checkout code into subroutine.
llvm-svn: 84489
2009-10-19 13:20:06 +00:00
Daniel Dunbar
824984e517 NNT: Remove .{o,a} size info, this is better tracked elsewhere.
llvm-svn: 84488
2009-10-19 13:20:00 +00:00
Daniel Dunbar
362e0a87c2 NNT: Remove code to track build warnings, the buildbots cover this.
llvm-svn: 84487
2009-10-19 13:19:53 +00:00
Daniel Dunbar
4ca0e75843 NNT: Remove hard coded BuildDir and WebDir, users should have to specify these.
llvm-svn: 84481
2009-10-19 09:19:19 +00:00
Daniel Dunbar
3e4bde4900 NNT: Remove "CVS Stats", this isn't particularly useful and can be better done by the server or user.
llvm-svn: 84480
2009-10-19 09:19:09 +00:00
Daniel Dunbar
ecd1500c44 NNT: Remove now-unused -cvstag argument and CVSROOT code.
llvm-svn: 84479
2009-10-19 09:18:54 +00:00
Daniel Dunbar
86bfed02ea NNT: Remove -usecvs option, this is very old.
llvm-svn: 84478
2009-10-19 09:18:46 +00:00
Daniel Dunbar
6784123622 NNT: Remove -debug argument, it is unused.
llvm-svn: 84477
2009-10-19 09:18:37 +00:00
Daniel Dunbar
c68cad094e Regroup NewNightlyTest.pl options
llvm-svn: 84476
2009-10-19 09:18:24 +00:00
Daniel Dunbar
bb58da6d55 lit: When running Tcl scripts via shell, try harder to find 'bash', but fall
back to running them internally if that fails. PR5240.

llvm-svn: 84462
2009-10-19 03:54:21 +00:00
Mikhail Glushenkov
71505cfb64 Refactoring, no functionality change.
llvm-svn: 84450
2009-10-18 22:51:30 +00:00
Jeffrey Yasskin
160f3b9191 Support GoogleTest's "typed tests"
(http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Typed_Tests)
in lit.py.  These tests have names like "ValueMapTest/0.Iteration", which broke
when lit.py os.path.join()ed them onto the path and then assumed it could
os.path.split() them back off.  This patch shifts path components from the
testPath to the testName until the testPath exists.

llvm-svn: 84387
2009-10-18 02:05:42 +00:00
Daniel Dunbar
b67b5bb0b1 Move UnescapeString to a static function for its sole client; its inefficient and broken.
llvm-svn: 84358
2009-10-17 20:43:42 +00:00
Daniel Dunbar
ccaa5f1d16 Use raw_ostream::write_escaped instead of EscapeString.
llvm-svn: 84356
2009-10-17 20:43:19 +00:00
Mikhail Glushenkov
e29aaa858c First draft of the OptionPreprocessor.
More to follow...

llvm-svn: 84352
2009-10-17 20:09:29 +00:00
Mikhail Glushenkov
cec8f40e39 This variable is never used.
llvm-svn: 84351
2009-10-17 20:08:47 +00:00
Mikhail Glushenkov
288062930b Disallow multiple instances of PluginPriority.
Several instances of PluginPriority in a single file most probably signifies a
programming error.

llvm-svn: 84350
2009-10-17 20:08:30 +00:00
Jakob Stoklund Olesen
2ba26ceb11 Report errors correctly for unselected target intrinsics.
llvm-svn: 84193
2009-10-15 18:50:03 +00:00
Edward O'Callaghan
00f4a355eb Haiku porting patches, Credit to Paul Davey.
llvm-svn: 83823
2009-10-12 04:57:20 +00:00
Mikhail Glushenkov
ec9baa8e47 Omit the 'out_file_index != -1' check when possible.
llvm-svn: 83619
2009-10-09 05:45:21 +00:00
Mikhail Glushenkov
c802d57e52 Input files should go before all other options.
Important, for example, when calling 'gcc a.o b.o c.o -lD -lE -lF'.

llvm-svn: 83524
2009-10-08 04:40:08 +00:00
Evan Cheng
8ea3f4a592 Add instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
set, these flags indicate the instructions source / def operands have special
register allocation requirement that are not captured in their register classes.
Post-allocation passes (e.g. post-alloc scheduler) should not change their
allocations. e.g. ARM::LDRD require the two definitions to be allocated
even / odd register pair.

llvm-svn: 83196
2009-10-01 08:21:18 +00:00
Stuart Hastings
3843d7f06d B&I's buildit forces a PATH that omits /Developer. Temporarily add
/Developer/usr/bin to the PATH when looking for llvm-gcc.

llvm-svn: 83028
2009-09-28 23:42:38 +00:00
Stuart Hastings
5de4dcc406 For B&I-style builds, tweak build_llvm script to prefer LLVM-G++ if
available.  Override by setting CC and CXX in the environment.

llvm-svn: 83024
2009-09-28 22:17:53 +00:00
Jakob Stoklund Olesen
31fcbdefbb Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
unused DECLARE instruction.

KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
in the places where IMPLICIT_DEF is just used to alter liveness of physical
registers.

llvm-svn: 83006
2009-09-28 20:32:26 +00:00
Daniel Dunbar
92fcc49c24 Don't traverse into .svn directories.
llvm-svn: 82978
2009-09-28 07:32:45 +00:00
Mikhail Glushenkov
b676fc15a0 Add a way to query the number of input files.
llvm-svn: 82957
2009-09-28 01:16:42 +00:00
Mikhail Glushenkov
ef0b5e2f1a A bit prettier formatting.
llvm-svn: 82955
2009-09-28 01:15:44 +00:00
Chris Lattner
80d69b5973 implement and document support for filecheck variables. This
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.

Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.

llvm-svn: 82891
2009-09-27 07:56:52 +00:00
Chris Lattner
b47463f436 remove support for "NoSub" from regex. It seems like a minor optimization
and makes the API more annoying.  Add a Regex::getNumMatches() method.

llvm-svn: 82877
2009-09-26 21:27:04 +00:00
Anton Korobeynikov
4e921137da Provide proper masks for neon perfect shuffle table.
I definitely need to read documentation better :(

llvm-svn: 82813
2009-09-25 22:52:29 +00:00
Dan Gohman
0ac693a89e Improve MachineMemOperand handling.
- Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
   This eliminates MachineInstr's std::list member and allows the data to be
   created by isel and live for the remainder of codegen, avoiding a lot of
   copying and unnecessary translation. This also shrinks MemSDNode.
 - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
   fields for MachineMemOperands.
 - Change MemSDNode to have a MachineMemOperand member instead of its own
   fields with the same information. This introduces some redundancy, but
   it's more consistent with what MachineInstr will eventually want.
 - Ignore alignment when searching for redundant loads for CSE, but remember
   the greatest alignment.

Target-specific code which previously used MemOperandSDNodes with generic
SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
so that the SelectionDAG framework knows that MachineMemOperand information
is available.

llvm-svn: 82794
2009-09-25 20:36:54 +00:00
Dan Gohman
0c4e55a2f8 Rename getTargetNode to getMachineNode, for consistency with the
naming scheme used in SelectionDAG, where there are multiple kinds
of "target" nodes, but "machine" nodes are nodes which represent
a MachineInstr.

llvm-svn: 82790
2009-09-25 18:54:59 +00:00
Chris Lattner
7143d73e96 reject attempts to use ()'s in patterns, these are reserved for filecheck.
llvm-svn: 82780
2009-09-25 17:29:36 +00:00
Chris Lattner
2b1f7c6a75 reimplement the regex matching strategy by building a single
regex and matching it instead of trying to match chunks at a time.
Matching chunks at a time broke with check lines like 
  CHECK: foo {{.*}}bar
because the .* would eat the entire rest of the line and bar would
never match.

Now we just escape the fixed strings for the user, so that something
like:
  CHECK: a() {{.*}}???
is matched as:
  CHECK: {{a\(\) .*\?\?\?}}
transparently "under the covers".

llvm-svn: 82779
2009-09-25 17:23:43 +00:00
Chris Lattner
fed266aae9 special case Patterns that are a single fixed string. This is a microscopic
perf win and is needed for future changes.

llvm-svn: 82777
2009-09-25 17:09:12 +00:00
Chris Lattner
2bf0d0ca42 filecheck should not match a \n with a .
llvm-svn: 82758
2009-09-25 06:47:09 +00:00
Chris Lattner
a6bcda7a8a turn a std::pair into a real class.
llvm-svn: 82754
2009-09-25 06:32:47 +00:00
Chris Lattner
af2ce37cb3 add and document regex support for FileCheck. You can now do stuff like:
; CHECK: movl {{%e[a-z][xi]}}, %eax

or whatever.

llvm-svn: 82717
2009-09-24 21:47:32 +00:00
Chris Lattner
97cf81c3c6 Use CanonicalizeInputFile to canonicalize the entire buffer containing the
CHECK strings, instead of canonicalizing the patterns directly.  This allows
Pattern to just contain a StringRef instead of std::string.

llvm-svn: 82713
2009-09-24 20:45:07 +00:00
Chris Lattner
5f3b698a06 change 'not' matching to use Pattern, move pattern parsing logic into
the Pattern class.

llvm-svn: 82712
2009-09-24 20:39:13 +00:00
Chris Lattner
756adfb5ca refactor out the match string into its own Pattern class.
llvm-svn: 82711
2009-09-24 20:25:55 +00:00
David Goodwin
3ac3dcacc7 Make the end-of-itinerary mark explicit. Some cleanup.
llvm-svn: 82709
2009-09-24 20:22:50 +00:00
Daniel Dunbar
15437d0bd2 Add count/not tools as executables.
- Apparently, I'm willing to do incredibly stupid things in the name of portability.

llvm-svn: 82685
2009-09-24 06:23:57 +00:00
Daniel Dunbar
b8a623820a lit: When executing shell scripts internally, don't allow piped stderr on any
commands except the last one, instead redirect the stderr to a temporary
file. This sidesteps a potential deadlocking issue.

llvm-svn: 82538
2009-09-22 09:50:38 +00:00
Daniel Dunbar
06695b3ea1 Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing.
Also, tweak the 'lit' test runner to set this variable unconditionally.

llvm-svn: 82537
2009-09-22 09:50:28 +00:00
Daniel Dunbar
3ea67f7fdc Actually use the arguments with the resolved executable path.
llvm-svn: 82527
2009-09-22 06:09:13 +00:00
Daniel Dunbar
797bf7ca92 lit: Don't use close_fds=True on Windows.
llvm-svn: 82521
2009-09-22 04:44:37 +00:00
Daniel Dunbar
79874e8a8e lit: When executing commands internally, perform PATH resolution ourselves.
llvm-svn: 82520
2009-09-22 04:44:26 +00:00
Mikhail Glushenkov
487c2ba4ee Use raw_ostream::indent instead of passing strings.
llvm-svn: 82456
2009-09-21 15:53:44 +00:00
Chris Lattner
82a963788d fix a FileCheck bug where:
; CHECK: foo
; CHECK-NOT: foo
; CHECK: bar

would always fail.

llvm-svn: 82424
2009-09-21 02:30:42 +00:00
Chris Lattner
d5f420ca4d rewrite CountNumNewlinesBetween to be in terms of StringRef.
llvm-svn: 82410
2009-09-20 22:42:44 +00:00
Chris Lattner
63735b5e10 implement and document support for CHECK-NOT
llvm-svn: 82408
2009-09-20 22:35:26 +00:00
Chris Lattner
4552cc1387 rewrite FileCheck in terms of StringRef instead of manual pointer pairs.
llvm-svn: 82407
2009-09-20 22:11:44 +00:00
Daniel Dunbar
b8eed72232 Follow googletest logic for suppressing warnings in unittests/UnitTestMain.
llvm-svn: 82373
2009-09-20 06:17:12 +00:00
Chris Lattner
194391ddb7 convert some stuff to StringRef to avoid temporary std::strings.
llvm-svn: 82244
2009-09-18 18:31:37 +00:00
Chris Lattner
d600c9342b add a comment.
llvm-svn: 82236
2009-09-18 18:10:19 +00:00
Daniel Dunbar
dadd71259e lit: Add a custom test format for use in clang.
llvm-svn: 81987
2009-09-16 01:34:52 +00:00
Daniel Dunbar
3d79f78d69 lit: When finding nested test suites, check first in the execpath in case there
is a site configuration.

llvm-svn: 81902
2009-09-15 20:09:17 +00:00
Daniel Dunbar
35a1ac3e03 Add a valgrind suppressions file for x86_64/linux/4.3.3.
llvm-svn: 81766
2009-09-14 16:10:32 +00:00
Daniel Dunbar
2808cdfdbe lit: Give test formats control over test discovery.
llvm-svn: 81751
2009-09-14 02:38:46 +00:00
Chris Lattner
c87179b542 slightly increase prettiness.
llvm-svn: 81742
2009-09-14 01:27:50 +00:00
Chris Lattner
c4a64a08ec emit the register table as a massive string to avoid relocations.
llvm-svn: 81741
2009-09-14 01:26:18 +00:00
Chris Lattner
d823d97b3a move StringToOffsetTable out to its own header.
llvm-svn: 81740
2009-09-14 01:19:16 +00:00
Chris Lattner
68ed8d21f8 factor string table generation out to its own class. This changes
the encoding of the AsmStrs table saving a byte or two.

llvm-svn: 81739
2009-09-14 01:16:36 +00:00
Chris Lattner
b88e0d1715 eliminate the TargetRegisterDesc::AsmName field, the asmprinters now have this table.
llvm-svn: 81728
2009-09-13 22:45:04 +00:00
Daniel Dunbar
b57fad2300 Move unittest driver to utils/unittest/UnitTestMain.
- This eliminates a race between building the unittests and linking the
   UnitTestMain library.

llvm-svn: 81719
2009-09-13 21:31:21 +00:00
Chris Lattner
20b7392123 the tblgen produced 'getRegisterName' method does not access
the object, make it static instead of const.

llvm-svn: 81711
2009-09-13 20:19:22 +00:00
Chris Lattner
0cde5283e3 make tblgen produce a function that returns the name for a physreg.
Nothing is using this info yet.

llvm-svn: 81707
2009-09-13 20:08:00 +00:00
Daniel Dunbar
e19b42b927 tests: Add a %abs_tmp substitution which is guaranteed to be a full path.
llvm-svn: 81662
2009-09-13 01:39:50 +00:00
Owen Anderson
22963ef40a Eliminate some unnecessary implicit constructors in generated DAG ISel code.
Partial fix for PR4946.

llvm-svn: 81518
2009-09-11 09:01:57 +00:00
Chris Lattner
b5243d77cb PHI nodes can never reach the asmprinter, assert and die instead of printing
out an illegal "PHINODE" instruction.

llvm-svn: 81495
2009-09-11 00:41:15 +00:00
Mikhail Glushenkov
65831e2bf2 Distinguish between 'empty' and empty DAG marker.
llvm-svn: 81448
2009-09-10 16:22:02 +00:00
Mikhail Glushenkov
49c2b6f4fb Add a logical 'not' operator to llvmc's TableGen dialect.
llvm-svn: 81447
2009-09-10 16:21:38 +00:00
Chris Lattner
b9aca1a178 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Chris Lattner
2a098581a8 Fix a subtle bug in "return;" generation which caused us to miss
a return in one case.  Instead of sprinking return handling code
throughout the asmprinter generator, just treat it like any other
normal statement.

llvm-svn: 81395
2009-09-09 23:09:29 +00:00
Chris Lattner
52651f7623 hoist the call to processDebugLoc out of the generated
asm printer into the "printInstruction" routine.  This
fixes a problem where the experimental asmprinter would
drop debug labels in some cases, and fixes issues on ppc/xcore
where pseudo instructions like "mr" didn't get debug locs properly.

It is annoying that this moves the call from one place into each
target, but a future set of more invasive refactorings will fix
that problem.

llvm-svn: 81377
2009-09-09 20:34:59 +00:00
Daniel Dunbar
a2c2d27cb7 Count test correctly with -q.
llvm-svn: 81313
2009-09-09 02:41:42 +00:00
Daniel Dunbar
338ea74b7e Fix another refactoro.
llvm-svn: 81312
2009-09-09 02:41:32 +00:00
Daniel Dunbar
ca1a6d222f lit needs bash for tcl-as-sh execution, we use set -o pipefail.
llvm-svn: 81197
2009-09-08 06:08:07 +00:00
Daniel Dunbar
57ad7988fd Fix typo that worked on python 2.6.
Also, fix unit tests.

llvm-svn: 81194
2009-09-08 05:46:28 +00:00
Daniel Dunbar
e82e000211 Fix a refactoro.
llvm-svn: 81192
2009-09-08 05:37:51 +00:00
Daniel Dunbar
640436d7af Add 'lit' testing tool.
- make install && man $(llvm-config --prefix)/share/man/man1/lit.1 for more
   information.

llvm-svn: 81190
2009-09-08 05:31:18 +00:00
Duncan Sands
10c1356bad Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.

llvm-svn: 81106
2009-09-06 08:33:48 +00:00
Jeffrey Yasskin
25713a50a3 Teach googletest to use raw_ostream instead of just std::ostream.
This can break when there are implicit conversions from types raw_ostream
understands but std::ostream doesn't, but it increases the number of cases that
Just Work.

llvm-svn: 81093
2009-09-05 18:16:17 +00:00
Bob Wilson
2cc9f2ac91 PR4795: Remove EEVT::isFP, isInt and isVec types used by TableGen's type
inferencing.  As far as I can tell, these are equivalent to the existing
MVT::fAny, iAny and vAny types, and having both of them makes it harder
to reason about and modify the type inferencing code.

The specific problem in PR4795 occurs when updating a vAny type to be fAny
or iAny, or vice versa.  Both iAny and fAny include vector types -- they
intersect with the set of types represented by vAny.  When merging them,
choose fAny/iAny to represent the intersection.  This is not perfect, since
fAny/iAny also include scalar types, but it is good enough for TableGen's
type inferencing.

llvm-svn: 80423
2009-08-29 05:53:25 +00:00
Bob Wilson
597a55fde3 Disable optional bindings for Apple-style builds.
llvm-svn: 80319
2009-08-28 00:21:13 +00:00