Commit Graph

56590 Commits

Author SHA1 Message Date
Craig Topper b01fc317c1 [X86] Use macros in AVX512ER header to allow ICE to be checked for immediate argument.
llvm-svn: 227716
2015-02-01 08:05:12 +00:00
Craig Topper 3b079c5ed2 [X86] Convert some more const ints to ICE in AVX512 builtins.
llvm-svn: 227714
2015-02-01 07:35:43 +00:00
Craig Topper 67826a5883 [X86] Rename _mm512_valign_epi64/32 intrinsics to _mm512_alignr_epi64/32 to match Intel docs. Make immediate argument to them an ICE. Fix mask size for the alignd version.
llvm-svn: 227713
2015-02-01 07:35:40 +00:00
Craig Topper 72c7d51251 [X86] Change rounding parameter of all the AVX512 builtins to an ICE.
llvm-svn: 227712
2015-02-01 07:35:35 +00:00
Filipe Cabecinhas 01e77c2617 Fix a typo
We're not that much into metals.

llvm-svn: 227696
2015-01-31 23:25:54 +00:00
Filipe Cabecinhas f2a3aec5c7 Tweak behavior due to -fexceptions, in C++ mode, imply -fcxx-exceptions
Added test

llvm-svn: 227695
2015-01-31 23:05:51 +00:00
Chandler Carruth aab5ec078e [PM] Update Clang for the new LLVM API in r227685 for managing the
TargetTransformInfo, and unify the code in a single place.

llvm-svn: 227686
2015-01-31 11:18:46 +00:00
Craig Topper da798ddba5 [X86] Make AVX512 integer comparison builtins use unsigned types for the masks.
llvm-svn: 227681
2015-01-31 08:58:36 +00:00
Craig Topper ae2957cce6 [X86] AVX512 scatter/gather builtins as taking an ICE for scale instead of just a const int.
llvm-svn: 227680
2015-01-31 08:58:30 +00:00
Craig Topper 1a8b0472d5 [X86] Add immediate range checking for a couple XOP builtins.
llvm-svn: 227679
2015-01-31 08:57:52 +00:00
Daniel Jasper 30526e79e8 clang-format: Fix incorrect handling of leading whitespace.
Added an assertion that triggered in an existing test case (without
observable differences) and fixed the code.

llvm-svn: 227677
2015-01-31 07:05:46 +00:00
Craig Topper 9fee8ab4f9 [x86] Remove tab characters from avxintrin.h. NFC.
llvm-svn: 227676
2015-01-31 06:33:59 +00:00
Craig Topper 459554f164 [X86] Make order consistent between 'const' and 'int' in one of the intrinsic header files. NFC
llvm-svn: 227675
2015-01-31 06:31:30 +00:00
Craig Topper 1601525f1c [X86] Add range checking to the immediate arguments of many of the SSE/AVX builtins.
llvm-svn: 227674
2015-01-31 06:31:23 +00:00
Richard Smith 5089542793 [modules] When we try to complete the redeclaration chain for a class template
specialization, pull in any lazy specializations of the class template.

llvm-svn: 227668
2015-01-31 03:04:55 +00:00
David Blaikie 303facbeb8 DebugInfo: Fix line table for comparisons harder/better for the sake of C (& the GDB buildbot)
llvm-svn: 227663
2015-01-31 01:10:11 +00:00
David Blaikie 9fd4d08515 Rename test file to be more accurate (& free up the file name for a more appropriate test)
llvm-svn: 227662
2015-01-31 01:10:09 +00:00
Saleem Abdulrasool 71d1dd1e0c CodeGen: create a WindowsARMTargetCodeGenInfo
Create a new TargetCodeGenInfo for Windows on ARM to permit annotating the
functions with stack-probe-size (for /Gs and -mstack-probe-support) for
generating the stack probe necessary for Windows targets.  This will be used by
the backend when lowering the frame to generate the stack probe appropriately.

llvm-svn: 227641
2015-01-30 23:29:19 +00:00
Reid Kleckner 3a417c301b SEH: Don't jump to an unreachable continuation block
If both the __try and __except blocks do not return, we want to delete
the continuation block as unreachable instead.

llvm-svn: 227627
2015-01-30 22:16:45 +00:00
Reid Kleckner 165143587a Windows: Fix _CPPUNWIND definition to follow -fcxx-exceptions
This is consistent with how we interpret the MSVC /EH flag, which
controls -fcxx-exceptions.

llvm-svn: 227616
2015-01-30 21:42:55 +00:00
Filipe Cabecinhas 18a72611f1 Special-case the PS4 SDK for a clang test
Original patch by Gao Yunzhong!

