Commit Graph

4949 Commits

Author SHA1 Message Date
Rafael Espindola
d80961c91f Actually switch the default to use multiprocessing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:32:53 +00:00
Daniel Dunbar
279a89ebdb [lit] Stop hacking the GIL check interval.
- This was never a big win, and is irrelevant now that we commonly use
   multiprocessing based parallelism.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193280 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:19:32 +00:00
Daniel Dunbar
a0d3bcfd8c [lit] Use multiprocessing based parallelism by default, on Unix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 22:19:07 +00:00
Peter Collingbourne
8f70847f98 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-20 03:19:25 +00:00
NAKAMURA Takumi
31544debc3 YAMLBench.cpp: Use llvm_move instead of std::move also here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-18 23:25:39 +00:00
Michael J. Spencer
44a4cfb63d [Support][YAML] Add support for accessing tags and tag handle substitution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193004 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-18 22:38:04 +00:00
NAKAMURA Takumi
651ffc703e Lit: LIT_PRESERVES_TMP should be aware of TMPDIR, too.
TMPDIR is preferred in Unix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192891 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17 13:11:13 +00:00
NAKAMURA Takumi
9f64a56aba Lit: Introduce an environment variable, $LIT_PRESERVES_TMP, to preserve TMP (and TEMP).
This is intended to check how many temporary files would be generated in automated builders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192887 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17 12:10:12 +00:00
Rafael Espindola
1e422bf49d Remove utils/profile.pl.
It uses now removed opt options.

Patch by Alastair Murray!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192606 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 16:48:32 +00:00
Craig Topper
c6f7c99809 Allow pinsrw/pinsrb/pextrb/pextrw/movmskps/movmskpd/pmovmskb/extractps instructions to parse either GR32 or GR64 without resorting to duplicating instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 04:55:01 +00:00
Craig Topper
017d8a3e23 Remove more filters from the disassembler. Mark some AVX512 instructions as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 05:41:08 +00:00
Craig Topper
c429b5cca1 Mark some more instructions as CodeGenOnly. Remove filters from the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192522 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 04:46:18 +00:00
Will Dietz
e3ba15c794 Add missing #include's to cctype when using isdigit/alpha/etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192519 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-12 00:55:57 +00:00
Stephen Lin
e5f740cc4f Really fix CHECK-LABEL and CHECK-DAG interaction. This actually just restores the initial implementation that was in r186162 but got lost in some subsequent refactoring. More explicit variable names and comments are present now to hopefully prevent repeat regression, as well as another test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192477 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 18:38:36 +00:00
Rafael Espindola
563c182839 Fix handling of CHECK-DAG inside of CHECK-LABEL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192463 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 16:48:02 +00:00
Craig Topper
e799dbc4bd Remove another unnecessary filter from the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192425 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-11 06:59:57 +00:00
Craig Topper
be5c1fd43f Fix so CRC32r64r8 isn't accidentally filtered from the disassembler tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192339 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-10 04:26:52 +00:00
Craig Topper
5747f946ec More x86 disassembler filtering cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192279 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-09 06:12:53 +00:00
Craig Topper
10c7925d69 Remove some old filters from the x86 disassembler table builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192275 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-09 05:02:29 +00:00
Craig Topper
d55fed16a4 Remove unneeded MMX instruction definition by moving pattern to an equivalent instruction definition and removing the filtering from the disassembler table building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192175 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-08 06:30:39 +00:00
Craig Topper
b9bc43852c Remove some instructions that existed to provide aliases to the assembler. Can be done with InstAlias instead. Unfortunately, this was causing printer to use 'vmovq' or 'vmovd' based on what was parsed. To cleanup the inconsistencies convert all 'vmovd' with 64-bit registers to 'vmovq', but provide an alias so that 'vmovd' will still parse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192171 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-08 05:53:50 +00:00
Craig Topper
e778f82a1e Remove some instructions that seem to only exist to trick the filtering checks in the disassembler table creation. Just fix up the filter to let the real instruction through instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192090 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 07:19:47 +00:00
Craig Topper
36a9b31b98 Add disassembler support for long encodings for INC/DEC in 32-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192086 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 04:28:06 +00:00
David Majnemer
6a971bb8f5 Revert "Revert "Windows: Add support for unicode command lines""
This reverts commit r192070 which reverted r192069, I forgot to
regenerate the configure scripts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192079 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 01:00:07 +00:00
David Majnemer
b262556c45 Revert "Windows: Add support for unicode command lines"
This is causing MinGW bots to fail.
This reverts commit r192069.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192070 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 20:44:34 +00:00
David Majnemer
5a1a1856a4 Windows: Add support for unicode command lines
Summary:
The MSVCRT deliberately sends main() code-page specific characters.
This isn't too useful to LLVM as we end up converting the arguments to
UTF-16 and subsequently attempt to use the result as, for example, a
file name.  Instead, we need to have the ability to access the Unicode
command line and transform it to UTF-8.

This has the distinct advantage over using the MSVC-specific wmain()
function as our entry point because:
 - It doesn't work on cygwin.
 - It only work on MinGW with caveats and only then on certain versions.
 - We get to keep our entry point as main(). :)

N.B.  This patch includes fixes to other parts of lib/Support/Windows
s.t. we would be able to take advantage of getting the Unicode paths.
E.G.  clang spawning clang -cc1 would want to give it Unicode arguments.

Reviewers: aaron.ballman, Bigcheese, rnk, ruiu

Reviewed By: rnk

CC: llvm-commits, ygao

