- Dec 31, 2017
-
-
Jacob Bandes-Storch authored
(Re-submission of D39937 with fixed tests.) Adjust wording for const-qualification mismatch to be a little more clear. Also add another diagnostic for a ref qualifier mismatch, which previously produced a useless error (this error path is simply very old; see rL119336): Before: error: cannot initialize object parameter of type 'X0' with an expression of type 'X0' After: error: 'this' argument to member function 'rvalue' is an lvalue, but function has rvalue ref-qualifier Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: lebedev.ri, cfe-commits Differential Revision: https://reviews.llvm.org/D41646 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321609 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jacob Bandes-Storch authored
A few tests need to be fixed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321593 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jacob Bandes-Storch authored
Summary: Adjust wording for const-qualification mismatch to be a little more clear. Also add another diagnostic for a ref qualifier mismatch, which previously produced a useless error (this error path is simply very old; see rL119336): Before: error: cannot initialize object parameter of type 'X0' with an expression of type 'X0' After: error: 'this' argument to member function 'rvalue' is an lvalue, but function has rvalue ref-qualifier Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: lebedev.ri, aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D39937 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321592 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321590 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 30, 2017
-
-
Serge Pavlov authored
Need to check targets in tests more carefully. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321588 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
Clang is inherently a cross compiler and can generate code for any target enabled during build. It however requires to specify many parameters in the invocation, which could be hardcoded during configuration process in the case of single-target compiler. The purpose of configuration files is to make specifying clang arguments easier. A configuration file is a collection of driver options, which are inserted into command line before other options specified in the clang invocation. It groups related options together and allows specifying them in simpler, more flexible and less error prone way than just listing the options somewhere in build scripts. Configuration file may be thought as a "macro" that names an option set and is expanded when the driver is called. Use of configuration files is described in `UserManual.rst`. Differential Revision: https://reviews.llvm.org/D24933 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321587 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321574 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 29, 2017
-
-
Alexey Bataev authored
only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321560 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Added basic support for `-fopenmp-simd` options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321558 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
Note, we don't do any bitwise manipulations when using them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321546 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 27, 2017
-
-
Coby Tayree authored
added vbmi2 feature recognition added intrinsics support for vbmi2 instructions _mm[128,256,512]_mask[z]_compress_epi[16,32] _mm[128,256,512]_mask_compressstoreu_epi[16,32] _mm[128,256,512]_mask[z]_expand_epi[16,32] _mm[128,256,512]_mask[z]_expandloadu_epi[16,32] _mm[128,256,512]_mask[z]_sh[l,r]di_epi[16,32,64] _mm[128,256,512]_mask_sh[l,r]dv_epi[16,32,64] matching a similar work on the backend (D40206) Differential Revision: https://reviews.llvm.org/D41557 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321487 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
added vnni feature recognition added intrinsics support for VNNI instructions _mm256_mask_dpbusd_epi32 _mm256_maskz_dpbusd_epi32 _mm256_dpbusd_epi32 _mm256_mask_dpbusds_epi32 _mm256_maskz_dpbusds_epi32 _mm256_dpbusds_epi32 _mm256_mask_dpwssd_epi32 _mm256_maskz_dpwssd_epi32 _mm256_dpwssd_epi32 _mm256_mask_dpwssds_epi32 _mm256_maskz_dpwssds_epi32 _mm256_dpwssds_epi32 _mm128_mask_dpbusd_epi32 _mm128_maskz_dpbusd_epi32 _mm128_dpbusd_epi32 _mm128_mask_dpbusds_epi32 _mm128_maskz_dpbusds_epi32 _mm128_dpbusds_epi32 _mm128_mask_dpwssd_epi32 _mm128_maskz_dpwssd_epi32 _mm128_dpwssd_epi32 _mm128_mask_dpwssds_epi32 _mm128_maskz_dpwssds_epi32 _mm128_dpwssds_epi32 _mm512_mask_dpbusd_epi32 _mm512_maskz_dpbusd_epi32 _mm512_dpbusd_epi32 _mm512_mask_dpbusds_epi32 _mm512_maskz_dpbusds_epi32 _mm512_dpbusds_epi32 _mm512_mask_dpwssd_epi32 _mm512_maskz_dpwssd_epi32 _mm512_dpwssd_epi32 _mm512_mask_dpwssds_epi32 _mm512_maskz_dpwssds_epi32 _mm512_dpwssds_epi32 matching a similar work on the backend (D40208) Differential Revision: https://reviews.llvm.org/D41558 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321484 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
added bitalg feature recognition added intrinsics support for bitalg instructions _mm512_popcnt_epi16 _mm512_mask_popcnt_epi16 _mm512_maskz_popcnt_epi16 _mm512_popcnt_epi8 _mm512_mask_popcnt_epi8 _mm512_maskz_popcnt_epi8 _mm512_mask_bitshuffle_epi64_mask _mm512_bitshuffle_epi64_mask _mm256_popcnt_epi16 _mm256_mask_popcnt_epi16 _mm256_maskz_popcnt_epi16 _mm128_popcnt_epi16 _mm128_mask_popcnt_epi16 _mm128_maskz_popcnt_epi16 _mm256_popcnt_epi8 _mm256_mask_popcnt_epi8 _mm256_maskz_popcnt_epi8 _mm128_popcnt_epi8 _mm128_mask_popcnt_epi8 _mm128_maskz_popcnt_epi8 _mm256_mask_bitshuffle_epi32_mask _mm256_bitshuffle_epi32_mask _mm128_mask_bitshuffle_epi16_mask _mm128_bitshuffle_epi16_mask matching a similar work on the backend (D40222) Differential Revision: https://reviews.llvm.org/D41564 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321483 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
added vpclmulqdq feature recognition added intrinsics support for vpclmulqdq instructions _mm256_clmulepi64_epi128 _mm512_clmulepi64_epi128 matching a similar work on the backend (D40101) Differential Revision: https://reviews.llvm.org/D41573 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321480 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
added gfni feature recognition added intrinsics support for gfni instructions _mm_gf2p8affineinv_epi64_epi8 _mm_mask_gf2p8affineinv_epi64_epi8 _mm_maskz_gf2p8affineinv_epi64_epi8 _mm256_gf2p8affineinv_epi64_epi8 _mm256_mask_gf2p8affineinv_epi64_epi8 _mm256_maskz_gf2p8affineinv_epi64_epi8 _mm512_gf2p8affineinv_epi64_epi8 _mm512_mask_gf2p8affineinv_epi64_epi8 _mm512_maskz_gf2p8affineinv_epi64_epi8 _mm_gf2p8affine_epi64_epi8 _mm_mask_gf2p8affine_epi64_epi8 _mm_maskz_gf2p8affine_epi64_epi8 _mm256_gf2p8affine_epi64_epi8 _mm256_mask_gf2p8affine_epi64_epi8 _mm256_maskz_gf2p8affine_epi64_epi8 _mm512_gf2p8affine_epi64_epi8 _mm512_mask_gf2p8affine_epi64_epi8 _mm512_maskz_gf2p8affine_epi64_epi8 _mm_gf2p8mul_epi8 _mm_mask_gf2p8mul_epi8 _mm_maskz_gf2p8mul_epi8 _mm256_gf2p8mul_epi8 _mm256_mask_gf2p8mul_epi8 _mm256_maskz_gf2p8mul_epi8 _mm512_gf2p8mul_epi8 _mm512_mask_gf2p8mul_epi8 _mm512_maskz_gf2p8mul_epi8 matching a similar work on the backend (D40373) Differential Revision: https://reviews.llvm.org/D41582 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321477 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
added vaes feature recognition added intrinsics support for vaes instructions, matching a similar work on the backend (D40078) _mm256_aesenc_epi128 _mm512_aesenc_epi128 _mm256_aesenclast_epi128 _mm512_aesenclast_epi128 _mm256_aesdec_epi128 _mm512_aesdec_epi128 _mm256_aesdeclast_epi128 _mm512_aesdeclast_epi128 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321474 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 25, 2017
-
-
Faisal Vali authored
Suggest moving the following erroneous attrib list (based on location) [[]] struct X; to struct [[]] X; Additionally, added a fixme for the current implementation that diagnoses misplaced attributes to consider using the newly introduced diagnostic (that I think is more user-friendly). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321449 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 24, 2017
-
-
Benjamin Kramer authored
Saves a pointer on every CompoundStmt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321429 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321428 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 23, 2017
-
-
Sam McCall authored
Summary: This is currently 16 bytes, the patch reduces it to 4. (Building with clang on linux x84, I guess others are similar) The only subfield that might need a bigger type is SymbolPropertySet, I've moved it to the end of the struct so if it grows, SymbolInfo will only be 8 bytes. With a full index of namespace-scope symbols from the LLVM project (200k) loaded into clangd, this saves ~2MB of RAM. Reviewers: akyrtzi Subscribers: ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41514 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321411 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
This patch addresses a FIXME and has the template-parameter processing functions return a more derived common type NamedDecl (as opposed to a type needlessly higher up in the inheritance hierarchy : Decl). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321409 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
Extend the hashing to functions, which allows detection of function definition mismatches across modules. This is a re-commit of r320230. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321395 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 22, 2017
-
-
Bruno Cardoso Lopes authored
In case `@import Foo.Private` fails because the submodule doesn't exist, look for `Foo_Private` (if available) and build/load that module instead. In that process emit a warning and tell the user about the assumption. The intention here is to assist all existing private modules owners (in ObjC and Swift) to migrate to the new `Foo_Private` syntax. rdar://problem/36023940 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321342 91177308-0d34-0410-b5e6-96231b3b80d8
-
Faisal Vali authored
The standard correctly forbids various decl-specifiers that dont make sense on non-type template parameters - such as the extern in: template<extern int> struct X; This patch implements those restrictions (in a fashion similar to the corresponding checks on function parameters within ActOnParamDeclarator). Credit goes to miyuki (Mikhail Maltsev) for drawing attention to this issue, authoring the initial versions of this patch, and supporting the effort to re-engineer it slightly. Thank you! For details of how this patch evolved please see: https://reviews.llvm.org/D40705 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321339 91177308-0d34-0410-b5e6-96231b3b80d8
-
Bruno Cardoso Lopes authored
We used to advertise private modules to be declared as submodules (Foo.Private). This has proven to not scale well since private headers might carry several dependencies, introducing unwanted content into the main module and often causing dep cycles. Change the canonical way to name it to Foo_Private, forcing private modules as top level ones, and provide warnings under -Wprivate-module to suggest fixes for other private naming. Update documentation to reflect that. rdar://problem/31173501 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321337 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 21, 2017
-
-
Aaron Ballman authored
This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. Fixes the -Wreorder issue and fixes the ast-dump-color.cpp test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321310 91177308-0d34-0410-b5e6-96231b3b80d8
-
Abderrazek Zaafrani authored
Putting back the code that was reverted few weeks ago. Differential Revision: https://reviews.llvm.org/D34161 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321294 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ilya Biryukov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321266 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321229 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 20, 2017
-
-
Aaron Ballman authored
This allows you to dump C++ code that spells bool instead of _Bool, leaves off the elaborated type specifiers when printing struct or class names, and other C-isms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321223 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
Looking through the code, I saw a FIXME on IFunc to switch it to a target specific attribute. In looking through it, i saw that the no-longer-appropriately-named TargetArch didn't support ObjectFormat checking. This patch changes the name of TargetArch to TargetSpecific (since it checks much more than just Arch), makes "Arch" optional, adds support for ObjectFormat, better documents the TargetSpecific type, and changes IFunc over to a TargetSpecificAttr. Differential Revision: https://reviews.llvm.org/D41303 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321201 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
The size of the result vector is currently around 4600 with Flavor::WarningOrError, which makes std::vector a better candidate than llvm::SmallVector. Patch by: Andras Leitereg! Differential Revision: https://reviews.llvm.org/D39372 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321190 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ilya Biryukov authored
Summary: Adds BeforeExecute method to PrecompiledPreamble to be called before Execute(). This method can be overriden. Patch by William Enright. Reviewers: malaperle, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: arphaman, cfe-commits, ilya-biryukov Differential Revision: https://reviews.llvm.org/D41365 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321189 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
The bugreporter::trackNullOrUndefValue() mechanism contains a system of bug reporter visitors that recursively call each other in order to track where a null or undefined value came from, where each visitor represents a particular tracking mechanism (track how the value was stored, track how the value was returned from a function, track how the value was constrained to null, etc.). Each visitor is only added once per value it needs to track. Almost. One exception from this rule would be FindLastStoreBRVisitor that has two operation modes: it contains a flag that indicates whether null stored values should be suppressed. Two instances of FindLastStoreBRVisitor with different values of this flag are considered to be different visitors, so they can be added twice and produce the same diagnostic twice. This was indeed the case in the affected test. With the current logic of this whole machinery, such duplication seems unavoidable. We should be able to safely add visitors with different flag values without constructing duplicate diagnostic pieces. Hence the effort in this commit to de-duplicate diagnostics regardless of what visitors have produced them. Differential Revision: https://reviews.llvm.org/D41258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321135 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 18, 2017
-
-
Dimitry Andric authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321016 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
Convert most uses to range-for loops. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320954 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 16, 2017
-
-
Sanjay Patel authored
There are 2 parts to getting the -fassociative-math command-line flag translated to LLVM FMF: 1. In the driver/frontend, we accept the flag and its 'no' inverse and deal with the interactions with other flags like -ffast-math -fno-signed-zeros -fno-trapping-math. This was mostly already done - we just need to translate the flag as a codegen option. The test file is complicated because there are many potential combinations of flags here. Note that we are matching gcc's behavior that requires 'nsz' and no-trapping-math. 2. In codegen, we map the codegen option to FMF in the IR builder. This is simple code and corresponding test. For the motivating example from PR27372: float foo(float a, float x) { return ((a + x) - x); } $ ./clang -O2 27372.c -S -o - -ffast-math -fno-associative-math -emit-llvm | egrep 'fadd|fsub' %add = fadd nnan ninf nsz arcp contract float %0, %1 %sub = fsub nnan ninf nsz arcp contract float %add, %2 So 'reassoc' is off as expected (and so is the new 'afn' but that's a different patch). This case now works as expected end-to-end although the underlying logic is still wrong: $ ./clang -O2 27372.c -S -o - -ffast-math -fno-associative-math | grep xmm addss %xmm1, %xmm0 subss %xmm1, %xmm0 We're not done because the case where 'reassoc' is set is ignored by optimizer passes. Example: $ ./clang -O2 27372.c -S -o - -fassociative-math -fno-signed-zeros -fno-trapping-math -emit-llvm | grep fadd %add = fadd reassoc float %0, %1 $ ./clang -O2 27372.c -S -o - -fassociative-math -fno-signed-zeros -fno-trapping-math | grep xmm addss %xmm1, %xmm0 subss %xmm1, %xmm0 Differential Revision: https://reviews.llvm.org/D39812 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320920 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320915 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hal Finkel authored
This mimics FileCheck's --check-prefixes option. The default prefix is "expected". That is, "-verify" is equivalent to "-verify=expected". The goal is to permit exercising a single test suite source file with different compiler options producing different sets of diagnostics. While cpp can be combined with the existing -verify to accomplish the same goal, source is often easier to maintain when it's not cluttered with preprocessor directives or duplicate passages of code. For example, this patch also rewrites some existing clang tests to demonstrate the benefit of this feature. Patch by Joel E. Denny, thanks! Differential Revision: https://reviews.llvm.org/D39694 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320908 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hal Finkel authored
The frontend currently groups diagnostics from the command line according to diagnostic level, but that places all notes last. Fix that by emitting such diagnostics in the order they were generated. Patch by Joel E. Denny, thanks! Differential Revision: https://reviews.llvm.org/D40995 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320904 91177308-0d34-0410-b5e6-96231b3b80d8
-