llvm-svn: 227593
2015-01-30 18:25:59 +00:00
Filipe Cabecinhas 3455c4dce8 Shuffle tests around to more appropriate files
llvm-svn: 227592
2015-01-30 18:25:48 +00:00
Eric Christopher 58c2199cef Fix regression in r227409 where we were passing -fsyntax-only
in all cases.

Patch by Artem Belevich.

llvm-svn: 227591
2015-01-30 18:22:23 +00:00
Daniel Sanders 7f933f4c5e [mips] Pass ABI name via -target-abi instead of target-features
Patch by Vladimir Medic

Reviewers: echristo, atanasyan, dsanders

Reviewed By: atanasyan, dsanders

Subscribers: llvm-commits, echristo, atanasyan

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

llvm-svn: 227583
2015-01-30 17:35:23 +00:00
Nico Weber f9e37be2d6 Follow-up to r217302 and r227555: Don't crash on inline ~A::A() if A is an int.
Even with r227555, this still crashed:

  struct S {
    int A;
    ~A::A() {}
  };

That's because ParseOptionalCXXScopeSpecifier()'s call to
ActOnCXXNestedNameSpecifier() doesn't mark the scope spec as invalid if sema
thought it's a good idea to fixit-correct "::" to ":".  For the diagnostic
improvement done in r217302, we never want :: to be interpreted as :, so fix
this by setting ColonSacred to false temporarily.

Found by SLi's bot.

llvm-svn: 227581
2015-01-30 16:53:11 +00:00
Nathan Sidwell 55d53fe79f Code cleanup
Parser::ParseLexedMethodDeclaration: Use local var for Param
Sema::MergeCXXFunctionDecls: Use hasInheritedDefaultArg

llvm-svn: 227577
2015-01-30 14:21:35 +00:00
Filipe Cabecinhas c9c4025c8a Remove unneeded code
We don't really care about enabling RTTI with -fexceptions, only with
-fcxx-exceptions.

llvm-svn: 227567
2015-01-30 11:17:56 +00:00
Fraser Cormack cc6e894587 Fix OpenCL 1.2 double as an optional core feature behaviour
In OpenCL 1.2, using double no longer requires using the pragma cl_khr_fp64,
instead a kernel is allowed to use double, but must first have queried
clGetDeviceInfo's CL_DEVICE_DOUBLE_FP_CONFIG.

Page 197, section 6.1.1 of the OpenCL 1.2 specification has a footnote 23
describing this behaviour.

I've also added test cases such that the pragma must be used if targeting
OpenCL 1.0 or 1.1, but is ignored in 1.2 and 2.0.

Patch by Neil Henning!

Reviewers: Pekka Jääskeläinen

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

llvm-svn: 227565
2015-01-30 10:51:46 +00:00
David Majnemer 8c969eaf1a Sema: Disable template instantiation once a fatal error is raised
Fatal errors disable all further diagnostics.  Continuing to permit
template instantiation does nothing but make it take longer for clang to
finish with the TU.

Instead, halt all further instantiation.

Fixed in PR22396.

llvm-svn: 227556
2015-01-30 05:01:23 +00:00
Nico Weber d004586faa Follow-up to r217302: Don't crash on ~A::A() if A is undeclared.
llvm-svn: 227555
2015-01-30 04:05:15 +00:00
Nico Weber 07425af920 Typo fixo.
llvm-svn: 227554
2015-01-30 03:47:03 +00:00
Nico Weber 2890061b7d Wrap to 80 cols by removing trailing whitespace. No behavior change.
llvm-svn: 227553
2015-01-30 02:35:21 +00:00
Richard Smith d0e102fece Teach AST printing to not print whitespace inside {} and () for initialization,
to match LLVM's preferred style.

llvm-svn: 227545
2015-01-30 02:04:26 +00:00
Nico Weber 9cc795c188 Weaken an assertion that isn't true for invalid input.
llvm-svn: 227540
2015-01-30 01:48:49 +00:00
Reid Kleckner ab80f18f57 clang-cl: Enable -fexceptions but not -fcxx-exceptions by default
This enables proper IRgen of SEH constructs.

llvm-svn: 227528
2015-01-30 01:04:16 +00:00
Filipe Cabecinhas 28f353c7d0 Add some more PS4 driver settings related to rtti and exceptions.
Summary:
The PS4 defaults to -fno-rtti, and has to have rtti enabled when enabling
exceptions.

This commit makes clang add the -fno-rtti by default on the PS4, unless
-frtti was passed in.

It also diagnoses misuses for the PS4:
- Exceptions need rtti. Warn and enable rtti if no rtti flag was passed,
  error if -fno-rtti was passed.