Differential Revision: http://llvm-reviews.chandlerc.com/D1834

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192069 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-06 20:25:49 +00:00
Craig Topper
936910d929 Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 05:38:16 +00:00
Craig Topper
596cfd045f Revert r191940 to see if it fixes the build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 05:52:17 +00:00
Craig Topper
d356295678 Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 05:22:20 +00:00
Craig Topper
279d28265d Add XOP disassembler support. Fixes PR13933.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 05:17:48 +00:00
Pete Cooper
da750239bd Add v4f16 to supported value types.
This is useful for some ARM intrinsics such as VCVTN which does a <4 x float> <-> <4 x half> conversion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191870 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 03:29:21 +00:00
Rafael Espindola
8819c84aed Remove several unused variables.
Patch by Alp Toker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191757 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 13:32:03 +00:00
Richard Sandiford
737ca5f7ab Fix pattern sort in DAGISelEmitter.cpp
The old code skipped one of the sorting criteria if either pattern had
no types.  This could lead to cycles of the form X < Y, Y < Z, Z < X.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191735 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 09:49:01 +00:00
Craig Topper
39004b537b Filter out repeated sections from the X86 disassembler modRMTable. Saves about ~43K from a released build. Unfortunately the disassembler tables are still upwards of 800K.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191652 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 06:23:19 +00:00
Craig Topper
92b4581953 Various x86 disassembler fixes.
Add VEX_LIG to scalar FMA4 instructions.
Use VEX_LIG in some of the inheriting checks in disassembler table generator.
Make use of VEX_L_W, VEX_L_W_XS, VEX_L_W_XD contexts.
Don't let VEX_L_W, VEX_L_W_XS, VEX_L_W_XD, VEX_L_W_OPSIZE inherit from their non-L forms unless VEX_LIG is set.
Let VEX_L_W, VEX_L_W_XS, VEX_L_W_XD, VEX_L_W_OPSIZE inherit from all of their non-L or non-W cases.
Increase ranking on VEX_L_W, VEX_L_W_XS, VEX_L_W_XD, VEX_L_W_OPSIZE so they get chosen over non-L/non-W forms.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191649 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 02:46:36 +00:00
Andrew Trick
0701564377 Mark the x86 machine model as incomplete. PR17367.
Ideally, the machinel model is added at the time the instructions are
defined. But many instructions in X86InstrSSE.td still need a model.

Without this workaround the scheduler asserts because x86 already has
itinerary classes for these instructions, indicating they should be
modeled by the scheduler. Since we use the new machine model for other
instructions, it expects a new machine model for these too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191391 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 18:14:12 +00:00
Craig Topper
78099d11ff Fix doxygen comments to use correct function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 06:40:22 +00:00
Craig Topper
49909415ca Replace EVT with MVT in CodeGenDAGAPatterns.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 06:37:18 +00:00
Stepan Dyatkovskiy
33300d91b6 Patch that forces MergeFunctions pass for clang.
It is temporary patch. We need to keep it in trunk, since it makes easer to test it on buildbots on different platforms.
Once we see stable MergeFunctions behaviour with satisfied perfomance, this patch will be removed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191331 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 20:06:31 +00:00
Craig Topper
fb2d8e137e Fix formatting to match coding standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191280 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 06:21:04 +00:00
Jiangning Liu
477fc628b3 Initial support for Neon scalar instructions.
Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 02:47:27 +00:00
Craig Topper
cf458e91da Add missing index comments to the left side of the DAG ISel matcher table for each individual case of SwitchOpcode/Type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-22 23:18:50 +00:00
Benjamin Kramer
0d293e45b6 Provide basic type safety for array_pod_sort comparators.
This makes using array_pod_sort significantly safer. The implementation relies
on function pointer casting but that should be safe as we're dealing with void*
here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191175 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-22 14:09:50 +00:00
Matt Arsenault
c61c811621 Missed using check type enum in one place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190897 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 23:15:35 +00:00
Matt Arsenault
53bb26f61c Use function's argument instead of the global flag.
For now it happens the argument is always the same.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190896 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 22:45:57 +00:00
Matt Arsenault
4f67afc3d6 FileCheck refactor: use enum instead of bunch of bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190893 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 22:30:02 +00:00
Tim Northover
107cfa2169 TableGen: fix constness of new comparison function.
libc++ didn't seem to like a non-const call operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190797 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 17:33:40 +00:00
Tim Northover
03f9197d62 TableGen: give asm match classes deterministic order.
TableGen was sorting the entries in some of its internal data
structures by pointer. This order filtered through to the final
matching table and affected the diagnostics produced on bad assembly
occasionally.

It also turns out STL algorithms are ridiculously easy to misuse on
containers with custom order methods. (No bugs before, or now that I
know of, but plenty in the middle).

This should fix the sanitizer bot, which ends up with weird pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190793 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 16:43:19 +00:00
Tim Northover
6dd670af75 AsmMatcher: emit subtarget feature enum in deterministic order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190792 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 16:43:16 +00:00
Daniel Sanders
280d13f607 Fix the build for git repositories with multiple remotes.
Summary:
When a git repository had multiple remotes, ${repository} will be set to a multiline string. This causes compilation errors in SVNVersion.inc.

Fix this by limiting the output of utils/GetRepositoryPath to the first remote (which is reasonably likely to be 'origin').

Reviewers: jordan_rose

CC: llvm-commits, t.p.northover

Differential Revision: http://llvm-reviews.chandlerc.com/D1659

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190778 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 09:25:49 +00:00
Benjamin Kramer
94ee55d4b3 Replace some unnecessary vector copies with references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-15 22:04:42 +00:00
Daniel Dunbar
2849503ab2 [lit] Add an --output option, for writing results in a machine readable form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190738 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 01:19:17 +00:00
Daniel Sanders
9c38ba4f9f Fix build failure reported by Tobias Markmann in bug 17203.
svn 1.8.0 emits an additional line matching 'URL:' in its 'svn info' command
('Relative URL:').
Changed the grep to match only the intended line so that a valid SVNVersion.inc
is generated.

The problem doesnt occur with the svn version I'm using (1.7.5) but Tobias has
confirmed that the change fixes the problem.

