Commit Graph

59388 Commits

Author SHA1 Message Date
Alexey Bataev 10e775f4a8 [OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.

llvm-svn: 243635
2015-07-30 11:36:16 +00:00
Michael Kuperstein 2229ca71fd [X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
This contains the test-case for r243630.

Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11513

llvm-svn: 243632
2015-07-30 10:10:47 +00:00
Sean Silva de3816655a Add a comment explaining differing Windows behavior.
llvm-svn: 243625
2015-07-30 07:30:24 +00:00
Sean Silva 5a45222745 Enable accidentally-disabled tests.
I think I was isolating the failure in the last RUN: line during
development, and forgot to re-enable the others.

llvm-svn: 243624
2015-07-30 07:23:17 +00:00
Asaf Badouh d6cb100bc2 [X86][AVX512BW] Remove whitespaces
llvm-svn: 243623
2015-07-30 06:52:26 +00:00
Richard Smith bdf2d93fe9 Remove some noise "this->"s left behind by r243213.
llvm-svn: 243614
2015-07-30 03:37:16 +00:00
Richard Smith f02662dec0 [modules] Remove redundant information written into DeclContext name lookup tables. We don't need to store the data length twice.
llvm-svn: 243612
2015-07-30 03:17:16 +00:00
Sean Silva 00bd0a4034 Remove bad test.
We currently don't canonicalize paths in the preprocessed files.
But we do when writing to PCH.
This causes a discrepancy on Windows with the test below.
This test fails even on unix if you change the test to use
`%S//preprocess.h`.

I am led to conclude that the invariant that this test was intending to
test has not been upheld for a while (and may never have been).

llvm-svn: 243602
2015-07-30 01:21:56 +00:00
Sean Silva 3e36e507ec Attempt to make clang-x64-ninja-win7 happy.
It looks like we were somehow relying somewhere on removing 'foo/./bar'
but *not* 'foo/../foo/bar'. Currently investigating.

llvm-svn: 243600
2015-07-30 00:52:32 +00:00
Sean Silva b963dedbe8 Avoid failure to canonicalize '..'.
Also fix completely broken and untested code which was hiding the
primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op.

I ran into this in the wild. It was causing failures in our SDK build.

Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this
is a step in the right direction, and fixes an obviously broken case.
In some sense the test case I've added here is an integration test. We
should have these routines thoroughly unit tested in llvm::sys::fs.

llvm-svn: 243597
2015-07-30 00:26:34 +00:00
Richard Trieu 1993dc8b15 Fix -Wredundant-move warning.
Without DR1579 implemented, the only case for -Wredundant-move is for a
parameter being returned with the same type as the function return type.  Also
include a check to verify that the move constructor will be used by matching
nodes in the AST dump.

llvm-svn: 243594
2015-07-29 23:47:19 +00:00
Richard Smith 826711d456 [modules] When performing redeclaration lookup for a using declaration, prefer
UsingShadowDecls over other declarations of the same entity in the lookup
results. This ensures that we build correct redeclaration chains for the
UsingShadowDecls (otherwise we could see assertions and other misbehavior in
modules builds, when merging combines multiple redeclaration chains for the
same entity from the same module into one chain).

llvm-svn: 243592
2015-07-29 23:38:25 +00:00
Davide Italiano 9b950d8148 [SemaAccess] Provide meaningful message when we hit llvm_unreachable().
llvm-svn: 243571
2015-07-29 20:55:04 +00:00
Douglas Katzman 57a9c7eba5 Use the AddAllArgs overload which accepts an ArrayRef of OptSpecifier.
Differential Revision: http://reviews.llvm.org/D11599

llvm-svn: 243552
2015-07-29 18:39:14 +00:00
Richard Trieu 6093d143c5 Disable -Wpessimizing-move and -Wredundant-move in template instantiations.
Dependent types can throw off the analysis for these warnings, possibly giving
conflicting warnings and fix-its.  Disabling the warning in template
instantiations will prevent this problem, and will still catch the
non-dependent cases in templates.

llvm-svn: 243538
2015-07-29 17:03:34 +00:00
Yaron Keren 04da2385cf In case of an existing GlobalVariable, the comdat is created using the name of the
new GV (usually NAME.1) instead of the correct NAME of the old GV. Moving comdat
creation after GV replacement solves this. Patch + testcase.

Reviewed by Reid Kleckner.

http://reviews.llvm.org/D11594

llvm-svn: 243525
2015-07-29 15:42:28 +00:00
Yaron Keren 63afb67992 Make this test target x86_64-pc-windows-gnu as well.
llvm-svn: 243523
2015-07-29 15:28:02 +00:00
Akira Hatanaka 085da7ecae [AArch64] Pass subtarget feature "+strict-align".
This commit changes the driver to save subtarget feature "+strict-align"
to the IR instead of using backend option "aarch64-strict-align". This is
needed for LTO.

rdar://problem/21529937

llvm-svn: 243518
2015-07-29 14:25:58 +00:00
Yaron Keren e46f7ed695 Remove unnecessary variable.
llvm-svn: 243517
2015-07-29 14:21:47 +00:00
Asaf Badouh 1998eb2077 [X86][AVX512BW] add convert i16 to i8 and unpack intrinsics
Differential Revision: http://reviews.llvm.org/D11564

llvm-svn: 243514
2015-07-29 12:34:20 +00:00
Asaf Badouh a6c31703ac [X86][AVX512BW] Replace attributes with __DEFAULT_FN_ATTRS
llvm-svn: 243512
2015-07-29 12:22:19 +00:00
Akira Hatanaka 7651dd8359 [ARM] Pass subtarget feature "+strict-align".
This commit changes the driver to save subtarget feature "+strict-align" to the
IR instead of using backend option "arm-strict-align". This is needed for LTO.

Also, move the logic in ARM backend that was deciding whether strict alignment
should be forced to the front-end.

rdar://problem/21529937

http://reviews.llvm.org/D11472

llvm-svn: 243489
2015-07-28 22:26:45 +00:00
Artem Belevich baae093e49 Silence unused argument warning for --cuda-host-only.
Differential Revision: http://reviews.llvm.org/D11575

llvm-svn: 243479
2015-07-28 21:01:30 +00:00
Artem Belevich 4242f41d8a --cuda-host-only should not disable linking phase.
Host-only cuda compilation does produce valid host object
file and in some cases users do want to proceed on to the linking phase.
The change removes special case that stopped compilation pipeline at
the Assembly phase. Device-side compilation is still stopped early
by the types::getCompilationPhases().

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

llvm-svn: 243478
2015-07-28 21:01:21 +00:00
Richard Trieu 97c45b6588 Use an iterative method instead of recursion for printing macro backtraces.
Store the locations for a macro expansion in a vector, then iterate over them
instead of using recursion.  This simplifies the logic around the backtrace
limit and gives easier access to the source locations.  No functionality change.

Patch by Zhengkai Wu.

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

llvm-svn: 243477
2015-07-28 20:53:46 +00:00
Richard Trieu 8d4006a079 Do not give a -Wredundant-move warning when removing the move will result in an
error.

If the object being moved has a move constructor and a deleted copy constructor,
std::move is required, otherwise Clang will give a deleted constructor error.

llvm-svn: 243463
2015-07-28 19:06:16 +00:00
Argyrios Kyrtzidis e159a73c76 [test] Follow-up for r243119, also add a test case using property methods.
llvm-svn: 243455
2015-07-28 17:38:51 +00:00
Nico Weber 5672e67b14 Rename -Wmsvc-include to -Wmicrosoft-include, now that -Wmicrosoft is split up.
(Keep -Wmsvc-include around as an alias.)

While here, also replace the one other mention of "MSVC" in diagnostics with
"Microsoft", for consistency.

llvm-svn: 243444
2015-07-28 16:48:12 +00:00
Chih-Hung Hsieh 2c656c9417 Add -femulated-tls flag to select the emulated TLS model.
This will be used for old targets like Android that do not
support ELF TLS models.

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

llvm-svn: 243441
2015-07-28 16:27:56 +00:00
Benjamin Kramer 9938310ab3 [CodeGen] Simplify creation of shuffle masks.
No functional change intended.

llvm-svn: 243439
2015-07-28 16:25:32 +00:00
Piotr Padlewski 44b4ce8e9b Getting rid of old iterator loops
llvm-svn: 243431
2015-07-28 16:10:58 +00:00
Manuel Klimek 9e32199861 Do not force linebreaks when MaxEmptyLinesToKeep is 0.
Previously we would format
 call(

     p);
as
 call(
     p);
with MaxEmptyLinesToKeep == 0.

Now we format it as:
  call(p);

llvm-svn: 243429
2015-07-28 15:50:24 +00:00
Benjamin Kramer c385a808b8 [CodeGen] Clean up CGBuiltin a bit.
- Use cached LLVM types
- Turn SmallVectors into Arrays/ArrayRef if the size is static
- Use ConstantInt::get's implicit splatting for vector types

No functionality change intended.

llvm-svn: 243425
2015-07-28 15:40:11 +00:00
Kristof Beyls 918f8ab7c6 RegParmMax must be 0 for AArch64, as the regparm function attribute is not supported on AArch64.
llvm-svn: 243417
2015-07-28 14:23:47 +00:00
Adhemerval Zanella 3916c910d1 [AArch64] Implement __builtin_thread_pointer
This path add the aarch64 __builtin_thread_pointer support.  It will be
lowered to llvm.aarch64.thread.pointer.

llvm-svn: 243413
2015-07-28 13:10:10 +00:00
Asaf Badouh 93aa4c808a [X86][AVX512VL] add AVX512VL intrinsics 4 out of 4
Differential Revision: http://reviews.llvm.org/D11526

llvm-svn: 243409
2015-07-28 12:04:40 +00:00
Asaf Badouh b7cf71b63d [X86][AVX512VL] add AVX512VL intrinsics 3 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243406
2015-07-28 11:14:09 +00:00
Asaf Badouh 78ee5cc8e1 [X86][AVX512VL] add AVX512VL intrinsics 2 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243402
2015-07-28 10:30:56 +00:00
Alexandros Lamprineas e5b47640ee Use TargetParser to parse -mhwdiv command line option in Driver.
Change-Id: I2ebc40f77af75ec6b43ce8364d6d5a1d29988bd6
Phabricator: http://reviews.llvm.org/D11501
llvm-svn: 243398
2015-07-28 09:08:03 +00:00
Asaf Badouh 74da38706e [X86][AVX512VL] add AVX512VL intrinsics 1 out of 4
http://reviews.llvm.org/D11526

llvm-svn: 243394
2015-07-28 08:26:14 +00:00
Argyrios Kyrtzidis c2a589169c [sema] Fix crash when typo-transforming an expression containing an ObjC super message expression.
rdar://21427916

llvm-svn: 243387
2015-07-28 06:12:24 +00:00
Yaron Keren 70bd288534 Make local function isWhitespaceExceptNL static instead of in anonymous namespace
per the coding standard. Thanks Craig Tooper for noticing this.

llvm-svn: 243381
2015-07-28 04:54:03 +00:00
Nico Weber b84c0d99b4 Fix what looks like accidentally repeated file contents. No behavior change.
llvm-svn: 243376
2015-07-28 03:37:54 +00:00
Nico Weber cee4d85faf Split -Wmicrosoft into many specific warnings.
Also move "pragma comment" warning from -Wmicrosoft to -Wignored-pragmas.

-Wmicrosoft currently covers many different areas, some more useful than
others.  Split it into many targeted flags, so that projects can choose to
enable only a subset of these warnings.  This is also useful for incrementally
fixing and turning on these warnings.

-Wno-microsoft still disables all these warnings, and -Wmicrosoft still enables
them all.  After this change, it's possible to pass `-Wno-microsoft
-Wmicrosoft-unqualified-friend` to only enable -Wmicrosoft-unqualified-friend,
and `-Wmicrosoft -Wno-microsoft-unqualified-friend` to enable all other
Microsoft warnings.

I put all the template-related warnings behind -Wmicrosoft-template; if that
turns out to be too coarse we can make that finer later on. (In practice, I
haven't seen the template-related warnings fire frequently.)

Reviewed at http://reviews.llvm.org/D11504

llvm-svn: 243371
2015-07-28 02:37:37 +00:00
Justin Bogner 203f09223b InstrProf: Fix a misuse of the FunctionDecl API when generating coverage
This was calling FD->hasBody(), meaning "Does the function that this
decl refers to have a body?", rather than
FD->doesThisDeclarationHaveABody(), meaning "Is this decl a
non-deleted definition?".

We might want to consider renaming these APIs :/

llvm-svn: 243360
2015-07-28 00:41:51 +00:00
Argyrios Kyrtzidis 2705819240 [test] Follow-up for r243343, also add a test case using an enum for designated enum.
llvm-svn: 243355
2015-07-28 00:01:13 +00:00
Renato Golin 7c542b4569 [ARM] Implement -Wa,-mfpu and friends for assemblers
This patch allows Clang to pass on -Wa,-mfpu, -Wa,-mhwdiv and
-Wa,-mcpu to the integrated assembler (via target-features), but
-march is still not being passed, but validated.

In case the command line has both -mxxx and -Wa,-mxxx, we warn
that the naked one will not be used in assembler mode.

llvm-svn: 243353
2015-07-27 23:44:45 +00:00
Renato Golin e17c580034 [ARM] Changes to Arch/CPU handling to help with -Wa,-mfpu etc. (nfc)
To be able to handle -Wa, options in the assembler (ClangAs), we need to
make the handling of options based on the value of the options, not direct
Arguments from the list, since the list is immutable.

No functional change in this patch, but this allows validating of -Wa,-mfpu
and friends in the same way we validate -mfpu and friends, *just* for the
assembler.

llvm-svn: 243352
2015-07-27 23:44:42 +00:00
Argyrios Kyrtzidis 4746c2fcdb [sema] Fix infinite loop when using a boolean value as designated initializer.
For designated indices use the max array size type bitwidth, not the bitwidth of the index value itself.
rdar://21942503

llvm-svn: 243343
2015-07-27 23:16:53 +00:00
Tyler Nowicki 54c020d372 Use CGLoopInfo to emit metadata for loop hint pragmas.
When ‘#pragma clang loop vectorize(assume_safety)’ was specified on a loop other loop hints were lost. The problem is that CGLoopInfo attaches metadata differently than EmitCondBrHints in CGStmt. For do-loops CGLoopInfo attaches metadata to the br in the body block and for while and for loops, the inc block. EmitCondBrHints on the other hand always attaches data to the br in the cond block. When specifying assume_safety CGLoopInfo emits an empty llvm.loop metadata shadowing the metadata in the cond block. Loop transformations like rotate and unswitch would then eliminate the cond block and its non-empty metadata.

This patch unifies both approaches for adding metadata and modifies the existing safety tests to include non-assume_safety loop hints.

llvm-svn: 243315
2015-07-27 20:10:20 +00:00