Commit Graph

5702 Commits

Author SHA1 Message Date
Matthias Braun
3b74a145c8 TableGen: Support lanemasks for classes without subregisters
Previously using lanemasks on registers without any subregisters was not
well defined. This commit extends TargetRegisterInfo/tablegen to:
- Report a lanemask of 1 for regclasses without subregisters
- Do the right thing when mapping a 0/1 lanemask from a class without
  subregisters into a class with subregisters in
  TargetRegisterInfo::composeSubRegIndexLaneMasks().

This will be used in the upcoming "DetectDeadLanes" patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-28 03:07:04 +00:00
Zachary Turner
6efffd31d2 Add natvis visualizers for endian types.
This allows ulittle* and ubig* types to be visualized properly
in VS.

Differential Revision: http://reviews.llvm.org/D19339
Reviewed By: Aaron Ballman

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 20:58:41 +00:00
Nicolai Haehnle
a7af0d6280 Split IntrReadArgMem into IntrReadMem and IntrArgMemOnly
Summary:
IntrReadWriteArgMem simply becomes IntrArgMemOnly.

So there are fewer intrinsic properties that express their orthogonality
better, and correspond more closely to the corresponding IR attributes.

Suggested by: Philip Reames

Reviewers: joker.eph, reames, tstellarAMD

Subscribers: jholewinski, arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267021 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-21 17:48:02 +00:00
Amaury Sechet
7b1322cacb Add LLVMGetAttrKindID in the C API in order to facilitate migration away from LLVMAttribute
Summary:
LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values.

See D18749 for reference.

Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-20 01:02:12 +00:00
Nicolai Haehnle
318d6a2351 Add IntrWrite[Arg]Mem intrinsic property
Summary:
This property is used to mark an intrinsic that only writes to memory, but
neither reads from memory nor has other side effects.

An example where this is useful is the llvm.amdgcn.buffer.store.format.*
intrinsic, which corresponds to a store instruction that goes through a special
buffer descriptor rather than through a plain pointer.

With this property, the intrinsic should still be handled as having side
effects at the LLVM IR level, but machine scheduling can make smarter
decisions.

Reviewers: tstellarAMD, arsenm, joker.eph, reames

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 21:58:33 +00:00
Nicolai Haehnle
39980d6882 [TableGen] Make an error message slightly more informative
Reviewers: ab, spop, stoklund

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266823 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 21:58:10 +00:00
Saleem Abdulrasool
decc22f16d vim: add swiftcc keyword
Update the syntax highlighting for SVN r265480.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-19 02:04:01 +00:00
Mehdi Amini
f6071e14c5 [NFC] Header cleanup
Removed some unused headers, replaced some headers with forward class declarations.

Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'

Patch by Eugene Kosov <claprix@yandex.ru>

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

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-18 09:17:29 +00:00
Craig Topper
ca89139c6d Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes from TargetLoweringBase and probably other places.
This required changing several places to print VT enums as strings instead of raw ints since the proper method to use to print became ambiguous. This is probably an improvement anyway.

This also appears to save ~8K from an x86 self host build of llc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266562 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-17 17:37:33 +00:00
Richard Smith
43ef70d524 Update and fix LLVM_ENABLE_MODULES:
1) We need to add this flag prior to adding any other, in case the user has
specified a -fmodule-cache-path= flag in their custom CXXFLAGS. Such a flag
causes -Werror builds to fail, and thus all config checks fail, until we add
the corresponding -fmodules flag. The modules selfhost bot does this, for
instance.

2) Delete module maps that were putting .cpp files into modules.

3) Enable -fmodules-local-submodule-visibility, to get proper module
visibility rules applied across submodules of the same module. Disable
-fmodules for C builds, since that flag is not available there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-16 00:48:58 +00:00
Amaury Sechet
609cf3b89c Revert "Add LLVMGetAttrKindIDInContext in the C API in order to facilitate migration away from LLVMAttribute"
This reverts commit 0bcfd95c268bcb180a525e1837e84475df8acdc7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266259 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-13 23:01:39 +00:00
Amaury Sechet
2af3e8f798 Add LLVMGetAttrKindIDInContext in the C API in order to facilitate migration away from LLVMAttribute
Summary: LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values.

Reviewers: Wallbraker, whitequark, joker.eph, echristo

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-13 22:51:40 +00:00
JF Bastien
4734513b3a Delete mergefunctions.clang.svn.patch
The patch doesn't apply, and was removed from zorg by rL266094.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266112 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 19:44:40 +00:00
Junmo Park
dcd4d749c1 Minor code cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-12 06:02:11 +00:00
Saleem Abdulrasool
1ebdc6b129 vim: add missing keyword
`source_filename` was introduced as a keyword in SVN r264884, but the syntax
file was not updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265572 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-06 17:42:16 +00:00
Sanjay Patel
3a27360c9d fixed to discard earlier advertising
Also, hardcode (there must be a better way...) the 'utils' dir in the 
advertisement, so it's easier to find.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 19:50:21 +00:00
Sanjay Patel
d8f98f3e4e add example usage and workflow to --help output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265430 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 18:00:47 +00:00
Sanjay Patel
4d9b8c9ce1 check or check-next the first line of the function too
We could make this an option if people don't like it. 
But since part of the reason for using a script to generate
checks is to prevent lazy checking that lets bugs crawl 
through, let's have the script check the first line too. 