See http://llvm.org/bugs/show_bug.cgi?id=17203



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190685 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 12:41:38 +00:00
Joey Gouly
715d98d657 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190598 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-12 10:28:05 +00:00
Daniel Dunbar
ff058f0a70 [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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190535 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 17:45:11 +00:00
Benjamin Kramer
209a8c8e35 llvm-tblgen: Mangle operand replacements into the strings in printAliasInstr.
Cuts down the bloat in the AArch64 asm writer a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190527 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 15:42:16 +00:00
Benjamin Kramer
71faecf16f llvm-tblgen: Stabilize subreg index tables.
Otherwise SequenceToOffsetTable will sort by pointer and becomes non-deterministic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 11:22:26 +00:00
Adrian Prantl
4f1e5fba41 debuginfo-tests: Add support for an lldb wrapper script
to be used on darwin in lieu of gdb.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190186 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06 18:12:01 +00:00
Daniel Dunbar
4b3e5f24ec [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 23:32:55 +00:00
Vincent Lejeune
d8f2eb301c TableGen: Enumerate Schedule Model too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189839 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-03 19:43:28 +00:00
Jim Grosbach
ff372dc18d Tidy up. Comment grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 22:41:43 +00:00
Jim Grosbach
dd46230062 Tidy up. Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189617 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 22:41:39 +00:00
Craig Topper
aae60d1dc4 Move StringToOffsetTable into the TableGen include directory so I can use it in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 05:09:55 +00:00
Daniel Dunbar
e0ff96c112 [lit] [tests] Add missing test input file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189561 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 03:02:34 +00:00
Daniel Dunbar
cb4bfb3409 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 02:52:10 +00:00
Daniel Dunbar
4ac723b53f [lit] Add support for multiprocessing, under --use-processes for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:54:23 +00:00
Daniel Dunbar
df44de6d91 [lit] Implement --max-time support by using provider cancel method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:54:19 +00:00
Daniel Dunbar
07f0f16bfd [lit] Refactor test execution logic into lit.run.Run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189554 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:54:15 +00:00
Daniel Dunbar
b11b690d3f [lit] Put display lock inside the ThreadResultsConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:54:09 +00:00
Daniel Dunbar
ec8e059254 [lit] Factor out a results consumer interface for test execution.
- Also, change TestProvider interface to operate on test indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189552 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:54:02 +00:00
Daniel Dunbar
8c59003cc3 [lit] Move top-level execute code into Run object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:48:55 +00:00
Daniel Dunbar
5b2efc28fd [lit] Factor out Run class to capture configuration + discovered tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189550 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:48:45 +00:00
Daniel Dunbar
8253cc047d [lit] Change lit.Test.ResultCode to be unique across pickling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189549 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:48:39 +00:00
Daniel Dunbar
6f25e872e4 [lit] Add a TODO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189546 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:41:15 +00:00
Daniel Dunbar
501cba385c [lit] Update shtest format to return lit.Test.Result objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189545 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:41:09 +00:00
Daniel Dunbar
8a1d9b207a [lit] Update LitTestCase to support lit.Test.Result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 00:40:59 +00:00
Rui Ueyama
2957273b88 Option parsing: support case-insensitive option matching.
Re-submitting r189416 with fix for Windows build on where strcasecmp is not defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189501 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 20:04:31 +00:00
Craig Topper
862b504201 Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189448 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 07:03:02 +00:00
Rui Ueyama
1997734e37 Revert "Option parsing: support case-insensitive option matching." as it broke Windows buildbot.
This reverts r189416.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28 00:02:06 +00:00
Rui Ueyama
055f4e99ff 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189416 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27 23:47:01 +00:00
Andrea Di Biagio
5768bb8d77 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189101 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 11:53:55 +00:00
Jakob Stoklund Olesen
d93969c32a 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 02:25:47 +00:00
Elena Demikhovsky
1765e74c15 AVX-512: Added masked SHIFT commands, more encoding tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189005 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 12:18:28 +00:00
Tim Northover
f7ab3a84b3 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 09:57:11 +00:00
Hans Wennborg
9d3c398d61 Remove llvm-lit from the cmake install target.
Since it's an llvm-internal tool, we shouldn't install it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-22 01:34:09 +00:00
Daniel Dunbar
4db169d31e [lit] Fix a couple lingering Py3 compat issues in ProgressBar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188951 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:47 +00:00
Daniel Dunbar
f72bc79226 [lit] Lift XFAIL handling to core infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188949 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:42 +00:00
Daniel Dunbar
d3bf8a2c0a [lit] Allow formats to return lit.Test.Result instances directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188948 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:40 +00:00
Daniel Dunbar
ccd21b26dd [lit] Factor out a separate Test.Result() object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188947 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:37 +00:00
Daniel Dunbar
0dd41a99e3 [lit] Simplify --time-tests code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188946 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:34 +00:00
Daniel Dunbar
7b0cdf7bf4 [lit] Extract TestFormat base class, for future use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:26 +00:00
Daniel Dunbar
70360e6762 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188590 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 23:30:23 +00:00
Stephen Lin
6d3aa547a5 FileCheck: Fix stray quote in CHECK-LABEL error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188564 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 17:29:01 +00:00
Aaron Ballman
3369599db2 Fixing a warning about control reaching the end of a non-void function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188524 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 01:43:31 +00:00
Daniel Dunbar
23114d0da7 [lit] Remove some done TODOs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188502 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-15 22:52:20 +00:00
Daniel Dunbar
b49fb7bcd5 [llvm-build] Make Py3 compatible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 23:15:39 +00:00
Daniel Dunbar
4fa5939268 [lit] Add test coverage of gtest format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188417 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 22:21:11 +00:00
Daniel Dunbar
80a06baec2 [lit] Ensure test output is converted to strings where possible.
- This cleans up the text output of failing tests when run under PY3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188416 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 22:21:01 +00:00
Daniel Dunbar
35d5e9044c [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188398 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 18:22:41 +00:00
Daniel Dunbar
14a5c695a9 Revert r188376, "[lit] Support parsing scripts with inconsistent or invalid encodings.", this doesn't work yet for bots using the internal shell.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188379 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 15:55:25 +00:00
Daniel Dunbar
47e7c040f4 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188376 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 15:24:58 +00:00
Daniel Dunbar
af5a9e3f1e [lit] Fix a relative import issue I missed earlier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 05:07:16 +00:00
Daniel Dunbar
213ab86ee6 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188359 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 05:07:13 +00:00
Daniel Dunbar
6b78ef3762 [lit] Fix tests to execute lit with same python as invoked with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 05:07:09 +00:00
Daniel Dunbar
5403214852 [lit] Factor ShTest format script command parsing from other processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 05:07:04 +00:00
Daniel Dunbar
493e8d4bf5 [lit] Move executeCommand() into lit.util.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 05:07:01 +00:00
Daniel Dunbar
f76c664f6b [lit] Move formats into their own subpackage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 05:06:55 +00:00
NAKAMURA Takumi
e908486f5b Lit: Introduce "%/[STpst] into parseIntegratedTestScript(), to normalize substitutions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 02:26:31 +00:00
Jack Carter
0fe3792a2f [Mips][msa] Value types for MSA support.
Added v8f16 to ValueTypes.h, ValueTypes.cpp, ValueTypes.td, 
and CodeGenTarget.cpp

Patch by Daniel Sanders


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188326 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 22:34:26 +00:00
Daniel Dunbar
13e26da155 [lit] Support use of setup.py from other directories.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188309 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-13 19:08:48 +00:00
Rui Ueyama
d9a84efe44 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188221 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 23:05:59 +00:00
Richard Sandiford
1f85736c97 Revert r188164: Stablize MCK_Reg ordering in AsmMatcherEmitter
Apparently caused a failure on Darwin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188166 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 10:57:51 +00:00
Richard Sandiford
dfb5ceae90 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 10:39:45 +00:00
Daniel Dunbar
ea549f0e12 [lit] Remove old ExamplesTests directory.
- The actual tests have better coverage than those, and they weren't useful
   anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188110 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:39:36 +00:00
Daniel Dunbar
de404a2809 [lit] Move ManyTests examples to lit/examples/many-tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188109 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:39:28 +00:00
Daniel Dunbar
a5e463ea5f [lit] Drop deprecated aliases for lit and old module names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:39:24 +00:00
Daniel Dunbar
4981a6ca97 [lit] Update lit's own tests to use lit_config and lit package, as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188107 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 21:39:17 +00:00
Daniel Dunbar
efdcf800fe [lit] Fix typo.
- Noticed by edward-san (IRC).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188096 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 19:39:42 +00:00
Daniel Dunbar
128ce319ec [lit] Rename lit.{TestFormats,Util} to their aliased names {formats,util}.
- With compatibility hack in lit.__init__, so this hopefully shouldn't break
   anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188040 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:37:15 +00:00
Daniel Dunbar
38649827c3 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188039 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:37:05 +00:00
Daniel Dunbar
6c749c5fbc [lit] Split TestingConfig.frompath() into separate ctor and load methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188038 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:36:58 +00:00
Daniel Dunbar
49e51429c1 [lit] Eliminate mustExist parameter from TestingConfig.frompath().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:09:02 +00:00
Daniel Dunbar
3279653eb8 [lit] Only create config copies when a local config file is present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188033 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:08:56 +00:00
Daniel Dunbar
b3c0c58ca4 [lit] Eliminate parent argument from TestingConfig.frompath(), which is effectively unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188032 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 00:08:46 +00:00
Daniel Dunbar
abb9de5257 [lit] Change --show-{tests,suites} to exit after printing.
- This is a more sensible behavior than printing and also running tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188009 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:59:25 +00:00
Daniel Dunbar
59c6b1073c [lit] Remove --repeat option, which wasn't that useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188008 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:59:20 +00:00
Daniel Dunbar
0e5f7c5d2f [lit] Eliminate some nested imports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188007 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:59:16 +00:00
Daniel Dunbar
9d11edb416 [lit] Remove on_clone member, which is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:59:13 +00:00
Daniel Dunbar
6104a4e4cc [lit] Remove unnecessary list copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187934 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:10:20 +00:00
Daniel Dunbar
91a62c34d8 [lit] Always list individual UNRESOLVED tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187933 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:10:05 +00:00
Daniel Dunbar
32b7d4dfc1 [lit] Explicitly convert dict items() result to a list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187932 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:10:01 +00:00
Daniel Dunbar
05fb743a99 [lit] Make string encoding issues explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:09:55 +00:00
Daniel Dunbar
9c2c660e12 [lit] Report the traceback when config import fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187920 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 21:43:34 +00:00
Daniel Dunbar
bd9bb2c515 [lit] Avoid comparisons with None.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187919 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 21:43:23 +00:00
Daniel Dunbar
a1ba7527de [lit] Use list comprehensions instead of map().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187918 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 21:43:17 +00:00
Daniel Dunbar
f861516179 [lit] Avoid deprecated dict.has_key() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187917 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 21:43:12 +00:00
NAKAMURA Takumi
28a07c868e lit/LitConfig.py: Fixup for msys bash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187896 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 17:21:23 +00:00
NAKAMURA Takumi
6757840799 Lit: Fixup in r187886.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187887 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 12:53:53 +00:00
NAKAMURA Takumi
8f4aab8c2f Lit: Resurrect --no-execute dropped in r187852.
For now, builders in bb.pgr.jp are using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187886 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 12:44:29 +00:00
Daniel Dunbar
9286ee6292 [lit] Use py2&3 compatible exec() syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187862 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:25:28 +00:00
Daniel Dunbar
09a28f6973 [lit] Use newer StringIO class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187861 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:24:20 +00:00
Daniel Dunbar
b35a173360 [lit] Use modern absolute/relative import style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187860 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:23:12 +00:00
Daniel Dunbar
304a0b0398 [lit] Avoid __cmp__ and cmp().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:22:02 +00:00
Daniel Dunbar
2e10ff28f2 [lit] Avoid use of iterator .next() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187858 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:20:54 +00:00
Daniel Dunbar
0d038e3e88 [lit] Use .write() methods instead of print statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187857 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:19:45 +00:00
Daniel Dunbar
4f2469c40c [lit] Use dual-compatible print() syntax where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187856 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:18:36 +00:00
Daniel Dunbar
0b714f7686 [lit] Remove use of deprecated parameter tuple unpacking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187855 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:17:27 +00:00
Daniel Dunbar
2e60c882bf [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187854 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:16:19 +00:00
Daniel Dunbar
26e0af54c2 [lit] Use more modern syntax for constructing exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187853 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:15:10 +00:00
Daniel Dunbar
91142b1125 [lit] Drop --no-execute, which isn't generally useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187852 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:14:00 +00:00
Daniel Dunbar
6bcb407d90 [lit] tests: Change discovery test to use --show-tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187851 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:12:51 +00:00
Daniel Dunbar
3915c080cc [lit] Add a --show-tests option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187850 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:11:42 +00:00
Daniel Dunbar
cd594283f7 [lit] Remove dead ignoreStdError argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187849 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 03:08:46 +00:00
Reid Kleckner
47cfec0284 Remove some std stream usage from Support and TableGen
LLVM's coding standards recommend raw_ostream and MemoryBuffer for
reading and writing text.

This has the side effect of allowing clang to compile more of Support
and TableGen in the Microsoft C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 22:51:21 +00:00
Tim Northover
e57343b636 Fix handling of CHECK-DAG combined with CHECK-NOT
Patch by Daniel Sanders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187651 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 11:32:50 +00:00
Vladimir Medic
588f408b95 Moving definition of MnemonicContainsDot field from class Instruction to class AsmParser as suggested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 09:25:27 +00:00
Hans Wennborg
a15d5db7f2 Option parsing: remove non-SUPPORT_ALIASARGS fall-back
The clients of this code have been updated to all support AliasArgs.

This depends on Clang r187538 and lld r187541.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187546 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 23:28:51 +00:00
Hans Wennborg
9dd8c0cffe Option parsing: add support for alias arguments.
This makes option aliases more powerful by enabling them to
pass along arguments to the option they're aliasing.

For example, if we have a joined option "-foo=", we can now
specify a flag option "-bar" to be an alias of that, with the
argument "baz".

This is especially useful for the cl.exe compatible clang driver,
where many options are aliases. For example, this patch enables
us to alias "/Ox" to "-O3" (-O is a joined option), and "/WX" to
"-Werror" (again, -W is a joined option).

Differential Revision: http://llvm-reviews.chandlerc.com/D1245

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 22:44:41 +00:00
Andrew Trick
d3d751804c comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187531 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 21:05:54 +00:00
Tom Stellard
5519dc9de8 Revert "TableGen: Enumerate Schedule Model too."
This reverts commit 2ca1e4a39c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 20:43:08 +00:00
Vincent Lejeune
2ca1e4a39c TableGen: Enumerate Schedule Model too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187511 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:31:20 +00:00
Andrew Trick
c408335bf5 Fix register pressure tables on ARM.
The heuristic that merges register pressure sets was bogus for ARM's S/D regs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187479 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 03:24:31 +00:00
Andrew Trick
bbf20d4d4a Add tracing to the tblgen register pressure table generator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 03:24:28 +00:00
Craig Topper
d953bcd487 Remove use of sprintf added to X86 disassembler tablegen code. Send message with instruction name to errs() instead and use a generic message for the llvm_unreachable. Consistent with other places in this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187333 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 21:28:02 +00:00
Elena Demikhovsky
dc8a318f44 fixed compilation issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 08:45:12 +00:00
Elena Demikhovsky
c18f4efc5d Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187324 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 08:28:38 +00:00
Rafael Espindola
018696db45 Move the default back to pipefail. I accidentally reverted it before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187271 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 23:22:43 +00:00
Rafael Espindola
c16ab3ed21 Propagate pipefail when cloning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187268 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 23:17:38 +00:00
Rafael Espindola
c1bb2d4325 Use pipefail when available.
This change makes test with RUN lines like
RUN: opt ... | FileCheck

fail if opt fails, even if it prints what FileCheck wants. Enabling this
found some interesting cases of broken tests that were not being noticed
because opt (or some other tool) was crashing late.

Pipefail is used when the shell supports it or when using the internal
python based tester.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187261 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 22:32:58 +00:00
Aaron Ballman
a946190351 Using a different loop induction variable than the enclosing scope. No functional changes intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187159 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 22:09:31 +00:00
Justin Holewinski
563a9cf7ba Fix a bug in TableGen where the intrinsic function name recognizer could mis-identify names if one was a prefix substring of the other
For two intrinsics 'llvm.nvvm.texsurf.handle' and 'llvm.nvvm.texsurf.handle.internal',
TableGen was emitting matching code like:

  if (Name.startswith("llvm.nvvm.texsurf.handle")) ...
  if (Name.startswith("llvm.nvvm.texsurf.handle.internal")) ...

We can never match "llvm.nvvm.texsurf.handle.internal" here because it will
always be erroneously matched by the first condition.

The fix is to sort the intrinsic names and emit them in reverse order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187119 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 12:32:00 +00:00
Andrew Trick
bba663e30a RegPressure: Order the "pressure sets" by number of regunits per set.
This lets heuristics easily pick the most important set to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-25 07:26:29 +00:00
Craig Topper
f63ef914b6 Split generated asm mnemonic matching table into a separate table for each asm variant.
This removes the need to store the asm variant in each row of the single table that existed before. Shaves ~16K off the size of X86AsmParser.o.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24 07:33:14 +00:00
Craig Topper
349d6a70a1 Remove 'else' after 'return'. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 06:27:36 +00:00
Craig Topper
00f94955ef Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186928 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 06:25:00 +00:00
Nico Rieck
ba46086444 lit: Support cancellation on Windows
The current machinery using KeyboardInterrupt for canceling doesn't work
with multiple threads on Windows as it just cancels the currently run tests
but the runners continue.

We install a handler for Ctrl-C which stops the provider from providing any
more tests to the runners. Together with aborting all currently running
tests, this brings lit to a halt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186695 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-19 17:08:08 +00:00
Rafael Espindola
c1b49b56d4 Add a wrapper for open.
This centralizes the handling of O_BINARY and opens the way for hiding more
differences (like how open behaves with directories).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-16 19:44:17 +00:00
Vladimir Medic
9273151c3b This patch allows targets to define weather the instruction mnemonics in asm matcher tables will contain '.' character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186388 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-16 09:22:38 +00:00
Aaron Ballman
54911a5303 Teaching llvm-tblgen to not emit a switch statement when there are no case statements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186330 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 16:53:32 +00:00
Craig Topper
3c70fcf02b Add 'const' qualifier to some arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186312 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 08:02:13 +00:00
Craig Topper
a0ec3f9b7b Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186274 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-14 04:42:23 +00:00
Stephen Lin
178504b07b Add new directive called CHECK-LABEL to FileCheck.
CHECK-LABEL is meant to be used in place on CHECK on lines containing identifiers or other unique labels (they need not actually be labels in the source or output language, though.) This is used to break up the input stream into separate blocks delineated by CHECK-LABEL lines, each of which is checked independently. This greatly improves the accuracy of errors and fix-it hints in many cases, and allows for FileCheck to recover from errors in one block by continuing to subsequent blocks.

Some tests will be converted to use this new directive in forthcoming patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-12 14:51:05 +00:00
Charles Davis
ac226bbf45 Target/X86: Add explicit Win64 and System V/x86-64 calling conventions.
Summary:
This patch adds explicit calling convention types for the Win64 and
System V/x86-64 ABIs. This allows code to override the default, and use
the Win64 convention on a target that wants to use SysV (and
vice-versa). This is needed to implement the `ms_abi` and `sysv_abi` GNU
attributes.

Reviewers:

CC:

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186144 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-12 06:02:35 +00:00
Duncan Sands
8cf79f86b7 Correct comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-10 00:52:41 +00:00
Nick Lewycky
dc89737bcd Extend 'readonly' and 'readnone' to work on function arguments as well as
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185735 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-06 00:29:58 +00:00
Rafael Espindola
a5db79d514 Add a --crash option to not.
Now the two possible uses of not are
* not cmd
  Will return true if cmd doesn't crash and returns false.
* not --crash cmd
  Will return true if cmd crashes.

It will be used/tested in a followup commit for the clang crash recovery
testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-05 02:50:03 +00:00
Craig Topper
6227d5c690 Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185606 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 01:31:24 +00:00
Chad Rosier
b7110cf5b5 Improve the compression of the tablegen DiffLists by introducing a new sort
algorithm when assigning EnumValues to the synthesized registers.

The current algorithm, LessRecord, uses the StringRef compare_numeric
function.  This function compares strings, while handling embedded numbers.
For example, the R600 backend registers are sorted as follows:

  T1
  T1_W
  T1_X
  T1_XYZW
  T1_Y
  T1_Z
  T2
  T2_W
  T2_X
  T2_XYZW
  T2_Y
  T2_Z

In this example, the 'scaling factor' is dEnum/dN = 6 because T0, T1, T2
have an EnumValue offset of 6 from one another.  However, in other parts
of the register bank, the scaling factors are different:

dEnum/dN = 5:
  KC0_128_W
  KC0_128_X
  KC0_128_XYZW
  KC0_128_Y
  KC0_128_Z
  KC0_129_W
  KC0_129_X
  KC0_129_XYZW
  KC0_129_Y
  KC0_129_Z

The diff lists do not work correctly because different kinds of registers have
different 'scaling factors'.  This new algorithm, LessRecordRegister, tries to
enforce a scaling factor of 1.  For example, the registers are now sorted as
follows:

  T1
  T2
  T3
  ...
  T0_W
  T1_W
  T2_W
  ...
  T0_X
  T1_X
  T2_X
  ...
  KC0_128_W
  KC0_129_W
  KC0_130_W
  ...

For the Mips and R600 I see a 19% and 6% reduction in size, respectively.  I
did see a few small regressions, but the differences were on the order of a
few bytes (e.g., AArch64 was 16 bytes).  I suspect there will be even
greater wins for targets with larger register files.

Patch reviewed by Jakob.
rdar://14006013


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185094 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27 19:38:13 +00:00
Tom Stellard
898b9f020d TableGen: Generate a function for getting operand indices based on their defined names
This patch modifies TableGen to generate a function in
${TARGET}GenInstrInfo.inc called getNamedOperandIdx(), which can be used
to look up indices for operands based on their names.

In order to activate this feature for an instruction, you must set the
UseNamedOperandTable bit.

For example, if you have an instruction like:

def ADD : TargetInstr <(outs GPR:$dst), (ins GPR:$src0, GPR:$src1)>;

You can look up the operand indices using the new function, like this:

Target::getNamedOperandIdx(Target::ADD, Target::OpName::dst)  => 0
Target::getNamedOperandIdx(Target::ADD, Target::OpName::src0) => 1
Target::getNamedOperandIdx(Target::ADD, Target::OpName::src1) => 2

The operand names are case sensitive, so $dst and $DST are considered
different operands.

This change is useful for R600 which has instructions with a large number
of operands, many of which model single bit instruction configuration
values.  These configuration bits are common across most instructions,
but may have a different operand index depending on the instruction type.
It is useful to have a convenient way to look up the operand indices,
so these bits can be generically set on any instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184879 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 21:22:09 +00:00
Rafael Espindola
dd5af27a74 keep only the StringRef version of getFileOrSTDIN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184826 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 05:28:34 +00:00
Stefanus Du Toit
23306deb92 Add support for encoding the HLE XACQUIRE and XRELEASE prefixes.
For decoding, keep the current behavior of always decoding these as their REP
versions. In the future, this could be improved to recognize the cases where
these behave as XACQUIRE and XRELEASE and decode them as such.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184207 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 17:08:10 +00:00
Bob Wilson
098f1ba00a Build Apple's llvmCore with --disable-zlib. <rdar://problem/14182316>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184164 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 01:22:29 +00:00
Andrew Trick
a3d82ce19f Support BufferSize on ProcResGroup for unified MOp schedulers.
And add Sandybridge/Haswell resource buffers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-15 04:50:06 +00:00
Andrew Trick
b86a0cdb67 Machine Model: Add MicroOpBufferSize and resource BufferSize.
Replace the ill-defined MinLatency and ILPWindow properties with
with straightforward buffer sizes:
MCSchedMode::MicroOpBufferSize
MCProcResourceDesc::BufferSize

These can be used to more precisely model instruction execution if desired.

Disabled some misched tests temporarily. They'll be reenabled in a few commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184032 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-15 04:49:57 +00:00
Rafael Espindola
bbf97ea7d5 Don't use PathV1.h in FileUtilities.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:41:00 +00:00
Rafael Espindola
675e0ac0bf Avoid using PathV1.h in Program.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 20:25:38 +00:00
Rafael Espindola
6585b388cb Have sys::FindProgramByName return a std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13 19:25:37 +00:00
Rafael Espindola
9f1d9fd196 Remove the program class.
It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just
those two functions and make Execute and Wait implementations details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183864 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12 20:58:35 +00:00
Benjamin Kramer
aca93cf44f tblgen: Assert that InstRWs doesn't grows when we don't expect it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-10 20:19:35 +00:00
Benjamin Kramer
068ecc15c0 tblgen: always lookup values from the original vector as it could be grown under our feet.
PR16281.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183630 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-09 15:20:23 +00:00
Bill Wendling
ab5ad9fe50 Add a script to help us create source tar balls for the release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183509 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 11:15:30 +00:00
Bill Wendling
451ee21d14 Use proper exit code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183508 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 11:14:37 +00:00
Arnold Schwaighofer
0efc78257b CodeGenSchedule: Use resize instead of copying a vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183465 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 00:04:30 +00:00
Arnold Schwaighofer
45dc03287e CodeGenSchedule: smallvector.push_back(smallvector[0]) is dangerous
The element passed to push_back is not copied before the vector reallocates.
The client needs to copy the element first before passing it to push_back.

No test case, will be tested by follow-up swift scheduler model change (it
segfaults without this change).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183459 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 23:23:14 +00:00
Jakub Staszak
239f8a4e11 Remove unimplemented definition. Found using [-Wunused-member-function].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183426 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06 17:52:45 +00:00
Arnold Schwaighofer
fcce70ad52 SubtargetEmitter fix
Don't output data if we are supposed to ignore the record.

Reapply of 183255, I don't think this was causing the tablegen segfault on linux
testers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 14:06:50 +00:00
Andrew Trick
d7aad34bcb Fix a tblgen subtargetemitter bug, for future Swift support.
This fixes some of the ridiculously complex code for optimizing the
machine model tables that are shared among all processors of a given
target. A9 and Swift both use the "special" feature that maps old
itinerary classes to new machine model defs. They map different
overlapping subsets of instructions, which wasn't handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183302 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-05 06:55:20 +00:00
Arnold Schwaighofer
8a227084a5 Revert series of sched model patches until I figure out what is going on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 22:35:17 +00:00
Arnold Schwaighofer
54d63ccdb7 SubtargetEmitter fix
Don't output data if we are supposed to ignore the record.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183255 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 22:15:41 +00:00
Ahmed Bougacha
23ed37a6b7 Make SubRegIndex size mandatory, following r183020.
This also makes TableGen able to compute sizes/offsets of synthesized
indices representing tuples.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183061 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 23:45:26 +00:00
Ahmed Bougacha
bed2308186 Add a way to define the bit range covered by a SubRegIndex.
NOTE: If this broke your out-of-tree backend, in *RegisterInfo.td, change
the instances of SubRegIndex that have a comps template arg to use the
ComposedSubRegIndex class instead.

In TableGen land, this adds Size and Offset attributes to SubRegIndex,
and the ComposedSubRegIndex class, for which the Size and Offset are
computed by TableGen. This also adds an accessor in MCRegisterInfo, and
Size/Offsets for the X86 and ARM subreg indices.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183020 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-31 17:08:36 +00:00
Galina Kistanova
d5ae2c3a75 Fixed bug when tests in executable partially used absolute paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182910 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-30 04:56:28 +00:00
Chad Rosier
2275cfd75b Remove the MCRegAliasIterator tables and compute the aliases dynamically.
The size reduction in the RegDiffLists are rather dramatic.  Here are a few
size differences for MCTargetDesc.o files (before and after) in bytes:
R600 - 36160B - 11184B - 69% reduction
ARM - 28480B - 8368B - 71% reduction
Mips - 816B - 576B - 29% reduction

One side effect of dynamically computing the aliases is that the iterator does
not guarantee that the entries are ordered or that duplicates have been removed.
The documentation implies this is a safe assumption and I found no clients that
requires these attributes (i.e., strict ordering and uniqueness).

My local LNT tester results showed no execution-time failures or significant
compile-time regressions (i.e., beyond what I would consider noise) for -O0g,
-O2 and -O3 runs on x86_64 and i386 configurations.
rdar://12906217


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182783 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-28 18:08:48 +00:00
Alexey Samsonov
c1a0806ff5 Revert r182715 and r182758
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182761 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-28 10:08:08 +00:00
Alexey Samsonov
1f41986a95 Fixup for r182715: provide correct arg to --gtest-filter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182758 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-28 09:40:42 +00:00
Galina Kistanova
f0c74bda2e Fixed bug when tests in executable partially used absolute paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182715 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-26 03:58:41 +00:00
Bill Schmidt
d35da5055b Recognize ValueType operands in source patterns for fast-isel.
Currently the fast-isel table generator recognizes registers, register
classes, and immediates for source pattern operands.  ValueType
operands are not recognized.  This is not a problem for existing
targets with fast-isel support, but will not work for targets like
PowerPC and SPARC that use types in source patterns.

The proposed patch allows ValueType operands and treats them in the
same manner as register classes.  There is no convenient way to map
from a ValueType to a register class, but there's no need to do so.
The table generator already requires that all types in the source
pattern be identical, and we know the register class of the output
operand already.  So we just assign that register class to any
ValueType operands we encounter.

No functional effect on existing targets.  Testing deferred until the
PowerPC target implements fast-isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182512 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-22 20:45:11 +00:00
Jakob Stoklund Olesen
997fa623fc Add TargetRegisterInfo::getCoveringLanes().
This lane mask provides information about which register lanes
completely cover super-registers. See the block comment before
getCoveringLanes().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182034 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 18:03:08 +00:00
Bill Wendling
30042c58db Use proper syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181930 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 21:38:12 +00:00
Bill Wendling
769b71a7f5 Add lldb and polly to the projects to tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181925 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 21:36:46 +00:00
Michael Liao
95ab326674 Add 'CHECK-DAG' support
Refer to 'FileCheck.rst'f for details of 'CHECK-DAG'.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181827 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14 20:34:12 +00:00
Michael Liao
7efbbd61eb Refactor string checking. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181824 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14 20:29:52 +00:00
Duncan Sands
8305acb200 Get the unittests compiling when building with cmake and the setting
-DLLVM_ENABLE_THREADS=false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181788 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-14 13:29:16 +00:00
Bill Wendling
77bf8661cd Add libcxx and clang-tools-extra to the testing thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181418 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 09:31:10 +00:00
Bill Wendling
7193427e21 Add clang-tools-extra to the list of things to tag for the release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181402 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 09:23:53 +00:00
Bill Wendling
5812cdb9e5 Add the libc++ project to those we tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181371 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 22:15:06 +00:00
Reid Kleckner
2a83943855 Try to fix ProgramTest on FreeBSD
This seemed like the cleanest way to find the test executable.  Also fix
the file mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180770 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 04:30:41 +00:00
Ulrich Weigand
d999062f31 Handle tied sub-operands in AsmMatcherEmitter
The problem this patch addresses is the handling of register tie
constraints in AsmMatcherEmitter, where one operand is tied to a
sub-operand of another operand.  The typical scenario for this to
happen is the tie between the "write-back" register of a pre-inc
instruction, and the base register sub-operand of the memory address
operand of that instruction.

The current AsmMatcherEmitter code attempts to handle tied
operands by emitting the operand as usual first, and emitting
a CVT_Tied node when handling the second (tied) operand.  However,
this really only works correctly if the tied operand does not
have sub-operands (and isn't a sub-operand itself).  Under those
circumstances, a wrong MC operand list is generated.

In discussions with Jim Grosbach, it turned out that the MC operand
list really ought not to contain tied operands in the first place;
instead, it ought to consist of exactly those operands that are
named in the AsmString.  However, getting there requires significant
rework of (some) targets.

This patch fixes the immediate problem, and at the same time makes
one (small) step in the direction of the long-term solution, by
implementing two changes:

1. Restricts the AsmMatcherEmitter handling of tied operands to
   apply solely to simple operands (not complex operands or
   sub-operand of such).

This means that at least we don't get silently corrupt MC operand
lists as output.  However, if we do have tied sub-operands, they
would now no longer be handled at all, except for:

2. If we have an operand that does not occur in the AsmString,
   and also isn't handled as tied operand, simply emit a dummy
   MC operand (constant 0).

This works as long as target code never attempts to access
MC operands that do no not occur in the AsmString (and are
not tied simple operands), which happens to be the case for
all targets where this situation can occur (ARM and PowerPC).

[ Note that this change means that many of the ARM custom
  converters are now superfluous, since the implement the
  same "hack" now performed already by common code. ]

Longer term, we ought to fix targets to never access *any*
MC operand that does not occur in the AsmString (including
tied simple operands), and then finally completely remove
all such operands from the MC operand list.

Patch approved by Jim Grosbach.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180677 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 18:48:23 +00:00
Michael Gottesman
276b8549ee Use 'git svn find-rev' in git-svnrevert instead of shell script fu.
Thanks Chandler!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26 03:27:39 +00:00
Michael Gottesman
19c3735262 Added the scripts git-svnup/git-svnrevert to utils/git-svn.
It makes more sense to have git-svnup here than catting said file in the
documentation (where we should rather point users to this directory).
I included git-svnrevert as an additional gift to the community. I will update
the documentation in a second commit later today.

git-svnrevert takes in a git hash for a commit, looks up the svn revision for
said commit and then creates the normal git revert commit message with the one
liner message, except instead of saying

  Revert "<<<INSERT ONELINER HERE>>>"

  This reverts commit <<<INSERT GITHASH HERE>>>

It says:

  Revert "<<<INSERT ONELINER HERE>>>"

  This reverts commit r<<<INSERT SVN REVISION HERE>>>

so git hashes will not escape into our svn logs (which just look unseemly).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180587 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26 00:58:45 +00:00
Michael Liao
0fc7137f2f Remove SMLoc paired with CHECK-NOT patterns. Not functionality change.
Pattern has source location by itself. After adding a trivial method to
retrieve it, it's unnecessary to pair a source location for CHECK-NOT patterns.
One thing revised after this is the diagnostic info is more accurate by
pointing to the start of the CHECK-NOT pattern instead of the end of the
CHECK-NOT pattern. E.g. diagnostic message previously looks like

    <stdin>:1:1: error: CHECK-NOT: string occurred!
    test
    ^
    test.txt:1:16: note: CHECK-NOT: pattern specified here
    CHECK-NOT: test
                   ^

is changed to

    <stdin>:1:1: error: CHECK-NOT: string occurred!
    test
    ^
    test.txt:1:12: note: CHECK-NOT: pattern specified here
    CHECK-NOT: test
               ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180578 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-25 21:31:34 +00:00
Michael Liao
c16f8c5e56 Remove tailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180564 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-25 18:54:02 +00:00
Andrew Trick
a809c8db3d Machine model: Generate table entries for super-resources.
Super-resources and resource groups are two ways of expressing
overlapping sets of processor resources. Now we generate table entries
the same way for both so the scheduler never needs to explicitly check
for super-resources.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 23:45:16 +00:00
Andrew Trick
e30f32a69b Machine model: verify well-formed processor resource groups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180161 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 23:45:14 +00:00
Andrew Trick
6982bdd119 Machine model: rewrite a tablegen loop to avoid comparing record pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180160 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 23:45:11 +00:00
Chad Rosier
88eb89b89f [asm parser] Add support for predicating MnemonicAlias based on the assembler
variant/dialect.  Addresses a FIXME in the emitMnemonicAliases function.
Use and test case to come shortly.
rdar://13688439 and part of PR13340.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18 22:35:36 +00:00
Daniel Dunbar
406ef44707 lit: Fix infinite recursion when an out-of-tree test root is located inside the source test root.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179402 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 19:09:09 +00:00
Daniel Dunbar
f2c2b20090 lit: Add a test for discovery w/ test_exec_root (out-of-tree test root).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179401 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 19:08:57 +00:00
Michael Liao
02d2e61252 Add CLAC/STAC instruction encoding/decoding support
As these two instructions in AVX extension are privileged instructions for
special purpose, it's only expected to be used in inlined assembly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179266 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11 04:52:28 +00:00
Daniel Dunbar
aa3a85e2fa lit: Don't descend into .git directories during test discovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179249 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11 00:31:35 +00:00
Daniel Dunbar
e94bd36dc7 lit: Shorten a metavar to make --help look nicer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179248 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11 00:31:27 +00:00
Daniel Dunbar
6be0ae59ec lit: Add a test for discovery when exact test names are given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179247 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11 00:31:22 +00:00
Daniel Dunbar
2b570ce5aa lit: Add a trivial test of the basic progress bar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179243 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11 00:05:37 +00:00
Rafael Espindola
3455b32b3e Move yaml2obj to tools too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 20:00:35 +00:00
Rafael Espindola
2bce4cc87a Use ScalarBitSetTraits.
What was missing was were the type strong operator|.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178879 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 16:00:31 +00:00
Rafael Espindola
46af067997 Move obj2yaml to tools to sort out make's dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178835 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 02:57:22 +00:00
Rafael Espindola
a3b62eb417 Build obj2yaml with configure+make.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178833 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 02:24:51 +00:00
Rafael Espindola
5152e4fb06 Add back parsing of header charactestics.
It had been dropped during the switch to yaml::IO. Also add a test going
from yaml2obj to llvm-readobj. It can be extended as we add more
fields/formats to yaml2obj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178786 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04 20:30:52 +00:00
Rafael Espindola
a964ad5c34 Remove anonymous namespace.
Looks like the gcc in http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-self-mingw32/ doesn't like "not external linkage":

/Volumes/Macintosh_HD2/buildbots/clang-x86_64-darwin11-self-mingw32/llvm.src/include/llvm/Support/YAMLTraits.h: In instantiation of 'const bool llvm::yaml::has_SequenceMethodTraits<std::vector<<unnamed>::COFFYAML::Relocation, std::allocator<<unnamed>::COFFYAML::Relocation> > >::value':
/Volumes/Macintosh_HD2/buildbots/clang-x86_64-darwin11-self-mingw32/llvm.src/include/llvm/Support/YAMLTraits.h:281:   instantiated from 'llvm::yaml::has_SequenceTraits<std::vector<<unnamed>::COFFYAML::Relocation, std::allocator<<unnamed>::COFFYAML::Relocation> > >'
/Volumes/Macintosh_HD2/buildbots/clang-x86_64-darwin11-self-mingw32/llvm.src/utils/yaml2obj/yaml2obj.cpp:627:   instantiated from here
/Volumes/Macintosh_HD2/buildbots/clang-x86_64-darwin11-self-mingw32/llvm.src/include/llvm/Support/YAMLTraits.h:243: error: 'llvm::yaml::SequenceTraits<std::vector<<unnamed>::COFFYAML::Relocation, std::allocator<<unnamed>::COFFYAML::Relocation> > >::size' is not a valid template argument for type 'size_t (*)(llvm::yaml::IO&, std::vector<<unnamed>::COFFYAML::Relocation, std::allocator<<unnamed>::COFFYAML::Relocation> >&)' because function 'static size_t llvm::yaml::SequenceTraits<std::vector<<unnamed>::COFFYAML::Relocation, std::allocator<<unnamed>::COFFYAML::Relocation> > >::size(llvm::yaml::IO&, std::vector<<unnamed>::COFFYAML::Relocation, std::allocator<<unnamed>::COFFYAML::Relocation> >&)' has not external linkage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178600 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 01:07:53 +00:00
Rafael Espindola
8ec018c678 Use yaml::IO in yaml2obj.cpp.
The generic structs and specializations will be refactored when obj2yaml is
changed to use yaml::IO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 23:56:40 +00:00