Commit Graph

5702 Commits

Author SHA1 Message Date
Craig Topper
f150810c18 [X86] Remove some unused encoding checks from the disassembler table building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261418 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-20 06:20:21 +00:00
Craig Topper
2082d39556 [TableGen,X86] Add NDEBUG check to a variable initialization that's only used by asserts. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261188 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-18 04:54:32 +00:00
Craig Topper
a5754d7efa [TableGen,X86] Remove extra optional operand from RawFrm. RawFrm with 2 immediates is handled by RawFrmImm8/RawFrmImm16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261187 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-18 04:54:29 +00:00
Craig Topper
35e38d845b [TableGen] Fix inconsistent spacing. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260935 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:24:58 +00:00
Craig Topper
69dced0d4c [TableGen] Stop passing by reference an integer that doesn't get modified. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260934 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:24:56 +00:00
Craig Topper
6ff0feee63 [TableGen] Remove unused member variable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260933 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 04:24:54 +00:00
Craig Topper
33543a37a7 [TableGen] Use range-based for loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260928 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-16 02:48:30 +00:00
Craig Topper
487820cc86 [TableGen] Remove constant string argument from a method that's only called once. We can just hardcode the string inside. There already other things that make the method not reusable. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-14 05:22:01 +00:00
Craig Topper
9a4d26a079 [TableGen] Fix comment about 64-bit type I missed when I removed the underlying type in r260808.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260830 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 17:58:14 +00:00
Craig Topper
dcbac18d6e [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 06:03:32 +00:00
Craig Topper
c46e309ffa No need to make the subtarget feature bit enum a uint64_t. This was a leftover from when the feature bit enum contained masks instead of bit indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-13 06:03:29 +00:00
Andrew Wilkins
724b31e65d Avoid linking LLVM component libraries with libLLVM
Patch by Jack Howarth.

When linking to libLLVM, don't also link to the component
libraries that constitute libLLVM.

Differential Revision: http://reviews.llvm.org/D16945



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-12 01:42:43 +00:00
James Y Knight
5b06a939bd Add -match-full-lines argument to FileCheck.
This is useful for some tests where more-exact matching is useful, such
as clang's Preprocessor tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260540 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 16:46:09 +00:00
Craig Topper
7f53bedefc [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:29 +00:00
Craig Topper
a78623e3e8 [TableGen] Don't call emitSourceFileHeader a second time in the middle of the output file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260501 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:27 +00:00
Craig Topper
083ca64734 [TableGen] Whitespace cleanup in output file. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:25 +00:00
Craig Topper
269f2734b8 [TableGen] Simplify code slightly. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260499 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 07:39:22 +00:00
Matt Arsenault
b9f1dbe18d SelectionDAG: Make Properties a field of SDPatternOperator
Currently you can't specify node properties like commutativity on
a PatFrag. If you want to create a PatFrag on a commutative node
with a hasOneUse predicate, this enables you to specify that the
PatFrag is also commutable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260404 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-10 18:40:04 +00:00
Ehsan Akhgari
a20946b352 llvm-config: Add preliminary Windows support
Summary:
This patch adds Windows support for a few of the llvm-config commands,
including cflags, ldflags, libs, and system-libs.

Currently llvm-config is untested, so this patch adds tests for the
commands that it fixes as well.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16762

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-09 19:41:14 +00:00
Tom Stellard
25257d8bf4 TableGen: Add IsOptional field to AsmOperandClass
Summary:
This makes it possible to specify some operands as optional to the AsmMatcher.
Setting this field to true will prevent the AsmMatcher from emitting
'too few operands' errors when there are missing optional operands.

Reviewers: olista01, ab

Subscribers: nhaustov, arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D15755

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-05 19:59:33 +00:00
Benjamin Kramer
67256b88e5 The canonical way to XFAIL a test for all targets is XFAIL: *, not XFAIL:
Fix the lit bug that enabled this "feature" (empty triple is substring
of all possible target triples) and change the two outliers to use the
documented * syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259799 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-04 16:21:38 +00:00
David L Kreitzer
af50aacb9a Unify the target opcode enum in TargetOpcodes.h and the FixedInstrs array in
CodeGenTarget.cpp to avoid the ordering dependence. NFCI.

Differential Revision: http://reviews.llvm.org/D16826


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 23:17:32 +00:00
Reid Kleckner
6ebd4e68e8 Minor performance tweaks to llvm-tblgen (and a few that might be a good idea)
Summary:
This patch adds a reserve call to an expensive function
(`llvm::LoadIntrinsics`), and may fix a few other low hanging
performance fruit (I've put them in comments for now, so we can
discuss).

**Motivation:**

As I'm sure other developers do, when I build LLVM, I build the entire
project with the same config (`Debug`, `MinSizeRel`, `Release`, or
`RelWithDebInfo`). However, the `Debug` config also builds llvm-tblgen
in `Debug` mode. Later build steps that run llvm-tblgen then can
actually be the slowest steps in the entire build. Nobody likes slow
builds.

Reviewers: rnk, dblaikie

Differential Revision: http://reviews.llvm.org/D16832

Patch by Alexander G. Riccio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 19:34:28 +00:00
Dylan McKay
f4afd08249 [TableGen] Add 'register alternative name matching' support
Summary:
This adds a new attribute which targets can set in TableGen which causes a function to be generated which matches register alternative names. This is very similar to `ShouldEmitMatchRegisterName`, except it works on alt names.

This patch is currently used by the out of tree part of the AVR backend. It reduces code duplication greatly, and has the effect that you do not need to hardcode altname to register mappings in C++.

It will not work on targets which have registers which share the same aliases.

Reviewers: stoklund, arsenm, dsanders, hfinkel, vkalintiris

Subscribers: hfinkel, dylanmckay, llvm-commits

Differential Revision: http://reviews.llvm.org/D16312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-03 10:30:16 +00:00
Justin Bogner
4b23ca53a3 Remove utils/buildit
The autoconf build system was removed - this doesn't even work and
doesn't need to be here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259582 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 21:56:16 +00:00
Eugene Zelenko
380d47d651 Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259539 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-02 18:20:45 +00:00
Craig Topper
3f0462d7e0 [TableGen] Store result of getInstructionsByEnumValue in an ArrayRef instead of accidentally copying to a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259336 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-01 01:33:42 +00:00
Craig Topper
ac8a991748 No need to use utostr/utohexstr when writing into a raw_ostream. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 01:55:15 +00:00
Daniel Sanders
508957013b Bring back the test-suite export in test-release without bringing back the build failures.
Summary:
r257791 disabled the test-suite export since the addition of CMakeLists.txt was
causing build failures. This patch exports the test-suite again but does so
outside the source tree so that it isn't included in the Phase[123] builds.

Reviewers: hans

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16679

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259094 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-28 21:09:50 +00:00
Simon Pilgrim
10fe174ef8 [utils] Add windows support to update_llc_test_checks.py
Strip dos line endings from llc generated files to allow the regex patterns to match them.

Ensure updated *.ll files are generated with unix style line endings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 21:13:18 +00:00
Yunzhong Gao
4f57979e46 Add "/dev/tty" as a special file name for lit tests.
If a lit test has a RUN line that includes a redirection to "/dev/tty", the
redirection goes to the special device file corresponding to the console. It
is /dev/tty on UNIX-like systems and "CON" on Windows.

This patch is needed to implement a test like PR25717 (caused by the size limit
of the Windows system call WriteConsole() prior to Windows 8) where the test
only breaks when outputing to the console and won't fail if using a pipe.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258898 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 01:48:20 +00:00
Reid Kleckner
fa21741f38 [llvm-tblgen] Avoid StringMatcher for GCC and MS builtin names
This brings the compile time of Function.cpp from ~40s down to ~4s for
me locally. It also shaves off about 400KB of object file size in a
release+asserts build.

I also realized that the AMDGPU backend does not have any GCC builtin
names to match, so the extra lookup was a no-op. I removed it to silence
a zero-length string table array warning. There should be no functional
change here.

This change really ends the story of PR11951.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 01:43:12 +00:00
Hans Wennborg
89b5a6785f test-release.sh: Ignore LC_CTYPE in sed invocation on Darwin
Here, sed is used to prepare object files for comparison via cmp. On my Darwin
15.4.0 machine, LC_CTYPE is set to UTF-8 (by default, I believe). Under these
circumstances, anything sed is made to read will be treated as UTF-8, prompting
it to signal an error if it is not, like so:

% sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
sed: RE error: illegal byte sequence
1
%

To make sed work as expected, I need to set LC_CTYPE to C:

% env LC_CTYPE=C sed s/a/b/ <(head -n1 /dev/random) >/dev/null; echo $?
0
%

Without this change, sed will exit with an error for every single file that it
compares between phase 2 and phase 3, thereby making it look as if the
differences were far larger than they are.

Patch by Elias Pipping!

Differential Revision: http://reviews.llvm.org/D16548

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-27 00:19:05 +00:00
Reid Kleckner
80814c51f4 [llvm-tblgen] Stop emitting the intrinsic name matching code
The AMDGPU backend was the last user of the old StringMatcher
recognition code. Move it over to the new lookupLLVMIntrinsicName
funciton, which is now improved to handle all of the interesting edge
cases exposed by AMDGPU intrinsic names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 23:01:21 +00:00
Chris Bieneman
caeade4234 Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi

Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark

Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D16471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 21:29:08 +00:00
Eugene Zelenko
51ecde1f0a Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes.
Differential revision: reviews.llvm.org/D16568


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 18:48:36 +00:00
Reid Kleckner
fa883c2abc Sort intrinsics by LLVM intrinsic name, rather than tablegen def name
Step one towards using a simple binary search to lookup intrinsic IDs
instead of our crazy table generated switch+memcmp+startswith code that
makes Function.cpp take about a minute to compile.  See PR24785 and
PR11951 for why we should do this.

The X86 backend contains tables that need to be sorted on intrinsic ID,
so reorder those.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258757 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26 00:55:00 +00:00
Oliver Stannard
09f29b2ea4 [TableGen] Fix sort order of asm operand classes
This is a fix for https://llvm.org/bugs/show_bug.cgi?id=22796.

The previous implementation of ClassInfo::operator< allowed cycles of classes
such that x < y < z < x, meaning that a list of them cannot be correctly
sorted, and the sort order could differ with different standard libraries.

The original implementation sorted classes by ValueName if they were otherwise
equal. This isn't strictly necessary, but some backends seem to accidentally
rely on it. If I reverse this comparison I get 8 test failures spread across
the AArch64, Mips and X86 backends, so I have left it in until those backends
can be fixed.

There was one case in the X86 backend where the observable behaviour of the
assembler is changed by this patch. This was because some of the memory asm
operands were not marked as children of X86MemAsmOperand.

Differential Revision: http://reviews.llvm.org/D16141



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-25 10:20:19 +00:00
Craig Topper
aed38efd95 [TableGen] In AsmWriterEmitter unique command search, rather than storing a mapping from instruction to unique command, instead store a list of which instructions each unique command corresponds to.
This simplifies the complexity of the code that tries to find further operands to merge into the unique command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258656 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-24 07:13:28 +00:00
Craig Topper
a4f2978e0c [TableGen] Make a class member local to the function that populates it and consumes it later. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258490 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:59:43 +00:00
Craig Topper
43b79903fe [TableGen] Reorder fields in AsmWriterOperand to remove padding and reduce size. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:59:40 +00:00
Craig Topper
1c09f96ebe [TableGen] Remove the CGIOpNo from AsmWriterOperand as its not used for anything. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-22 05:59:37 +00:00
Dimitry Andric
ad24fed421 In test-release.sh, only run uname -s once. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 22:07:17 +00:00
Dimitry Andric
0ae89f95ca Let test-release.sh checkout subprojects directly into the target tree,
instead of using symlinks

Summary:
In the past I have run into several problems with the way
`test-release.sh` creates all the subproject directories as siblings,
and then uses symlinks to stitch them all together.  In some scenarios
this leads to clang not being able to find header files, etc.

This patch changes the script so it directly exports into the correct
target locations for each subproject.

Reviewers: hans

Subscribers: emaste, llvm-commits

Differential Revision: http://reviews.llvm.org/D16420

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-21 21:57:49 +00:00
Quentin Colombet
8a7d012332 [GlobalISel] Add a generic machine opcode for ADD.
The selection process being split into separate passes, we need generic opcodes
to translate the LLVM IR to target independent code.

This patch adds an opcode for addition: G_ADD.

Differential Revision: http://reviews.llvm.org/D15472


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 19:14:55 +00:00
Nico Weber
3c247736dd Fix undefined behavior in llvm's local changes to googletest.
r100895 landed an llvm-only change to add minix support to googletest.
It did that by putting "defined()" in a macro, which has undefined
behavior.  Slightly reshuffle things to remove that undefined behavior.
Also mention in README.LLVM that minix support is a local change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258190 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 21:22:36 +00:00
Hans Wennborg
f049f0721c test-release.sh: Use CMake also for Darwin
This didn't work for 3.7, but hopefully it should work now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258168 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19 19:21:58 +00:00
Craig Topper
401ee722ee [TableGen] Merge the SuperClass Record and SMRange vector into a single vector. This removes the state needed to manage the extra vector thus reducing the size of the Record class. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258065 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-18 19:52:37 +00:00
Craig Topper
8ce1d779bc [TableGen] Keep a returned const reference instead of making a copy. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 20:38:21 +00:00
Craig Topper
e4b8552199 [TableGen] Replace instructions() with getInstructionsByEnumValue(). No need to make an iterator_range when we already have a function that returns an ArrayRef. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 20:38:18 +00:00
Craig Topper
3356fb6f86 [TableGen] Return ArrayRef instead of a std::vector reference from getInstructionsByEnumValue(). NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 20:38:14 +00:00
Craig Topper
671078454d [TableGen] Use std::find instead of a manual loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 19:51:14 +00:00
Craig Topper
e0b4b2fd22 [TableGen] Use a StringRef instead of creating a new std::string. It gets passed to a function that takes a StringRef anyway. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 08:47:02 +00:00
Craig Topper
73251b7217 [TableGen] Changes to AsmWriterEmitter to remove the CodeGenInstruction to AsmWriterInst map. NFC
Adds the corresponding CodeGenInstruction number to each AsmWriterInst. Then write all the operand uniqueing loops using the AsmWriterInst array and indices. Then use the CodeGenInstruction index to fill out the OpCodeInfo array.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 08:05:33 +00:00
Craig Topper
9990e7de74 [TableGen] Use std::find instead of a manual loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-17 08:05:30 +00:00
Dimitry Andric
2f248688c9 Similar to rL257663, remove function keywords from export.sh and
tag.sh, since they are marked to be run with /bin/sh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257994 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-16 15:18:35 +00:00
Hans Wennborg
f75308f366 test-release.sh: Fix clang-tools-extra symlink for CMake build
The CMake and Autoconf builds want the symlink set up differently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257905 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 17:04:45 +00:00
Hans Wennborg
faaa9dde56 Exclude test-suite from CMake builds in test-release.sh
It's broken. In 3.7 there wasn't a CMake build for test-suite at all,
so we're not losing something we had before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 19:21:14 +00:00
Craig Topper
efefcdd53d [TableGen] Pass PassSubtarget flag into getCode instead of storing a copy of the flag in every AsmWriterOperand. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 06:15:07 +00:00
Dimitry Andric
307c714edd Remove bashism from merge.sh: POSIX sh does not have the function
reserved word, and it is even superfluous in bash, for this particular
instance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257663 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 19:48:50 +00:00
Hans Wennborg
a07c74ea61 Update version to 3.9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 17:32:32 +00:00
Dan Liew
5ef672de8d [lit] Fix handling of per test timeout when the installed psutil version
is < ``2.0``.

Older versions of psutil (e.g. ``1.2.1`` which is the version shipped with
Ubuntu 14.04) use a different API for retrieving the child processes.
To handle this try the new API first and if that fails try the old API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 16:43:49 +00:00
Craig Topper
cd0aefe26f [TableGen] Cleanup output formatting and add llvm_unreachables to the output the AsmMatcher uses when it overflows the 64-bit tables. No in tree targets use this code, but I tested it with an temporarily reduced table width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257583 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 07:20:13 +00:00
Craig Topper
05bdb7c886 [TableGen] Replace some hardcoded assumptions that the OpcodeInfo table is 64-bits for cleanliness. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257582 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 07:20:12 +00:00
Craig Topper
abfd63051d [TableGen] Use std::remove_if instead of an n^2 loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257581 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 07:20:10 +00:00
Craig Topper
cdef20c37c [TableGen] Fix up some stale comments in the AsmMatcher. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257580 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 07:20:07 +00:00
Craig Topper
ced4b139cd [TableGen] Move calls to getValueAsInt out of a loop since they aren't simple functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-13 07:20:05 +00:00
Craig Topper
d05b60850b [TableGen] Allow asm writer to use up to 3 OpInfo tables instead of 2. This allows x86 to use 56 total bits made up of a 32-bit, 16-bit, and 8-bit table. Previously we were using 64 total bits.
This saves 14K from the x86 table size. And saves space on other targets as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 05:13:41 +00:00
Craig Topper
db6f0c6ae0 [TableGen] Remove unnecessary 0 terminator from an array that only existed to prevent ending an array with a comma. But that's perfectly legal and not something we need to prevent. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 05:13:38 +00:00
Craig Topper
b2e58d7b03 [TableGen] Remove a few spaces from AsmMatcher output. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-11 02:11:36 +00:00
Dan Liew
6966456067 Revert "Teach the CMake build system to run lit's test suite. These can be run"
This reverts r257221.

This caused several build bot failures

* It looks like some of the tests don't work correctly under Windows
* It looks like the lit per test timeout tests fail

So I'm reverting for now. Once the above failures are fixed running
lit's tests can be enabled again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257268 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-09 21:42:57 +00:00
Dan Liew
ad637ba2fd Teach the CMake build system to run lit's test suite. These can be run
directy with ``make check-lit`` and are run as part of
``make check-all``.

In principle we should run lit's testsuite before testing LLVM using lit
so that any problems with lit get discovered before testing LLVM so we
can bail out early.  However this implementation (``check-all`` runs all
tests together) seemed simpler and will still report failing lit tests.

Note that the tests and the configured ``lit.site.cfg`` have to be
copied into the build directory to avoid polluting the source tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08 22:36:22 +00:00
Craig Topper
616141238d [TableGen] Use range-based for loops. Also fix one loop to not use some index name as an outer loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257156 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08 07:06:32 +00:00
Craig Topper
d028f0c94b [TableGen] Combine variable declaration and initialization. Move a string into a vector instead of copying. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257155 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-08 07:06:29 +00:00
Michael Liao
8b10213fae Modernize to range-based loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257037 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-07 07:58:25 +00:00
Craig Topper
d149f59b51 [TableGen] Call llvm_shutdown on exit so that all the ManagedStatic objects in the support library will be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-04 04:51:51 +00:00
Craig Topper
07466510a7 [TableGen] Simplify some code slightly. No need to check if the arrays are empty before printing. The loop can be made to print the same thing if the loop is empty. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-03 08:57:41 +00:00
Craig Topper
4d34e548af [TableGen] Replace a logically negated xor of bools with just an equality comparison for readability. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256699 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-03 07:33:39 +00:00
Craig Topper
9bb66bd6f5 [TableGen] Use std::find_if and a lambda instead of manual loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-03 07:33:36 +00:00
Craig Topper
8dd99ee81d [TableGen] Fix a bug introduced in r256627. If the switch was not emitted we still emitted a closing curly brace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-03 07:33:34 +00:00
Craig Topper
4d0e40564f [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256696 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-03 07:33:30 +00:00
Craig Topper
5ef134945b [TableGen] Modify the AsmMatcherEmitter to only apply the table growth from r252440 to the Hexagon target.
This restores the previous behavior of not including the mnemonic in the classes table for every target that starts instruction lines with the mnemonic. Not only did the table size increase by 1 entry, but the class enum increased in size which caused every class in the array to increase in size. It also grew the size of the function that parsers tokens into classes by a substantial amount.

This adds a new HasMnemonicFirst flag to all AsmParsers. It's set to 1 by default and Hexagon target overrides it to 0.

For the X86 target alone this recovers 324KB of size on the llvm-mc executable.

I believe the current state is still a bad design choice for the Hexagon target as it causes most of the parsing to do a linear search through the entire match table to comparing operands against every instruction until it finds one that works. At least for the other targets we do a binary search based on mnemonic over which to do the linear scan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256669 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-31 08:18:23 +00:00
Craig Topper
1159059a91 [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256668 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-31 08:18:20 +00:00
Craig Topper
ee721e9867 [TableGen] Move determination of IsIsolatedToken into the tokenizer instead of trying to search characters around the token. No functional change intended. Verified for in-tree targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256660 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-31 05:01:45 +00:00
Craig Topper
db4180cc21 [TableGen] Remove unnecessary conversion from StringRef to std::string when outputting to a raw_ostream. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256628 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-30 06:00:24 +00:00
Craig Topper
e18e2bb916 [TableGen] Remove raw_string_ostream by just emitting the header for the switch the first time we emit a case. If the header was never emitted just print the default at the end. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256627 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-30 06:00:22 +00:00
Craig Topper
65438a7a79 [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256626 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-30 06:00:20 +00:00
Craig Topper
e6b50232bc [TableGen] Move more things that come from variant into the AsmVariantInfo class so we can reduce some parameters. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256625 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-30 06:00:18 +00:00
Craig Topper
a1a9b68880 [TableGen] Use 'size_t' instead of 'unsigned' to better match the argument types of addAsmOperand. Simplify some code by using StringRef::find instead of std::find. These were previously done in r247527 and r247528, but another commit seems to have erased them. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256624 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-30 06:00:15 +00:00
Craig Topper
cf09bdf62e De-virtualize mnemonicIsValid and remove from the base class. It's not called by any common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256544 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-29 07:43:03 +00:00
Craig Topper
98a6307b5a [TableGen] Add missing space to output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256540 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-29 07:03:25 +00:00
Craig Topper
300c966c18 [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256539 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-29 07:03:23 +00:00
Manuel Jacob
aa64145119 [vim] Add token type to Vim syntax file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256512 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-28 19:51:04 +00:00
Dan Liew
d3bcf04e83 [lit] Implement support of per test timeout in lit.
This should work with ShTest (executed externally or internally) and GTest
test formats.

To set the timeout a new option ``--timeout=`` has
been added which specifies the maximum run time of an individual test
in seconds. By default this 0 which causes no timeout to be enforced.

The timeout can also be set from a lit configuration file by modifying
the ``lit_config.maxIndividualTestTime`` property.

To implement a timeout we now require the psutil Python module if a
 timeout is requested. This dependency is confined to the newly added
 ``lit.util.killProcessAndChildren()``. A note has been added into the
 TODO document describing how we can remove the dependency on the
 ``pustil`` module in the future. It would be nice to remove this
 immediately but that is a lot more work and Daniel Dunbar believes it is
better that we get a working implementation first and then improve it.

To avoid breaking the existing behaviour the psutil module will not be
imported if no timeout is requested.

The included testcases are derived from test cases provided by
 Jonathan Roelofs which were in an previous attempt to add a per test
 timeout to lit (http://reviews.llvm.org/D6584). Thanks Jonathan!

Reviewers: ddunbar, jroelofs, cmatthews, MatzeB

Subscribers: cmatthews, llvm-commits

Differential Revision: http://reviews.llvm.org/D14706

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256471 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-27 14:03:49 +00:00
Asaf Badouh
5c7343b3a6 [X86][PKU] Add {RD,WR}PKRU encoding
Differential Revision: http://reviews.llvm.org/D15711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256366 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-24 08:25:00 +00:00
Akira Hatanaka
37de9d09f1 Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r256277 with two changes:

- In emitFnAttrCompatCheck, change FuncName's type to std::string to fix
  a use-after-free bug.
- Remove an unnecessary install-local target in lib/IR/Makefile. 

Original commit message for r252949:

Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256304 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 23:57:37 +00:00
Dan Gohman
ee0835002c Add an OperandNamespace field to Target.td's Operand.
For targets to add their own operand types as needed, as advertised in
Operand's comment, they need to be able to specify an alternate namespace
for OperandType names too. This matches the RegisterOperand class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256299 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 23:37:37 +00:00
Nico Weber
5579d13f95 lit: Limit number of processes on Windows to 32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 23:12:00 +00:00
Akira Hatanaka
4a8b38c05b Revert r256277 and r256279.
Some of the bots failed again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256280 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 20:29:09 +00:00
Akira Hatanaka
a4912f5755 Provide a way to specify inliner's attribute compatibility and merging.
This reapplies r252990 and r252949. I've added member function getKind
to the Attr classes which returns the enum or string of the attribute.

Original commit message for r252949:

Provide a way to specify inliner's attribute compatibility and merging
rules using table-gen. NFC.

This commit adds new classes CompatRule and MergeRule to Attributes.td,
which are used to generate code to check attribute compatibility and
merge attributes of the caller and callee.

rdar://problem/19836465


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256277 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 20:00:05 +00:00