summaryrefslogtreecommitdiffstats
path: root/clang/include
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenMP] Use the OpenMP-IR-BuilderJohannes Doerfert2019-12-112-0/+3
| | | | | | | | | | | | | | | This is a follow up patch to use the OpenMP-IR-Builder, as discussed on the mailing list ([1] and later) and at the US Dev Meeting'19. [1] http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/2019-May/000197.html Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang Differential Revision: https://reviews.llvm.org/D69922
* [clang][clang-scan-deps] Aggregate the full dependency information.Michael Spencer2019-12-112-9/+151
| | | | Differential Revision: https://reviews.llvm.org/D70268
* [WebAssembly] Add new `export_name` clang attribute for controlling wasm ↵Sam Clegg2019-12-112-0/+23
| | | | | | | | | | | | | | | | | | | | export names This is equivalent to the existing `import_name` and `import_module` attributes which control the import names in the final wasm binary produced by lld. This maps the existing This attribute currently requires a string rather than using the symbol name for a couple of reasons: 1. Avoid confusion with static and dynamic linking which is based on symbol name. Exporting a function from a wasm module using this directive is orthogonal to both static and dynamic linking. 2. Avoids name mangling. Differential Revision: https://reviews.llvm.org/D70520
* [analyzer] Escape symbols conjured into specific regions during a ↵Gabor Horvath2019-12-114-9/+30
| | | | | | | | | | conservative EvalCall This patch introduced additional PointerEscape callbacks after conservative calls for output parameters. This should not really affect the current checkers but the upcoming FuchsiaHandleChecker relies on this heavily. Differential Revision: https://reviews.llvm.org/D71224
* [OPENMP50]Add if clause in teams distribute simd directive.Alexey Bataev2019-12-111-0/+1
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* Removing an unused selection field from a diagnostic; NFC.Aaron Ballman2019-12-111-1/+1
|
* [ARM][MVE] Factor out an IntrinsicMX multiclass.Simon Tatham2019-12-112-27/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The ACLE intrinsics for MVE contain a lot of pairs of functions with `_m` and `_x` in the name, wrapping a predicated MVE instruction which only partially overwrites its output register. They have the common pattern that the `_m` variant takes an initial argument called 'inactive', of the same type as the return value, supplying the input value of the output register, so that lanes disabled by the predication will be taken from that parameter; the `_x` variant omits that initial argument, and simply sets it to undef. That common pattern is simple enough to wrap into a multiclass, which should save a lot of effort in setting up all the rest of the `_x` variants. In this commit I introduce `multiclass IntrinsicMX` in `arm_mve_defs.td`, and convert existing generation of m/x pairs to use it. This allows me to remove the `PredicatedImmediateVectorShift` multiclass (from D71065) completely, because the new multiclass makes it so much simpler that it's not worth bothering to define it at all. Reviewers: MarkMurrayARM, miyuki Reviewed By: MarkMurrayARM, miyuki Subscribers: kristof.beyls, dmgreen, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71335
* [ARM][MVE] Add intrinsics for immediate shifts. (reland)Simon Tatham2019-12-112-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the family of `vshlq_n` and `vshrq_n` ACLE intrinsics, which shift every lane of a vector left or right by a compile-time immediate. They mostly work by expanding to the IR `shl`, `lshr` and `ashr` operations, with their second operand being a vector splat of the immediate. There's a fiddly special case, though. ACLE specifies that the immediate in `vshrq_n` can take values up to //and including// the bit size of the vector lane. But LLVM IR thinks that shifting right by the full size of the lane is UB, and feels free to replace the `lshr` with an `undef` half way through the optimization pipeline. Hence, to keep this legal in source code, I have to detect it at codegen time. Logical (unsigned) right shifts by the element size are handled by simply emitting the zero vector; arithmetic ones are converted into a shift of one bit less, which will always give the same output. In order to do that check, I also had to enhance the tablegen MveEmitter so that it can cope with converting a builtin function's operand into a bare integer to pass to a code-generating subfunction. Previously the only bare integers it knew how to handle were flags generated from within `arm_mve.td`. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: dmgreen, MarkMurrayARM Subscribers: echristo, hokein, rdhindsa, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71065
* [c++20] Implement P1946R0: allow defaulted comparisons to take theirRichard Smith2019-12-101-1/+4
| | | | arguments by value.
* [c++20] Delete defaulted comparison functions if they would invoke anRichard Smith2019-12-102-3/+14
| | | | inaccessible comparison function.
* [c++20] Implement P1185R2 (as modified by P2002R0).Richard Smith2019-12-103-6/+32
| | | | | | For each defaulted operator<=> in a class that doesn't explicitly declare any operator==, also inject a matching implicit defaulted operator==.
* Revert "[analyzer] Keep track of escaped locals"Gabor Horvath2019-12-103-14/+9
| | | | | | | | | | | | | | | It was a step in the right direction but it is not clear how can this fit into the checker API at this point. The pre-escape happens in the analyzer core and the checker has no control over it. If the checker is not interestd in a pre-escape it would need to do additional work on each escape to check if the escaped symbol is originated from an "uninteresting" pre-escaped memory region. In order to keep the checker API simple we abandoned this solution for now. We will reland this once we have a better answer for what to do on the checker side. This reverts commit f3a28202ef58551db15818f8f51afd21e0f3e231.
* [Remarks][Docs] Enhance documentation for opt-remarks driver optionsFrancis Visoiu Mistrih2019-12-101-4/+6
| | | | | Add better documentation about the naming scheme, add a few more explicit descriptions and make the sphinx look better.
* [c++20] Return type deduction for defaulted three-way comparisons.Richard Smith2019-12-102-0/+23
|
* Deprecate the hasDefaultArgument matcherStephen Kelly2019-12-101-0/+14
| | | | | | | | | | | | | | | Summary: It doesn't provide a way to match on the contents of the default argumment. Rather than give it that capability, make it deprecated and recomment the use of hasInitializer instead. Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71166
* [Wdocumentation] Use the command marker.Mark de Wever2019-12-101-2/+2
| | | | | | | | | Use the proper marker for -Wdocumentation-deprecated-sync instead of hard-coded the backslash. Discovered while looking at https://bugs.llvm.org/show_bug.cgi?id=43753 Differential Revision: https://reviews.llvm.org/D71139
* Add missed #include in llvmorg-10-init-11532-g848934c67d4.Richard Smith2019-12-101-0/+1
|
* [OPENMP]Remove extra space from error message.Alexey Bataev2019-12-101-1/+1
| | | | Fixed emission of 2 consecutive whitespaces in the error message.
* [analyzer] Keep track of escaped localsGabor Horvath2019-12-103-9/+14
| | | | | | | | We want to escape all symbols that are stored into escaped regions. The problem is, we did not know which local regions were escaped. Until now. This should fix some false positives like the one in the tests. Differential Revision: https://reviews.llvm.org/D71152
* [ARM][MVE] Refactor complex vector intrinsics [NFCI]Mikhail Maltsev2019-12-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch refactors instruction selection of the complex vector addition, multiplication and multiply-add intrinsics, so that it is now based on TableGen patterns rather than C++ code. It also changes the first parameter (halving vs non-halving) of the arm_mve_vcaddq IR intrinsic to match the corresponding instruction encoding, hence it requires some changes in the tests. The patch addresses David's comment in https://reviews.llvm.org/D71190 Reviewers: dmgreen, ostannard, simon_tatham, MarkMurrayARM Reviewed By: dmgreen Subscribers: merge_guards_bot, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71245
* [DebugInfo] Support to emit debugInfo for extern variablesYonghong Song2019-12-103-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extern variable usage in BPF is different from traditional pure user space application. Recent discussion in linux bpf mailing list has two use cases where debug info types are required to use extern variables: - extern types are required to have a suitable interface in libbpf (bpf loader) to provide kernel config parameters to bpf programs. https://lore.kernel.org/bpf/CAEf4BzYCNo5GeVGMhp3fhysQ=_axAf=23PtwaZs-yAyafmXC9g@mail.gmail.com/T/#t - extern types are required so kernel bpf verifier can verify program which uses external functions more precisely. This will make later link with actual external function no need to reverify. https://lore.kernel.org/bpf/87eez4odqp.fsf@toke.dk/T/#m8d5c3e87ffe7f2764e02d722cb0d8cbc136880ed This patch added clang support to emit debuginfo for extern variables with a TargetInfo hook to enable it. The debuginfo for the extern variable is emitted only if that extern variable is referenced in the current compilation unit. Currently, only BPF target enables to generate debug info for extern variables. The emission of such debuginfo is disabled for C++ at this moment since BPF only supports a subset of C language. Emission with C++ can be enabled later if an appropriate use case is identified. -fstandalone-debug permits us to see more debuginfo with the cost of bloated binary size. This patch did not add emission of extern variable debug info with -fstandalone-debug. This can be re-evaluated if there is a real need. Differential Revision: https://reviews.llvm.org/D70696
* [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.hJohannes Doerfert2019-12-104-303/+263
| | | | | | | | | | | | | | | | | | | Summary: The new OpenMPConstants.h is a location for all OpenMP related constants (and helpers) to live. This patch moves the directives there (the enum OpenMPDirectiveKind) and rewires Clang to use the new location. Initially part of D69785. Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: jholewinski, ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D69853
* [c++20] Fix handling of unqualified lookups from a defaulted comparisonRichard Smith2019-12-095-12/+50
| | | | | | | | | | function. We need to perform unqualified lookups from the context of a defaulted comparison, but not until we implicitly define the function, at which point we can't do those lookups any more. So perform the lookup from the end of the class containing the =default declaration and store the lookup results on the defaulted function until we synthesize the body.
* Revert "[ARM][MVE] Add intrinsics for immediate shifts."Eric Christopher2019-12-092-33/+2
| | | | | | | | | | | | | | and two follow-on commits: one warning fix and one functionality. As it's breaking at least the lto bot: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/15132/steps/test-stage1-compiler/logs/stdio This reverts commits: 8d70f3c933a5b81a87a5ab1af0e3e98ee2cd7c67 ff4dceef9201c5ae3924e92f6955977f243ac71d d97b3e3e65cd77a81b39732af84a1a4229e95091
* Avoid Attr.h includes, CodeGen editionReid Kleckner2019-12-091-1/+0
| | | | This saves around 20 includes of Attr.h. Not much.
* Include Stmt.h where it seems to be necessary for modules buildsReid Kleckner2019-12-091-0/+1
| | | | | | | | | | | | | | | | | | Summary: After 60573ae6fe50 removed an include of Expr.h from ASTContext.h, this header fails to compile in some modular build configurations. I have not been able to reproduce the problem locally. The header compiles fine in isolation. However, based on reading the code, it seems like it would require Stmt to be complete. Based on that intuition, we decided to add the include. Reviewers: rdhindsa Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71222
* [Attr] Move ParsedTargetAttr out of the TargetAttr classCraig Topper2019-12-092-10/+12
| | | | | | Need to forward declare it in ASTContext.h for D68627, so it can't be a nested struct. Differential Revision: https://reviews.llvm.org/D71159
* [ARM][MVE][Intrinsics] Add VQADDQ, VHADDQ, VRHADDQ, VQSUBQ, VHSUBQ, ↵Mark Murray2019-12-091-2/+55
| | | | | | | | | | | | | | VQDMULHQ, VQRDMULHQ intrinsics. Summary: Add VQADDQ, VHADDQ, VRHADDQ, VQSUBQ, VHSUBQ, VQDMULHQ, VQRDMULHQ intrinsics and unit tests. Reviewers: simon_tatham, ostannard, dmgreen, miyuki Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71198
* [ARM][MVE][Intrinsics] Add VMULL[BT]Q_(INT|POLY) intrinsics.Mark Murray2019-12-092-0/+49
| | | | | | | | | | | | Summary: Add VMULL[BT]Q_(INT|POLY) intrinsics and unit tests. Reviewers: simon_tatham, ostannard, dmgreen Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71066
* [ARM][MVE] Add intrinsics for immediate shifts.Simon Tatham2019-12-092-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds the family of `vshlq_n` and `vshrq_n` ACLE intrinsics, which shift every lane of a vector left or right by a compile-time immediate. They mostly work by expanding to the IR `shl`, `lshr` and `ashr` operations, with their second operand being a vector splat of the immediate. There's a fiddly special case, though. ACLE specifies that the immediate in `vshrq_n` can take values up to //and including// the bit size of the vector lane. But LLVM IR thinks that shifting right by the full size of the lane is UB, and feels free to replace the `lshr` with an `undef` half way through the optimization pipeline. Hence, to keep this legal in source code, I have to detect it at codegen time. Logical (unsigned) right shifts by the element size are handled by simply emitting the zero vector; arithmetic ones are converted into a shift of one bit less, which will always give the same output. In order to do that check, I also had to enhance the tablegen MveEmitter so that it can cope with converting a builtin function's operand into a bare integer to pass to a code-generating subfunction. Previously the only bare integers it knew how to handle were flags generated from within `arm_mve.td`. Reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71065
* [ARM][MVE] Add complex vector intrinsicsMikhail Maltsev2019-12-091-0/+62
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds intrinsics for the following MVE instructions: * VCADD, VHCADD * VCMUL * VCMLA Each of the above 3 groups has a corresponding new LLVM IR intrinsic. Reviewers: simon_tatham, MarkMurrayARM, ostannard, dmgreen Reviewed By: MarkMurrayARM Subscribers: merge_guards_bot, kristof.beyls, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71190
* Reland "[AST] Traverse the class type loc inside the member type loc.""Haojian Wu2019-12-091-2/+4
| | | | | | | | | | | | Summary: added a unittest which causes "TL.getClassTInfo" is null. Reviewers: ilya-biryukov Subscribers: mgorny, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71186
* [c++20] Synthesis of defaulted comparison functions.Richard Smith2019-12-084-12/+22
| | | | | | Array members are not yet handled. In addition, defaulted comparisons can't yet find comparison operators by unqualified lookup (only by member lookup and ADL). These issues will be fixed in follow-on changes.
* Fix typo in the AST Matcher Reference doc Closes: #54Sylvestre Ledru2019-12-081-1/+1
|
* [OpenMP] Require trivially copyable type for mappingJonas Hahnfeld2019-12-071-1/+1
| | | | | | | | | | | | | A trivially copyable type provides a trivial copy constructor and a trivial copy assignment operator. This is enough for the runtime to memcpy the data to the device. Additionally there must be no virtual functions or virtual base classes and the destructor is guaranteed to be trivial, ie performs no action. The runtime does not require trivial default constructors because on alloc the memory is undefined. Thus, weaken the warning to be only issued if the mapped type is not trivially copyable. Differential Revision: https://reviews.llvm.org/D71134
* [c++20] Determine whether a defaulted comparison should be deleted orRichard Smith2019-12-065-20/+66
| | | | constexpr.
* Add matchDynamic convenience functionsStephen Kelly2019-12-071-0/+27
| | | | | | | | | | Summary: These correspond to the existing match() free functions. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D54406
* Revert "[Sema][X86] Consider target attribute into the checks in ↵Reid Kleckner2019-12-062-15/+2
| | | | | | | | | validateOutputSize and validateInputSize." This reverts commit e1578fd2b79fe5af5f80c0c166a8abd0f816c022. It introduces a dependency on Attr.h which I am removing from ASTContext.h.
* [Sema][X86] Consider target attribute into the checks in validateOutputSize ↵Craig Topper2019-12-062-2/+15
| | | | | | | | | | | | | | | | and validateInputSize. The validateOutputSize and validateInputSize need to check whether AVX or AVX512 are enabled. But this can be affected by the target attribute so we need to factor that in. This patch copies some of the code from CodeGen to create an appropriate feature map that we can pass to the function. Probably need some refactoring here to share more code with Codegen. Is there a good place to do that? Also need to support the cpu_specific attribute as well. Differential Revision: https://reviews.llvm.org/D68627
* Remove Expr.h include from ASTContext.h, NFCReid Kleckner2019-12-066-33/+22
| | | | | | | ASTContext.h is popular, prune its includes. Expr.h brings in Attr.h, which is also expensive. Move BlockVarCopyInit to Expr.h to accomplish this.
* Make it possible control matcher traversal kind with ASTContextStephen Kelly2019-12-064-6/+106
| | | | | | | | | | | | | | | | Summary: This will eventually allow traversal of an AST while ignoring invisible AST nodes. Currently it depends on the available enum values for TraversalKinds. That can be extended to ignore all invisible nodes in the future. Reviewers: klimek, aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61837
* [WebAssebmly][MC] Support .import_name/.import_field asm directivesSam Clegg2019-12-061-4/+4
| | | | | | | | Convert the MC test to use asm rather than bitcode. This is a precursor to https://reviews.llvm.org/D70520. Differential Revision: https://reviews.llvm.org/D70877
* [OPENMP50]Add if clause in distribute simd directive.Alexey Bataev2019-12-061-0/+1
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP]Reorganize OpenMP warning groups.Alexey Bataev2019-12-062-2/+6
| | | | | openmp-mapping group is a subgroup of openmp-target warning group. Also, added global openmp group to control all other OpenMP warning groups.
* Add `QualType::hasAddressSpace`. NFC.Michael Liao2019-12-061-0/+8
| | | | | - Add that as a shorthand of <T>.getQualifiers().hasAddressSpace(). - Simplify related code.
* [OPENMP]Moved warning fo mapping non-trivially copiable types into aAlexey Bataev2019-12-061-1/+1
| | | | | | | separate group. Need to move this warning into a separate group to make easier to disable this warning, if required.
* Fix crash if a user-defined conversion is applied in the middle of aRichard Smith2019-12-051-0/+10
| | | | rewrite of an operator in terms of operator<=>.
* Revert "[AST] Traverse the class type loc inside the member type loc."Sterling Augustine2019-12-051-3/+2
| | | | | | | This reverts commit 7f93cb62280a73e3e899d49c45be8bfbac634b7d. The assertion at RecursiveASTVisitor.h:1169 fails when passed a TypeLocNode. Not sure if the correct fix is to use getTypeLocClass or something else.
* [Concepts] Constraint Enforcement & DiagnosticsSaar Raz2019-12-065-18/+227
| | | | | | | | | Part of the C++20 concepts implementation effort. - Associated constraints (requires clauses, currently) are now enforced when instantiating/specializing templates and when considering partial specializations and function overloads. - Elaborated diagnostics give helpful insight as to why the constraints were not satisfied. Phabricator: D41569 Re-commit, after fixing some memory bugs.
* Add documentation headings for the OpenCL attributes.Aaron Ballman2019-12-051-0/+5
| | | | This fixes the documentation build.
OpenPOWER on IntegriCloud