Commit Graph

5592 Commits

Author SHA1 Message Date
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
Chih-Hung Hsieh
3a1999a311 [X86] Part 2 to fix x86-64 fp128 calling convention.
Part 1 was submitted in http://reviews.llvm.org/D15134.
Changes in this part:
* X86RegisterInfo.td, X86RecognizableInstr.cpp: Add FR128 register class.
* X86CallingConv.td: Pass f128 values in XMM registers or on stack.
* X86InstrCompiler.td, X86InstrInfo.td, X86InstrSSE.td:
  Add instruction selection patterns for f128.
* X86ISelLowering.cpp:
  When target has MMX registers, configure MVT::f128 in FR128RegClass,
  with TypeSoftenFloat action, and custom actions for some opcodes.
  Add missed cases of MVT::f128 in places that handle f32, f64, or vector types.
  Add TODO comment to support f128 type in inline assembly code.
* SelectionDAGBuilder.cpp:
  Fix infinite loop when f128 type can have
  VT == TLI.getTypeToTransformTo(Ctx, VT).
* Add unit tests for x86-64 fp128 type.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255558 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14 22:08:36 +00:00
Ben Craig
49f241bc5a Reordering fields to reduce padding in LLVM. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255554 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-14 21:57:05 +00:00
Hal Finkel
f7649afaba [TableGen] Correct Namespace lookup with AltNames in AsmWriterEmitter
AsmWriterEmitter will generate a getRegisterName function with an alternate
register name index as its second argument if the target makes use of them. The
enum of these values is generated in RegisterInfoEmitter. The getRegisterName
generator would assume the namespace could always be found by reading index 1
of the list of AltNameIndices, but this will fail if this list is sorted such
that the NoRegAltName is at index 1. Because this list is sorted by record name
(in CodeGenTarget::ReadRegAltNameIndices), you only run in to problems if your
MyTargetRegisterInfo.td defines a single RegAltNameIndex that sorts lexically
before NoRegAltName.

For example, if a target has something like

  def AnAltNameIndex : RegAltNameIndex

and defines RegAltNameIndices for some registers then, prior to this change,
AsmWriterEmitter would generate references to

  ::AnAltNameIndex and ::NoRegAltName

Patch by Alex Bradbury!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255344 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-11 17:31:27 +00:00
Hans Wennborg
0dbeff1e73 Check in the script for building Win snapshots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255318 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-11 00:43:42 +00:00
Alexey Bataev
5ebd7badfb [OPENMP] Make -fopenmp to turn on OpenMP support by default.
Patch turns on OpenMP support in clang by default after fixing OpenMP buildbots.
Differential Revision: http://reviews.llvm.org/D13802


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255222 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-10 05:45:58 +00:00
Craig Topper
e6bc7d1f0d Use make_range to reduce mentions of iterator type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254872 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-06 05:08:07 +00:00
Craig Topper
79402ee6f9 Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254843 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-05 07:13:35 +00:00
Craig Topper
15766ec566 [TableGen] Remove an assumption about the order of encodings in the MVT::SimpleValueType enum. Instead of assuming the types are sorted by size, scan the typeset arrays to find the smallest/largest type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254589 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-03 05:57:37 +00:00
Oliver Stannard
ce8e2a0d91 [AArch64] Add ARMv8.2-A Statistical Profiling Extension
The Statistical Profiling Extension is an optional extension to
ARMv8.2-A. Since it is an optional extension, I have added the
FeatureSPE subtarget feature to control it. The assembler-visible parts
of this extension are the new "psb csync" instruction, which is
equivalent to "hint #17", and a number of system registers.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254401 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-01 10:48:51 +00:00
Craig Topper
b51ae5ef11 [TableGen] Use SmallString instead of std::string to build up a string to avoid heap allocations. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254221 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-28 08:23:02 +00:00