Joey Gouly
fccb3bcae3
Add an instruction deprecation feature to TableGen.
...
The 'Deprecated' class allows you to specify a SubtargetFeature that the
instruction is deprecated on.
The 'ComplexDeprecationPredicate' class allows you to define a custom
predicate that is called to check for deprecation.
For example:
ComplexDeprecationPredicate<"MCR">
would mean you would have to define the following function:
bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
std::string &Info)
Which returns 'false' for not deprecated, and 'true' for deprecated
and store the warning message in 'Info'.
The MCTargetAsmParser constructor was chaned to take an extra argument of
the MCInstrInfo class, so out-of-tree targets will need to be changed.
llvm-svn: 190598
2013-09-12 10:28:05 +00:00
Daniel Dunbar
e5789151e6
[lit] Add support for attach arbitrary metrics to test results.
...
- This is a work-in-progress and all details are subject to change, but I am
trying to build up support for allowing lit to be used as a driver for
performance tests (or other tests which might want to record information
beyond simple PASS/FAIL).
llvm-svn: 190535
2013-09-11 17:45:11 +00:00
Benjamin Kramer
0f63cd14e9
llvm-tblgen: Mangle operand replacements into the strings in printAliasInstr.
...
Cuts down the bloat in the AArch64 asm writer a bit.
llvm-svn: 190527
2013-09-11 15:42:16 +00:00
Benjamin Kramer
4182059208
llvm-tblgen: Stabilize subreg index tables.
...
Otherwise SequenceToOffsetTable will sort by pointer and becomes non-deterministic.
llvm-svn: 190514
2013-09-11 11:22:26 +00:00
Adrian Prantl
271495ae9a
debuginfo-tests: Add support for an lldb wrapper script
...
to be used on darwin in lieu of gdb.
llvm-svn: 190186
2013-09-06 18:12:01 +00:00
Daniel Dunbar
b6749f0829
[lit] Allow config files to pass arbitrary values to child configs.
...
- This aligns with how existing test suites end up wanting to use the local
config files, conceptually it makes sense to consider them to be inherited.
llvm-svn: 189885
2013-09-03 23:32:55 +00:00
Vincent Lejeune
b888e36466
TableGen: Enumerate Schedule Model too.
...
llvm-svn: 189839
2013-09-03 19:43:28 +00:00
Jim Grosbach
644f2f8be2
Tidy up. Comment grammar.
...
llvm-svn: 189618
2013-08-29 22:41:43 +00:00
Jim Grosbach
ebb869a49c
Tidy up. Trailing whitespace.
...
llvm-svn: 189617
2013-08-29 22:41:39 +00:00
Craig Topper
7e8c45d44b
Move StringToOffsetTable into the TableGen include directory so I can use it in clang.
...
llvm-svn: 189567
2013-08-29 05:09:55 +00:00
Daniel Dunbar
78453e21a4
[lit] [tests] Add missing test input file.
...
llvm-svn: 189561
2013-08-29 03:02:34 +00:00
Daniel Dunbar
ced664313e
[lit] Fix internal shell's argv[0] handling.
...
- At least on OS X, it is important for correct behavior of /bin/[ that argv[0]
is passed as written, and not as the full executable path.
llvm-svn: 189559
2013-08-29 02:52:10 +00:00
Daniel Dunbar
ee2ab42c2f
[lit] Add support for multiprocessing, under --use-processes for now.
...
llvm-svn: 189556
2013-08-29 00:54:23 +00:00
Daniel Dunbar
9d49ec468c
[lit] Implement --max-time support by using provider cancel method.
...
llvm-svn: 189555
2013-08-29 00:54:19 +00:00
Daniel Dunbar
c6527074c6
[lit] Refactor test execution logic into lit.run.Run.
...
llvm-svn: 189554
2013-08-29 00:54:15 +00:00
Daniel Dunbar
f7057cecb8
[lit] Put display lock inside the ThreadResultsConsumer.
...
llvm-svn: 189553
2013-08-29 00:54:09 +00:00
Daniel Dunbar
ba3e89b351
[lit] Factor out a results consumer interface for test execution.
...
- Also, change TestProvider interface to operate on test indices.
llvm-svn: 189552
2013-08-29 00:54:02 +00:00
Daniel Dunbar
3cd76c9056
[lit] Move top-level execute code into Run object.
...
llvm-svn: 189551
2013-08-29 00:48:55 +00:00
Daniel Dunbar
b143d8f8bc
[lit] Factor out Run class to capture configuration + discovered tests.
...
llvm-svn: 189550
2013-08-29 00:48:45 +00:00
Daniel Dunbar
9845b0fba6
[lit] Change lit.Test.ResultCode to be unique across pickling.
...
llvm-svn: 189549
2013-08-29 00:48:39 +00:00
Daniel Dunbar
a9853d7988
[lit] Add a TODO.
...
llvm-svn: 189546
2013-08-29 00:41:15 +00:00
Daniel Dunbar
574eaef7d0
[lit] Update shtest format to return lit.Test.Result objects.
...
llvm-svn: 189545
2013-08-29 00:41:09 +00:00
Daniel Dunbar
24e675afd3
[lit] Update LitTestCase to support lit.Test.Result.
...
llvm-svn: 189544
2013-08-29 00:40:59 +00:00
Rui Ueyama
3ab487af0b
Option parsing: support case-insensitive option matching.
...
Re-submitting r189416 with fix for Windows build on where strcasecmp is not defined.
llvm-svn: 189501
2013-08-28 20:04:31 +00:00
Craig Topper
90be9b3ab8
Add missing include
...
llvm-svn: 189448
2013-08-28 07:03:02 +00:00
Rui Ueyama
16ae963b6a
Revert "Option parsing: support case-insensitive option matching." as it broke Windows buildbot.
...
This reverts r189416.
llvm-svn: 189424
2013-08-28 00:02:06 +00:00
Rui Ueyama
a9f9cbaaf6
Option parsing: support case-insensitive option matching.
...
Link.exe's command line options are case-insensitive. This patch
adds a new attribute to OptTable to let the option parser to compare
options, ignoring case.
Command lines are generally case-insensitive on Windows. CL.exe is an
exception. So this new attribute should be useful for other commands
running on Windows.
Differential Revision: http://llvm-reviews.chandlerc.com/D1485
llvm-svn: 189416
2013-08-27 23:47:01 +00:00
Andrea Di Biagio
b486212f5a
Add function attribute 'optnone'.
...
This function attribute indicates that the function is not optimized
by any optimization or code generator passes with the
exception of interprocedural optimization passes.
llvm-svn: 189101
2013-08-23 11:53:55 +00:00
Jakob Stoklund Olesen
af78d7a3df
Add an OtherPreserved field to the CalleeSaved TableGen class.
...
This field specifies registers that are preserved across function calls,
but that should not be included in the generates SaveList array.
This can be used ot generate regmasks for architectures that save
registers through other means, like SPARC's register windows.
llvm-svn: 189084
2013-08-23 02:25:47 +00:00
Elena Demikhovsky
5488806c84
AVX-512: Added masked SHIFT commands, more encoding tests
...
llvm-svn: 189005
2013-08-22 12:18:28 +00:00
Tim Northover
eb7a86ed88
ARM: use TableGen patterns to select CMOV operations.
...
Back in the mists of time (2008), it seems TableGen couldn't handle the
patterns necessary to match ARM's CMOV node that we convert select operations
to, so we wrote a lot of fairly hairy C++ to do it for us.
TableGen can deal with it now: there were a few minor differences to CodeGen
(see tests), but nothing obviously worse that I could see, so we should
probably address anything that *does* come up in a localised manner.
llvm-svn: 188995
2013-08-22 09:57:11 +00:00
Hans Wennborg
6ea73f0a52
Remove llvm-lit from the cmake install target.
...
Since it's an llvm-internal tool, we shouldn't install it.
llvm-svn: 188976
2013-08-22 01:34:09 +00:00
Daniel Dunbar
c44a910206
[lit] Fix a couple lingering Py3 compat issues in ProgressBar.
...
llvm-svn: 188951
2013-08-21 22:26:47 +00:00
Daniel Dunbar
e926420419
[lit] Lift XFAIL handling to core infrastructure.
...
llvm-svn: 188949
2013-08-21 22:26:42 +00:00
Daniel Dunbar
e8d0977bdf
[lit] Allow formats to return lit.Test.Result instances directly.
...
llvm-svn: 188948
2013-08-21 22:26:40 +00:00
Daniel Dunbar
0e1aaf95f0
[lit] Factor out a separate Test.Result() object.
...
llvm-svn: 188947
2013-08-21 22:26:37 +00:00
Daniel Dunbar
926a1dd8eb
[lit] Simplify --time-tests code.
...
llvm-svn: 188946
2013-08-21 22:26:34 +00:00
Daniel Dunbar
91157ca2ce
[lit] Extract TestFormat base class, for future use.
...
llvm-svn: 188945
2013-08-21 22:26:26 +00:00
Daniel Dunbar
9148692110
[lit] Rewrite TODO list, and elaborate on some things.
...
- If anyone is interested in lit's feature set, I'd appreciate any comments on
the elaborated items.
llvm-svn: 188590
2013-08-16 23:30:23 +00:00
Stephen Lin
ca7abb4a8b
FileCheck: Fix stray quote in CHECK-LABEL error message.
...
llvm-svn: 188564
2013-08-16 17:29:01 +00:00
Aaron Ballman
ad58ec7c10
Fixing a warning about control reaching the end of a non-void function.
...
llvm-svn: 188524
2013-08-16 01:43:31 +00:00
Daniel Dunbar
b13a7b8362
[lit] Remove some done TODOs.
...
llvm-svn: 188502
2013-08-15 22:52:20 +00:00
Daniel Dunbar
f73f1c4499
[llvm-build] Make Py3 compatible.
...
llvm-svn: 188424
2013-08-14 23:15:39 +00:00
Daniel Dunbar
c42a1a12f5
[lit] Add test coverage of gtest format.
...
llvm-svn: 188417
2013-08-14 22:21:11 +00:00
Daniel Dunbar
038eff59f7
[lit] Ensure test output is converted to strings where possible.
...
- This cleans up the text output of failing tests when run under PY3.
llvm-svn: 188416
2013-08-14 22:21:01 +00:00
Daniel Dunbar
f362cc8910
[lit] Support parsing scripts with inconsistent or invalid encodings.
...
- For whatever reason, we have a lot of test files with bogus unicode
characters. This patch allows those scripts to still be parsed on Python3 by
changing the parsing logic to work on binary files, and only require the
actual script commands to be convertible to ascii.
- This patch has been tweaked to now ensure that the command strings are not of
unicode type on Python 2.6-7.
llvm-svn: 188398
2013-08-14 18:22:41 +00:00
Daniel Dunbar
1a2916808e
Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings.", this doesn't work yet for bots using the internal shell.
...
llvm-svn: 188379
2013-08-14 15:55:25 +00:00
Daniel Dunbar
2057e032f2
[lit] Support parsing scripts with inconsistent or invalid encodings.
...
- For whatever reason, we have a lot of test files with bogus unicode
characters. This patch allows those scripts to still be parsed on Python3 by
changing the parsing logic to work on binary files, and only require the
actual script commands to be convertible to ascii.
llvm-svn: 188376
2013-08-14 15:24:58 +00:00
Daniel Dunbar
72dd0252d9
[lit] Fix a relative import issue I missed earlier.
...
llvm-svn: 188360
2013-08-14 05:07:16 +00:00
Daniel Dunbar
2a30db9a35
[lit] Avoid StringIO.
...
- We barely used it, and it is very hard to use in a 2.5-3 compatible
way because of changing expectations for its input types.
llvm-svn: 188359
2013-08-14 05:07:13 +00:00
Daniel Dunbar
da8043318c
[lit] Fix tests to execute lit with same python as invoked with.
...
llvm-svn: 188358
2013-08-14 05:07:09 +00:00
Daniel Dunbar
61398985bb
[lit] Factor ShTest format script command parsing from other processing.
...
llvm-svn: 188357
2013-08-14 05:07:04 +00:00
Daniel Dunbar
bdf149e143
[lit] Move executeCommand() into lit.util.
...
llvm-svn: 188356
2013-08-14 05:07:01 +00:00
Daniel Dunbar
1377ab9362
[lit] Move formats into their own subpackage.
...
llvm-svn: 188355
2013-08-14 05:06:55 +00:00
NAKAMURA Takumi
e2881219b4
Lit: Introduce "%/[STpst] into parseIntegratedTestScript(), to normalize substitutions.
...
llvm-svn: 188348
2013-08-14 02:26:31 +00:00
Jack Carter
15a173ab4f
[Mips][msa] Value types for MSA support.
...
Added v8f16 to ValueTypes.h, ValueTypes.cpp, ValueTypes.td,
and CodeGenTarget.cpp
Patch by Daniel Sanders
llvm-svn: 188326
2013-08-13 22:34:26 +00:00
Daniel Dunbar
a1f2b781ab
[lit] Support use of setup.py from other directories.
...
llvm-svn: 188309
2013-08-13 19:08:48 +00:00
Rui Ueyama
9666dd3633
[FileCheck] Fix a bug that cause FileCheck to misidentify check-prefix
...
FileCheck should check to make sure the prefix was found, and not a word
containing it (e.g -check-prefix=BASEREL shouldn't match NOBASEREL).
Patch by Ron Ofir.
llvm-svn: 188221
2013-08-12 23:05:59 +00:00
Richard Sandiford
ceb50ae8d3
Revert r188164: Stablize MCK_Reg ordering in AsmMatcherEmitter
...
Apparently caused a failure on Darwin
llvm-svn: 188166
2013-08-12 10:57:51 +00:00
Richard Sandiford
5b47e9993e
Stablize MCK_Reg ordering in AsmMatcherEmitter
...
clang bootstraps intermittently failed for me due a difference in
the MCK_Reg ordering in ARMGenAsmMatcher.inc. E.g. in my latest
run the stage 1 and stage 3 versions were the same but the stage 2
one was different (though still functionally correct). This meant
that the .o comparison failed.
MCK_Regs were assigned by iterating over a std::set< std::set<Record*> >,
and since std::set is sorted lexicographically, the order depended on the
order of the pointer values. This patch replaces the pointer ordering
with LessRecordByID.
llvm-svn: 188164
2013-08-12 10:39:45 +00:00
Daniel Dunbar
5a4d2b0583
[lit] Remove old ExamplesTests directory.
...
- The actual tests have better coverage than those, and they weren't useful
anymore.
llvm-svn: 188110
2013-08-09 21:39:36 +00:00
Daniel Dunbar
7a71edafdb
[lit] Move ManyTests examples to lit/examples/many-tests.
...
llvm-svn: 188109
2013-08-09 21:39:28 +00:00
Daniel Dunbar
a2f42119d5
[lit] Drop deprecated aliases for lit and old module names.
...
llvm-svn: 188108
2013-08-09 21:39:24 +00:00
Daniel Dunbar
118970db3a
[lit] Update lit's own tests to use lit_config and lit package, as appropriate.
...
llvm-svn: 188107
2013-08-09 21:39:17 +00:00
Daniel Dunbar
57185707f2
[lit] Fix typo.
...
- Noticed by edward-san (IRC).
llvm-svn: 188096
2013-08-09 19:39:42 +00:00
Daniel Dunbar
8884fe65a5
[lit] Rename lit.{TestFormats,Util} to their aliased names {formats,util}.
...
- With compatibility hack in lit.__init__, so this hopefully shouldn't break
anything.
llvm-svn: 188040
2013-08-09 00:37:15 +00:00
Daniel Dunbar
3be0993727
[lit] Inject the lit specific config object as 'lit_config' when loading config files.
...
- Injecting it as 'lit' is gross, since that name should be used to refer to
the actual package. For now both are available so it is possibly to cleanup
test config files incrementally.
llvm-svn: 188039
2013-08-09 00:37:05 +00:00
Daniel Dunbar
038271ce61
[lit] Split TestingConfig.frompath() into separate ctor and load methods.
...
llvm-svn: 188038
2013-08-09 00:36:58 +00:00
Daniel Dunbar
afc3dc05ad
[lit] Eliminate mustExist parameter from TestingConfig.frompath().
...
llvm-svn: 188034
2013-08-09 00:09:02 +00:00
Daniel Dunbar
a5a0a4f18a
[lit] Only create config copies when a local config file is present.
...
llvm-svn: 188033
2013-08-09 00:08:56 +00:00
Daniel Dunbar
b3b908fad3
[lit] Eliminate parent argument from TestingConfig.frompath(), which is effectively unused.
...
llvm-svn: 188032
2013-08-09 00:08:46 +00:00
Daniel Dunbar
f46311361c
[lit] Change --show-{tests,suites} to exit after printing.
...
- This is a more sensible behavior than printing and also running tests.
llvm-svn: 188009
2013-08-08 20:59:25 +00:00
Daniel Dunbar
afca64a31c
[lit] Remove --repeat option, which wasn't that useful.
...
llvm-svn: 188008
2013-08-08 20:59:20 +00:00
Daniel Dunbar
f5fcc2c5f4
[lit] Eliminate some nested imports.
...
llvm-svn: 188007
2013-08-08 20:59:16 +00:00
Daniel Dunbar
a172055173
[lit] Remove on_clone member, which is no longer used.
...
llvm-svn: 188006
2013-08-08 20:59:13 +00:00
Daniel Dunbar
c00fca31ba
[lit] Remove unnecessary list copy.
...
llvm-svn: 187934
2013-08-07 23:10:20 +00:00
Daniel Dunbar
91b5aa5eb1
[lit] Always list individual UNRESOLVED tests.
...
llvm-svn: 187933
2013-08-07 23:10:05 +00:00
Daniel Dunbar
a81b869a40
[lit] Explicitly convert dict items() result to a list.
...
llvm-svn: 187932
2013-08-07 23:10:01 +00:00
Daniel Dunbar
a417c84423
[lit] Make string encoding issues explicit.
...
llvm-svn: 187931
2013-08-07 23:09:55 +00:00
Daniel Dunbar
c0857e132c
[lit] Report the traceback when config import fails.
...
llvm-svn: 187920
2013-08-07 21:43:34 +00:00
Daniel Dunbar
ffb7ba128b
[lit] Avoid comparisons with None.
...
llvm-svn: 187919
2013-08-07 21:43:23 +00:00
Daniel Dunbar
3c1d742e14
[lit] Use list comprehensions instead of map().
...
llvm-svn: 187918
2013-08-07 21:43:17 +00:00
Daniel Dunbar
fa196394e8
[lit] Avoid deprecated dict.has_key() method.
...
llvm-svn: 187917
2013-08-07 21:43:12 +00:00
NAKAMURA Takumi
38dd5e35e8
lit/LitConfig.py: Fixup for msys bash.
...
llvm-svn: 187896
2013-08-07 17:21:23 +00:00
NAKAMURA Takumi
78313cfb19
Lit: Fixup in r187886.
...
llvm-svn: 187887
2013-08-07 12:53:53 +00:00
NAKAMURA Takumi
babe518ee1
Lit: Resurrect --no-execute dropped in r187852.
...
For now, builders in bb.pgr.jp are using it.
llvm-svn: 187886
2013-08-07 12:44:29 +00:00
Daniel Dunbar
5a2d7118d8
[lit] Use py2&3 compatible exec() syntax.
...
llvm-svn: 187862
2013-08-07 03:25:28 +00:00
Daniel Dunbar
e3dc2d9d07
[lit] Use newer StringIO class.
...
llvm-svn: 187861
2013-08-07 03:24:20 +00:00
Daniel Dunbar
1e8b8bb858
[lit] Use modern absolute/relative import style.
...
llvm-svn: 187860
2013-08-07 03:23:12 +00:00
Daniel Dunbar
cf8cfa0363
[lit] Avoid __cmp__ and cmp().
...
llvm-svn: 187859
2013-08-07 03:22:02 +00:00
Daniel Dunbar
fc509b862e
[lit] Avoid use of iterator .next() method.
...
llvm-svn: 187858
2013-08-07 03:20:54 +00:00
Daniel Dunbar
7564b3cf78
[lit] Use .write() methods instead of print statement.
...
llvm-svn: 187857
2013-08-07 03:19:45 +00:00
Daniel Dunbar
37517bad59
[lit] Use dual-compatible print() syntax where possible.
...
llvm-svn: 187856
2013-08-07 03:18:36 +00:00
Daniel Dunbar
80d4f31c0c
[lit] Remove use of deprecated parameter tuple unpacking.
...
llvm-svn: 187855
2013-08-07 03:17:27 +00:00
Daniel Dunbar
34f64801d5
[lit] Remove uses of deprecated except syntax.
...
- Since we only have a few of these, use the cumbersome method of getting the
exception object from 'sys' to retain the current pre-2.6 compatibility.
llvm-svn: 187854
2013-08-07 03:16:19 +00:00
Daniel Dunbar
44d0ad7767
[lit] Use more modern syntax for constructing exceptions.
...
llvm-svn: 187853
2013-08-07 03:15:10 +00:00
Daniel Dunbar
156c1522d4
[lit] Drop --no-execute, which isn't generally useful.
...
llvm-svn: 187852
2013-08-07 03:14:00 +00:00
Daniel Dunbar
203a7afc3e
[lit] tests: Change discovery test to use --show-tests.
...
llvm-svn: 187851
2013-08-07 03:12:51 +00:00
Daniel Dunbar
25a6834c07
[lit] Add a --show-tests option.
...
llvm-svn: 187850
2013-08-07 03:11:42 +00:00
Daniel Dunbar
72b3c08693
[lit] Remove dead ignoreStdError argument.
...
llvm-svn: 187849
2013-08-07 03:08:46 +00:00