Commit Graph

63329 Commits

Author SHA1 Message Date
Nico Weber ad2d8f3dfd clang-cl: Don't assert on using /Yc with non-source files, PR27450
Move phase handling after input type validation.

llvm-svn: 267040
2016-04-21 19:59:10 +00:00
Renato Golin 1f04213e98 [x86] Force mixes asm syntax test to check for x86
llvm-svn: 266993
2016-04-21 14:40:06 +00:00
Krzysztof Parzyszek a58ff5117a [Hexagon] Define architecture version macros for hexagonv55
llvm-svn: 266989
2016-04-21 14:30:04 +00:00
Aaron Ballman 1978f7fe29 Clarify memory ownership semantics; NFC.
Patch by Clement Courbet

llvm-svn: 266986
2016-04-21 13:51:07 +00:00
Michael Zuckerman 4fa96af4db [Clang][AVX512][BuiltIn] Adding intrinsics of VGATHER{DPS|DPD} , VPGATHER{QD|QQ|DD|DQ} and VGATHERPF{0|1}{DPS|QPS|DPD|QPD} instruction set .
Differential Revision: http://reviews.llvm.org/D19224

llvm-svn: 266983
2016-04-21 12:47:27 +00:00
Denis Zobnin 628b022a0e Correctly parse GCC-style asm line following MS-style asm line.
Quit parsing MS-style inline assembly if the following statement has GCC style.
Enables compilation of code like

void f() {
  __asm mov ebx, ecx
  __asm__("movl %ecx, %edx");
}

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

llvm-svn: 266976
2016-04-21 10:59:18 +00:00
Benjamin Kramer 023ef1bd13 Back out the test case for r266973 for now.
It breaks on windows, need to investigate. It's not testing the
important part of that change anyways.

llvm-svn: 266975
2016-04-21 10:46:14 +00:00
Benjamin Kramer b5737c1491 [Tooling] Inject -resource-dir instead of overwriting argv[0].
This allows using a different standard library (the one from argv[0] in
the compilation database) with the correct builtins.

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

llvm-svn: 266973
2016-04-21 10:18:18 +00:00
Andrey Turetskiy 6a8b91df64 Compilation for Intel MCU (Part 1/3)
Add -miamcu option which:
  * Sets IAMCU triple
  * Sets IAMCU ABI
  * Enforces static compilation

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

llvm-svn: 266972
2016-04-21 10:16:48 +00:00
Richard Smith e0fa4c83b2 [modules] Make the tweak to avoid circular inclusion of emmintrin.h and
xmmintrin.h a bit more directed. If for whatever reason modules are enabled but
we textually include one of these headers, don't deploy the special case for
modules. To make this work cleanly, extend __building_module to be defined
even when modules is disabled.

llvm-svn: 266945
2016-04-21 01:46:37 +00:00
Bob Wilson 410ae489b4 Remove the (ignored) -Wreceived-is-weak diagnostic.
We kept this around for a while since Xcode 6 and earlier had a build
setting for this warning. It was removed in Xcode 7 so there should be
no need for this warning now.

llvm-svn: 266938
2016-04-21 00:11:24 +00:00
Adrian Prantl 50fd1a87c4 Module Debugging: Emit the canonical debug info for Objective-C classes
in the compile unit that contains their implementation even if their
interface is declared in a module.

The private @implementation of an @interface may have additional
hidden ivars so we should not defer to the public version of the
type that is found in the module.

<rdar://problem/25541798>

llvm-svn: 266937
2016-04-20 23:59:32 +00:00
Chaoren Lin e6f04f3553 [Tooling] Fix getting fully qualified names of template alias types.
Reviewers: rsmith, rnk

Subscribers: cfe-commits, klimek

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

llvm-svn: 266925
2016-04-20 22:12:07 +00:00
Adrian McCarthy 02d0a635d6 Add warning about CR+LF line endings on Windows.
s/checkout/check out/ when used as a verb.

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