For asm tests, it ensures that nothing unexpected has 
happened before the first line of asm. This matches the
existing behavior of update_llc_test_checks.py. 

More discussion in PR22897:
https://llvm.org/bugs/show_bug.cgi?id=22897



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 16:49:07 +00:00
Valery Pykhtin
89372a56d6 [TableGen] AsmMatcherEmitter.cpp: replace a sequence of "if" to "switch" in emitValidateOperandClass.
Differential Revision: http://reviews.llvm.org/D18394

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 16:18:16 +00:00
Matthias Braun
44f51d9b56 lit: python3 compatibility fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265070 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-31 23:08:55 +00:00
Daniel Dunbar
30a91fe472 [lit][googletest] Handle upstream gtest output
Summary:
Upstream googletest prints "Running main() from gtest_main.cc" to stdout prior
to running tests. LLVM removed that print statement in r61540. If a user were
to use lit to run tests that use upstream googletest, however, lit
reports "Running main()" as an invalid test name.

To avoid such a failure, add an extra conditional to `formats/googletest.py`.
Also add tests to demonstrate the modified behavior.

Reviewers: abdulras, ddunbar

Subscribers: ddunbar, llvm-commits, kastiglione

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-31 18:22:55 +00:00
Mike Spertus
2a8d48af30 Submitted new file with wrong line endings. Correcting...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264620 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 19:06:17 +00:00
Mike Spertus
b2c8f180f9 Use VS2015 Project Support for Natvis to eliminate the need to manually install natvis files
When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations.
Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264601 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-28 17:58:38 +00:00
Sanjay Patel
044daf4379 workaround for an IR variable named %.
(which SimplifyCFG can produce...)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 20:44:35 +00:00
Sanjay Patel
a21dabc498 add scrubber for excessive leading whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264542 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-27 20:43:02 +00:00
Matthias Braun
abcfbb3c69 abtest: Cleanup, improve comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 04:07:55 +00:00
Matthias Braun
4508f5d028 abtest: Check all files, improve announcements
Simply searching for gooddir/* and baddir/* instead of *.s the script
should also work with .o files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 00:36:58 +00:00
Matthias Braun
b56f8c310d Put my abtest scripts into the util directory
See http://lists.llvm.org/pipermail/llvm-dev/2016-March/097640.html
There is also a description/tutorial in the comments of the abtest.py
file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-26 00:23:59 +00:00
Sanjay Patel
1ffcfe8d01 fix IR function name regex to allow hyphens
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 17:00:12 +00:00
Sanjay Patel
79b059889d Add utility script to generate checks for opt or llc regression tests
This is an enhancement of the existing update_llc_test_checks.py script.
It adds some of the functionality from the script used in D17999 to make
the IR checking more flexible.

The bad news: 
This actually is 'My First Python Program'. Thus, it's likely that I have
violated all best practices of Python programming if I've made a functional
change from the original program. If you see anything that's obviously 
wrong, please let me know or feel free to fix it. I didn't even read any
documentation...

The good news: 
I tested this on ~10 existing opt/llc regression tests, and it does what 
I hoped for. It produces exact checking for IR regression tests and doesn't
signficantly change the existing llc-with-x86-target asm checking. The opt
tests that were modified in r263667, r263668, r263674, and r263679 are
examples of the expected results, except that this version of the script 
puts the check lines ahead of the IR to follow the existing llc/asm 
behavior.

If there are no complaints/fallout, we should be able to remove the 
original script. Extending this script to be used for non-x86 and clang
regression tests would be the expected follow-up steps.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264357 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 23:19:26 +00:00
Sanjay Patel
8674e1c5a3 don't hardcode the name of the llc checks script
We lose the 'utils' directory name in our advertising line with
this change. We could retain that, but I don't see the point.
This removes a dependency for making the script apply to more than
'llc'. Ie, we'll want to change the script name if it works with 
opt/clang too.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264310 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:30:38 +00:00
Sanjay Patel
002b8db36a reorganize llc checks script to allow more flexibility, part 2; NFCI
The goal is to enhance this script to be used with opt and clang:
Break 'main' into functions and change variable names to be more
generic because we want to handle more than x86 asm output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-24 17:15:42 +00:00
Sanjay Patel
c062937b5e reorganize llc checks script to allow more flexibility; NFCI
The goal is to enhance this script to be used with opt and clang:
Group all of the regexes together, so it's easier to see what's going on.
This will make it easier to break main() up into pieces too. 
Also, note that some of the regexes are for x86-specific asm. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-23 21:40:53 +00:00
Mike Spertus
67bf5dd452 Typesafe visualization of PointerIntPairs in Visual Studio
In the <DisplayString> of PointerIntPair , I cast the pointer to the actual type, so VS can leverage it while visualizing, not unlike the recent change to PointerUnion visualization.
In the expansion, the current code is casting to the incorrect type (wrong number of stars), so I fixed that as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263821 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-18 20:06:16 +00:00
Filipe Cabecinhas
e2a5365d55 [lit] Enqueue tests on a separate thread to not hit limits on parallel queues
Summary:
The multiprocessing.Queue.put() call can hang if we try queueing all the
tests before starting to take them out of the queue.
The current implementation hangs if tests exceed 2^^15, on Mac OS X.
This might happen with a ninja check-all if one has a bunch of llvm
projects.

Reviewers: delcypher, bkramer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-17 18:27:33 +00:00
Chandler Carruth
cdb6339f8b [lit] Hack lit to allow a test suite to request that it is run "early".
This lets us for example start running the unit test suite early. For
'check-llvm' on my machine, this drops the tim e from 44s to 32s!!!!!

It's pretty ugly. I barely know how to write Python, so feel free to
just tell me how I should write it instead. =D Thanks to Filipe and
others for help.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263329 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-12 03:03:31 +00:00
Mike Spertus
fcb50867e5 Type correct Visual Studio native visualization for PointerUnions
Visualize pointer unions by their actual type rather than as void *.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 18:26:47 +00:00
Nicolai Haehnle
5dae380620 [TableGen] more helpful error message in MapTableEmitter
Differential Revision: http://reviews.llvm.org/D17275

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-10 18:51:58 +00:00
Craig Topper
4016ad20d2 [CodeGen] Add space-optimized EmitMergeInputChains1_2 to the DAG isel matching tables. Shaves about 5100 bytes from the X86 matcher table. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-07 07:29:12 +00:00
Matthias Braun
0101cb0a0b TableGen: Accept itinerary data when checking for schedmodel completeness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262548 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-03 00:04:59 +00:00
Matthias Braun
3b1588aa81 TableGen: Display helpfull message for incomplete models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 21:36:12 +00:00
Matthias Braun
eab2869a64 TableGen: Check scheduling models for completeness
TableGen checks at compiletime that for scheduling models with
"CompleteModel = 1" one of the following holds:

- Is marked with the hasNoSchedulingInfo flag
- The instruction is a subclass of Sched
- There are InstRW definitions in the scheduling model

Typical steps necessary to complete a model:

- Ensure all pseudo instructions that are expanded before machine
  scheduling (usually everything handled with EmitYYY() functions in
  XXXTargetLowering).
- If a CPU does not support some instructions mark the corresponding
  resource unsupported: "WriteRes<WriteXXX, []> { let Unsupported = 1; }".
- Add missing scheduling information.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:03:21 +00:00
Matthias Braun
279476d30d TableGen: Add hasNoSchedulingInfo to instructions
This introduces a new flag that indicates that a specific instruction
will never be present when the MachineScheduler runs and therefore needs
no scheduling information.

This is in preparation for an upcoming commit which checks completeness
of a scheduling model when tablegen runs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 20:03:11 +00:00
Nikolay Haustov
344528bfec [TableGen] AsmMatcher: Skip optional operands in the midle of instruction if it is not present
Previosy, if actual instruction have one of optional operands then other optional operands listed before this also should be presented.
For example instruction v_fract_f32 v0, v1, mul:2 have one optional operand - OMod and do not have optional operand clamp. Previously this was not allowed because clamp is listed before omod in AsmString:

string AsmString = "v_fract_f32$vdst, $src0_modifiers$clamp$omod";
Making this work required some hacks (both OMod and Clamp match classes have same PredicateMethod).

Now, if MatchInstructionImpl meets formal optional operand that is not presented in actual instruction it skips this formal operand and tries to match current actual operand with next formal.

Patch by: Sam Kolton

Review: http://reviews.llvm.org/D17568

[AMDGPU] Assembler: Check immediate types for several optional operands in predicate methods
With this change you should place optional operands in order specified by asm string:

clamp -> omod
offset -> glc -> slc -> tfe
Fixes for several tests.
Depends on D17568

Patch by: Sam Kolton

Review: http://reviews.llvm.org/D17644

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-01 08:34:43 +00:00
Paul Robinson
5dc46f59dd Reapply r262092: [FileCheck] Abort if -NOT is combined with another suffix.
Combinations of suffixes that look useful are actually ignored;
complaining about them will avoid mistakes.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 22:13:03 +00:00
Daniel Sanders
0562fb318f [test-release.sh] Add lldb to list of projects (disabled by default)
Reviewers: hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-29 11:04:39 +00:00
Paul Robinson
05af933abd Revert r262092, caught LLD tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:44:10 +00:00
Paul Robinson
ede28b79ea [FileCheck] Abort if -NOT is combined with another suffix.
Combinations of suffixes that look useful actually are ignored;
complaining about them will avoid mistakes.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-26 23:34:02 +00:00
Igor Breger
7f2251533a AVX512F: Add GATHER/SCATTER assembler Intel syntax tests for knl/skx/avx . Change memory operand parser handling.
Differential Revision: http://reviews.llvm.org/D17564

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261862 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-25 13:30:17 +00:00
Xinliang David Li
2c17b9c60c Fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261672 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-23 19:18:21 +00:00