I also added a more general warning for when -fno-rtti is the default
(currently it's only on the PS4) and the vptr sanitizer is on.

Fixed a few tests, due to different flag order when passing cc1 arguments.

Reviewers: chandlerc

Subscribers: cfe-commits

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

llvm-svn: 227518
2015-01-29 23:56:43 +00:00
Ulrich Weigand f32a1acee8 [PowerPC] Work around TLS linker bug
Work around a bug in GNU ld (and gold) linker versions up to 2.25
that may mis-optimize code generated by this version of clang/LLVM
to access general-dynamic or local-dynamic TLS variables.

Bug is fixed here:
https://sourceware.org/ml/binutils/2015-01/msg00318.html

llvm-svn: 227480
2015-01-29 19:08:51 +00:00
Rafael Espindola 3c5f2354b8 This reverts commit r227432, r227438 and r227448.
It should bring the bots back.

Original messagses:

r227448:
   Remove unnecessary default.

r227438:
   Fix Index/print-type.cpp test following r227432.

r227432:
    libclang: Add three functions useful for dealing with anonymous fields:
       clang_Cursor_getOffsetOfField
       clang_Cursor_isAnonymous
       clang_Type_visitFields
    Python: Add corresponding methods for dealing with anonymous fields.

    Patch by Loïc Jaquemet

llvm-svn: 227472
2015-01-29 17:22:53 +00:00
Aaron Ballman 66c653fab4 Reverting r227453, which adds back the fuzzer library. Now excluding the clang-format fuzzer functionality based on LLVM_USE_SANITIZE_COVERAGE being set or unset.
llvm-svn: 227465
2015-01-29 16:58:53 +00:00
Aaron Ballman 8816257949 Temporarily reverting the fuzzer library as it causes too many build issues for MSVC users. This reverts: 227354
llvm-svn: 227453
2015-01-29 15:49:46 +00:00
Francois Pichet 19197e2d8b Remove unnecessary default.
llvm-svn: 227448
2015-01-29 15:42:56 +00:00
Filipe Cabecinhas 7a24104293 [xcore] Make the exceptions test actually check for the absence of -fexceptions in the proper place
llvm-svn: 227443
2015-01-29 15:03:36 +00:00
Francois Pichet b4c7a47cd8 Fix Index/print-type.cpp test following r227432.
llvm-svn: 227438
2015-01-29 13:33:44 +00:00
NAKAMURA Takumi 4b643c23fd Disable a couple of crash-* tests for now. It seems they might be incompatible to win32.
llvm-svn: 227434
2015-01-29 13:23:23 +00:00
Daniel Jasper 0955cb41eb clang-format: FIXME that led to access of uninitialized memory.
I have so far not succeeded in finding a nicely reduced test case or an
observable difference which could help me create a test failure without
msan.

Committing without test to unblock kcc's further fuzzing progress.

llvm-svn: 227433
2015-01-29 13:11:47 +00:00
Francois Pichet f3be1cc5a9 libclang: Add three functions useful for dealing with anonymous fields:
clang_Cursor_getOffsetOfField
   clang_Cursor_isAnonymous
   clang_Type_visitFields
Python: Add corresponding methods for dealing with anonymous fields.

Patch by Loïc Jaquemet

llvm-svn: 227432
2015-01-29 12:45:29 +00:00
Daniel Jasper 47b35aeaa1 clang-format: Fix crasher caused by not properly setting dry-run.
llvm-svn: 227427
2015-01-29 10:47:14 +00:00
David Majnemer 310e3a8f60 MS ABI: Implement proper support for setjmp
On targets which use the MSVCRT, setjmp is a macro which expands to
_setjmp or _setjmpex.

_setjmp and _setjmpex have a secret, hidden argument which is not listed
in the function prototype on X64 and WoA.  This hidden argument always
seems to be the frame pointer.

_setjmpex isn't used on X86, _setjmp is magically replaced with a call
to _setjmp3.  The second argument is zero for 'normal' setjmp/longjmp
pairs, otherwise it is a count of additional variadic arguments.  This
is used when setjmp appears inside of a try or __try.

It is not safe to use a pointer to setjmp because _setjmp, _setjmpex and
_setmp3 are not compatible with setjmp.

llvm-svn: 227426
2015-01-29 09:29:21 +00:00
David Majnemer b9bf14c549 Basic: Re-sort these builtins
No functional change, it just makes it a little easier to find what you
are looking for.

llvm-svn: 227425
2015-01-29 09:29:17 +00:00
Nico Weber 6cf2df29e7 Make a codegen warning a real warning instead of a getCustomDiagID().
Warnings shouldn't use getCustomDiagID(), since then they can't be disabled
via a flag, can't be remapped, etc.

llvm-svn: 227420
2015-01-29 06:25:59 +00:00