llvm-svn: 266887
2016-04-20 16:43:34 +00:00
Alexey Bataev 48591dd98c [OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the
team can resume the task region after a suspension. Patch adds proper
codegen for untied tasks.

llvm-svn: 266853
2016-04-20 04:01:36 +00:00
Teresa Johnson b10474903c Enable ODR uniquing of DITypes for ThinLTO backends
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.

When invoking ThinLTO backend compiles via clang (for a distributed
build), invoke enableDebugTypeODRUniquing() before parsing the module.

Reviewers: dexonsmith, joker.eph

Subscribers: llvm-commits, joker.eph

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

llvm-svn: 266852
2016-04-20 02:23:52 +00:00
Mandeep Singh Grang d9d3b21c32 [Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
Summary:
    Removed unwanted --check-prefix=CHECK from the following unit tests:
      test/CXX/special/class.copy/implicit-move-def.cpp
      test/CodeGen/cleanup-destslot-simple.c
      test/CodeGen/inline-asm-immediate-ubsan.c
      test/CodeGen/mips-interrupt-attr.c
      test/CodeGenCXX/cfi-stats.cpp
      test/CodeGenCXX/copy-constructor-elim.cpp
      test/CodeGenCXX/microsoft-templ-uuidof.cpp
      test/CodeGenCXX/vtable-linkage.cpp
      test/CodeGenObjC/messages-2.m
      test/Driver/noinline.c
      test/Index/remap-load.c
      test/Index/retain-comments-from-system-headers.c
      test/OpenMP/task_if_codegen.cpp
      test/Preprocessor/comment_save_macro.c

Patch by:  Mandeep Singh Grang (mgrang)

Reviewers: rafael, ABataev, rengolin

Projects: #clang-c

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

llvm-svn: 266843
2016-04-20 01:02:18 +00:00
Stephen Hines a978a076a9 MarkEOLs should only be true for clang-cl.exe.
Summary:
https://llvm.org/bugs/show_bug.cgi?id=27396

This fixes an issue in response files where "\r\n" was being interpreted
as two EOL markers (i.e. we consumed the '\r' as terminating the
previous token, and then parsed the '\n' as a significant EOL). This
breaks response files where joined arguments get split across multiple
lines (like "-x\r\nc"). I also fixed an accidental issue in the
response-file.c test, where the response file is appended to, instead of
being overwritten.

Reviewers: rnk

Subscribers: danalbert, llvm-commits

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

llvm-svn: 266840
2016-04-20 00:33:06 +00:00
Adam Nemet b4b6a94dd7 [Parse] Reuse OptionUnroll rather than matching it again. NFC
llvm-svn: 266829
2016-04-19 22:29:24 +00:00
Adam Nemet 50de4e8346 [Parse] Use StringSwitch to improve readability. NFC
A subsequent patch will propose a "distribute" loop hint.  Similarly to
unroll, this does not have a "assume_safety" argument either so this
condition will get more complex.

llvm-svn: 266827
2016-04-19 22:17:45 +00:00
Marcin Koscielnicki 4005070e1b [AArch64] Fix D19098 fallout.
The intrinsic is now called llvm.thread.pointer, not
llvm.aarch64.thread.pointer.  Also, the code handling it in CGBuiltin.cpp
is dead - it's already covered by GCCBuiltin.  Remove it.

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

llvm-svn: 266817
2016-04-19 20:51:00 +00:00
Adrian Prantl ae39ccc49f cc1as: Don't crash when CIE is requested and no DWARF version is specified.
This patch changes the default DWARF version for cc1as from invalid 0 to 2,
which should be the lowest common denominator on all platforms.

rdar://problem/24735813

llvm-svn: 266814
2016-04-19 20:31:19 +00:00
Ahmed Bougacha 1d9de10130 [ARM NEON] Define vfms_f32 on ARM, and all vfms using vfma.
r259537 added vfma/vfms to armv7, but the builtin was only lowered
on the AArch64 side. Instead of supporting it on ARM, get rid of it.

The vfms builtin lowered to:
  %nb = fsub float -0.0, %b
  %r = @llvm.fma.f32(%a, %nb, %c)

Instead, define the operation in terms of vfma, and swap the
multiplicands. It now lowers to:
  %na = fsub float -0.0, %a
  %r = @llvm.fma.f32(%na, %b, %c)

This matches the instruction more closely, and lets current LLVM
generate the "natural" operand ordering:
  fmls.2s v0, v1, v2
instead of the crooked (but equivalent):
  fmls.2s v0, v2, v1
Except for theses changes, assembly is identical.

LLVM accepts both commutations, and the LLVM tests in:
  test/CodeGen/AArch64/arm64-fmadd.ll
  test/CodeGen/AArch64/fp-dp3.ll
  test/CodeGen/AArch64/neon-fma.ll
  test/CodeGen/ARM/fusedMAC.ll
already check either the new one only, or both.

Also verified against the test-suite unittests.

llvm-svn: 266807
2016-04-19 19:44:45 +00:00
Eric Liu 89be047201 Fixed a bug in AnnotatedLine::startsWith when there are comments in the line.
Summary: When there are comments in the line, one token may be checked multiple times.

Reviewers: mprobst, djasper

Subscribers: ioeric, cfe-commits, klimek

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

llvm-svn: 266803
2016-04-19 19:25:33 +00:00
Manman Ren 01b705e9c0 ObjC Class Property: don't emit class properties on old deployment targets.
For old deployment targets, emit nil for all class property lists.

rdar://25616128

llvm-svn: 266800
2016-04-19 19:05:03 +00:00
Douglas Katzman 3103f25320 Fix PR26999 better- RenderDebugEnablingArgs() once only
llvm-svn: 266797
2016-04-19 18:55:53 +00:00
Justin Lebar b34d7bc9a1 [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)
llvm-svn: 266796
2016-04-19 18:52:28 +00:00
Martin Probst 533965c195 reuse mustBeJSIdent for interface detection
llvm-svn: 266790
2016-04-19 18:19:06 +00:00
Martin Probst 1e8261ea04 clang-format: [JS] support `interface` as a free standing identifier.
Summary:
`interface` can be used as a fee standing identifier in JavaScript/TypeScript.
This change uses the heuristic of whether it's followed by another identifier
as an indication.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

llvm-svn: 266789
2016-04-19 18:18:59 +00:00
Sanjay Patel 461f2ff445 [builtin_expect] tighten checks, add test, add comments
llvm-svn: 266788
2016-04-19 18:17:34 +00:00
Sanjay Patel 3fd323fa36 reduce indentation; NFCI
llvm-svn: 266787
2016-04-19 18:06:33 +00:00
Ahmed Bougacha 40a34c2e2a [CodeGen] Widen non-power-of-2 vector HFA base types.
Currently, for the ppc64--gnu and aarch64 ABIs, we recognize:
  typedef __attribute__((__ext_vector_type__(3))) float v3f32;
  typedef __attribute__((__ext_vector_type__(16))) char v16i8;
  struct HFA {
    v3f32 a;
    v16i8 b;
  };

as an HFA. Since the first type encountered is used as the base type,
we pass the HFA as:
    [2 x <3 x float>]
Which leads to incorrect IR (relying on padding values) when the
second field is used.

Instead, explicitly widen the vector (after size rounding) in
isHomogeneousAggregate.

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

llvm-svn: 266784
2016-04-19 17:54:29 +00:00
Ahmed Bougacha 8862cae75b [CodeGen] Fix whitespace. NFC.
llvm-svn: 266783
2016-04-19 17:54:24 +00:00
Douglas Katzman 5a9a685405 Pass dwarf-version to cc1as.
Fix PR26999 - crashing in cc1as with any '*bsd' target.

llvm-svn: 266775
2016-04-19 17:43:54 +00:00
Sanjay Patel 341890ad70 reduce indentation; NFCI
llvm-svn: 266765
2016-04-19 17:13:14 +00:00
Michael Zuckerman 6fa512cecf [Clang][Builtin][AVX512] Adding intrinsics for VGETMANT{PD|PS} and VGETEXP{PD|PS} instruction set
Differential Revision: http://reviews.llvm.org/D19197

llvm-svn: 266763
2016-04-19 17:10:29 +00:00
Alexey Bataev 995e861ba6 Revert "[OPENMP] Codegen for untied tasks."
This reverts commit r266754.

llvm-svn: 266755
2016-04-19 16:36:01 +00:00
Alexey Bataev 823acfacdf [OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the
team can resume the task region after a suspension. Patch adds proper
codegen for untied tasks.

llvm-svn: 266754
2016-04-19 16:27:55 +00:00
Andrey Turetskiy f7d9b26384 Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.
llvm-svn: 266753
2016-04-19 16:25:30 +00:00
Samuel Benzaquen d6b44aad31 [ASTMatchers] Do not try to memoize nodes we can't compare.
Summary:
Prevent hasAncestor from comparing nodes that are not supported.
hasDescendant was fixed some time ago to avoid this problem.
I'm applying the same fix to hasAncestor: if any object in the Builder map is
not comparable, skip the cache.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

llvm-svn: 266748
2016-04-19 15:52:56 +00:00
Andrey Turetskiy bbfd556640 Compilation for Intel MCU (Part 1/3)
Add -miamcu option which:
  * Sets IAMCU triple
  * Sets IAMCU ABI
  * Enforces static compilation

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

llvm-svn: 266747
2016-04-19 15:50:57 +00:00
Michael Zuckerman ef2979af50 [Clang][AVX512][BUILTIN] Adding intrinsics support to VEXTRACT{I|F} and VINSERT{I|F} instruction set
Differential Revision: http://reviews.llvm.org/D19097

llvm-svn: 266745
2016-04-19 15:18:23 +00:00
Martin Probst 805c6167c2 Summary:
clang-format: [JS] unit tests for type aliases.

Also adds a test for "foo as bar" casts.

Spec:
https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.10

These are already handled correctly.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 266744
2016-04-19 14:59:16 +00:00
Martin Probst 053f1aa6d0 clang-format: [JS] simplify import/export.
Summary:
Change `import` and `export` parsing to special case the renaming
syntax (`import x, {y as bar} ...`, `export {x}`) and otherwise just
parse a regular structural element.

This simplifies the code a bit and should be more correct - it's easier
to recognise the specific import syntax than to recognise arbitrary
expressions and declarations.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 266743
2016-04-19 14:55:37 +00:00
Laszlo Nagy 8bd63e5518 D17487: [analyzer][scan-build-py] flag filter modification for compilation database creation
llvm-svn: 266726
2016-04-19 12:03:03 +00:00
Alexey Bataev bec9572213 Revert "[OPENMP] Codegen for untied tasks."
This reverts commit 266722.

llvm-svn: 266724
2016-04-19 09:27:38 +00:00
Alexey Bataev 26b2577f6b [OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the team can resume the task region after a suspension. Patch adds proper codegen for untied tasks.

llvm-svn: 266722
2016-04-19 09:10:27 +00:00
Serge Pavlov 7dcc97e7ac Warn if function or variable cannot be implicitly instantiated
With this patch compiler emits warning if it tries to make implicit instantiation
of a template but cannot find the template definition. The warning can be suppressed
by explicit instantiation declaration or by command line options
-Wundefined-var-template and -Wundefined-func-template. The implementation follows
the discussion of http://reviews.llvm.org/D12326.

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

llvm-svn: 266719
2016-04-19 06:19:52 +00:00
Justin Lebar b41f33cf02 [CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug.
Reviewers: tra

Subscribers: cfe-commits, jhen

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

llvm-svn: 266708
2016-04-19 02:27:11 +00:00
Justin Lebar dc3c50434e [CUDA] Add --cuda-compile-host-device, which overrides --cuda-host-only and --cuda-device-only.
Summary:
This completes the flag's tristate, letting you override it at will on
the command line.

Reviewers: tra

Subscribers: cfe-commits, jhen

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

llvm-svn: 266707
2016-04-19 02:27:07 +00:00