- Aug 10, 2023
-
-
Raghu Maddhipatla authored
Added semantic support for following restriction which applies to OMP DISTRIBUTE directives - A list item may appear in a firstprivate or lastprivate clause but not both. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D157465
-
Richard Dzenis authored
Predefined identifiers like __FUNCTION__ are treated like string literals in MSVC, which means they can be concatentated together with an adjacent string literal. Clang now supports this behavior as well, in Microsoft extensions mode. Fixes https://github.com/llvm/llvm-project/issues/63563 Differential Revision: https://reviews.llvm.org/D153914
-
Jon Roelofs authored
This reverts commit 30b4351c. This caused a dependency cycle that the Swift build picked up on: ``` CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle): "llvm-tblgen" of type EXECUTABLE depends on "LLVMCodeGenTypes" (weak) depends on "LLVMTableGenGlobalISel" (weak) depends on "intrinsics_gen" (strong) "LLVMTableGenGlobalISel" of type STATIC_LIBRARY depends on "LLVMCodeGenTypes" (weak) depends on "vt_gen" (strong) "vt_gen" of type UTILITY depends on "llvm-tblgen" (strong) "autogen_intrinsics_RISCV" of type UTILITY depends on "llvm-tblgen" (strong) "intrinsics_gen" of type UTILITY depends on "llvm-tblgen" (strong) depends on "autogen_intrinsics_RISCV" (strong) "LLVMCodeGenTypes" of type STATIC_LIBRARY depends on "vt_gen" (strong) ``` rdar://113636528
-
Ben Langmuir authored
Add a way to enable -Wsystem-headers only for a specific module. This is useful for validating a module that would otherwise not see system header diagnostics without being flooded by diagnostics for unrelated headers/modules. It's relatively common for a module to be marked [system] but still wish to validate itself explicitly. rdar://113401565 Differential Revision: https://reviews.llvm.org/D156948
-
Mark de Wever authored
This patch is based on the suggestion by @ChuanqiXu on discourse (https://discourse.llvm.org/t/alternatives-to-the-implementation-of-std-modules/71958) Instead of making a module partition per header every header gets an inc file which contains the exports per header. The std module then includes all public headers and these inc files. The one file per header is useful for testing purposes. The CI tests whether the exports of a header's module partition matches the "public" named declarations in the header. With one file per header this can still be done. The patch improves compilation time of files using "import std;" and the size of the std module. A comparision of the compilation speed using a libc++ test build/bin/llvm-lit -a -Dstd=c++23 -Denable_modules=std libcxx/test/std/modules/std.pass.cpp Which boils down to import std; int main(int, char**) { std::println("Hello modular world"); return 0; } and has -ftime-report enabled Before ===-------------------------------------------------------------------------=== Clang front-end time report ===-------------------------------------------------------------------------=== Total Execution Time: 8.6585 seconds (8.6619 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 4.5041 ( 57.2%) 0.4264 ( 54.4%) 4.9305 ( 56.9%) 4.9331 ( 57.0%) Clang front-end timer 3.2037 ( 40.7%) 0.2408 ( 30.7%) 3.4445 ( 39.8%) 3.4452 ( 39.8%) Reading modules 0.1665 ( 2.1%) 0.1170 ( 14.9%) 0.2835 ( 3.3%) 0.2837 ( 3.3%) Loading .../build/test/__config_module__/CMakeFiles/std.dir/std.pcm 7.8744 (100.0%) 0.7842 (100.0%) 8.6585 (100.0%) 8.6619 (100.0%) Total After ===-------------------------------------------------------------------------=== Clang front-end time report ===-------------------------------------------------------------------------=== Total Execution Time: 1.2420 seconds (1.2423 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 0.8892 ( 84.6%) 0.1698 ( 88.8%) 1.0590 ( 85.3%) 1.0590 ( 85.2%) Clang front-end timer 0.1533 ( 14.6%) 0.0168 ( 8.8%) 0.1701 ( 13.7%) 0.1704 ( 13.7%) Reading modules 0.0082 ( 0.8%) 0.0047 ( 2.5%) 0.0129 ( 1.0%) 0.0129 ( 1.0%) Loading .../build/test/__config_module__/CMakeFiles/std.dir/std.pcm 1.0507 (100.0%) 0.1913 (100.0%) 1.2420 (100.0%) 1.2423 (100.0%) Total Using "include <print>" instead of "import module;" ===-------------------------------------------------------------------------=== Clang front-end time report ===-------------------------------------------------------------------------=== Total Execution Time: 2.1507 seconds (2.1517 wall clock) ---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name --- 1.9714 (100.0%) 0.1793 (100.0%) 2.1507 (100.0%) 2.1517 (100.0%) Clang front-end timer 1.9714 (100.0%) 0.1793 (100.0%) 2.1507 (100.0%) 2.1517 (100.0%) Total It's possible to use the std module in external projects (https://libcxx.llvm.org/Modules.html#using-in-external-projects) Tested this with a private project to validate the size of the generated files: Before $ du -sch std-* 448M std-build 508K std-src 120K std-subbuild 449M total After $ du -sch std-* 29M std-build 1004K std-src 132K std-subbuild 30M total Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D156907
-
Valentin Clement authored
-
Michael Jones authored
Sometimes the vfprintf test was failing, I suspect that's due to it using the same filename as the fprintf test. This patch fixes that problem by changing the filename of the vfprintf output file. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D157523
-
Valentin Clement authored
Generate the register function for global declare variable. This function is meant to be called after the actual data is allocated. Patch to insert the function call and attribute will follow. Depends on D157338 Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D157339
-
Michael Jones authored
This patch fixes the floating point conversion warnings found with `-Wconversion` and `-Wno-sign-conversion`. These were the last warnings I found, meaning that once this lands https://reviews.llvm.org/D156630 should be unblocked. Reviewed By: mcgrathr, lntue Differential Revision: https://reviews.llvm.org/D157449
-
Jan Svoboda authored
The current `ASTReader::visitInputFiles()` function calls into `FileManager` to create `FileEntryRef` objects. This ends up being fairly costly in `clang-scan-deps`, where we mostly only care about file paths. This patch introduces new `ASTReader` API that gives clients access to just the serialized paths. Since the scanner needs both the as-requested path and the on-disk one (and doesn't want to transform the former into the latter via `FileManager`), this patch starts serializing both of them into the PCM file if they differ. This increases the size of scanning PCMs by 0.1% and speeds up scanning by 5%. Reviewed By: benlangmuir, vsapsai Differential Revision: https://reviews.llvm.org/D157066
-
Jorge Gorbe Moya authored
-
Mark de Wever authored
As suggested by @ldionne. Reviewed By: ldionne, #libc, avogelsgesang Differential Revision: https://reviews.llvm.org/D156030
-
Jan Svoboda authored
When generating command lines, use the option spelling generated by TableGen (`StringLiteral`) instead of constructing it at runtime. This saves some needless allocations. Depends on D157029. Reviewed By: benlangmuir, MaskRay Differential Revision: https://reviews.llvm.org/D157054
-
Jan Svoboda authored
Some Clang command-line handling code could benefit from the option's prefixed name being a `StringLiteral`. This patch changes the `llvm::opt` TableGen backend to generate and emit that into the .inc file. Depends on D157028. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D157029
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
-
Slava Zakharin authored
The actual polymorphic expression argument that is passed to a non-polymorphic contiguous dummy has to be made a contiguous entity with the dynamic type matching the declared type of the dummy argument. The solution is to associate the expression with a temporary of the dynamic type of the expression, then rebox the temporary to the declared type of the dummy argument, and then, if necessary, make copy-in into another temporary that is, finally, a contiguous entity with the required dynamic type. With this change a single prepared argument may have up to two associated clean-ups, so I had to change the clean-ups handling. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D157464
-
Cyndy Ishida authored
The offset recorded in export trie nodes is used to capture symbol information like address and node size. This offset should be relative to the root of the trie. This updates to `processExportNode` to follow that expectation. Reviewed By: pete, steven_wu Differential Revision: https://reviews.llvm.org/D157431
-
Valentin Clement authored
D157096 introduces a new verifier for debug location on call operation. `isDeclaration()` is actually not defined for `LLVMFuncOp` and default to the interface definition that always return `false`. This leads to wrong diagnostic in some case as shown in the added test. Use `callee.isExternal()` instead that returns the desired information. We have seen this error being triggered during flang codegen. Reviewed By: Dinistro, vzakhari Differential Revision: https://reviews.llvm.org/D157447
-
- Aug 09, 2023
-
-
Matthias Springer authored
Three different options can be specified: * `bufferization.copy_tensor` (default) * `linalg.copy` * `none` (no copy_back) Differential Revision: https://reviews.llvm.org/D156173
-
priyanshi1708 authored
Transforms and(fcmp(a, b), fcmp(c, d)) into fccmp(fcmp(a, b), c, d) Issue link: https://github.com/llvm/llvm-project/issues/60819 Differential Revision: https://reviews.llvm.org/D152714
-
Markus Böck authored
-
Fangrui Song authored
Otherwise, if -DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-linux-gnu, the %clang command will exit with code 1 (see https://reviews.llvm.org/D130190). Exposed by D156363.
-
Nikita Popov authored
-
Nikita Popov authored
Drop an unnecessary bitcast and make use of the ConstantFoldLoadFromConstPtr API that accepts an Offset, instead of going through a GEP expression.
-
Jonas Hahnfeld authored
This test case was fixed in commit 2c4620c1 ("Consider the scope spec in template lookups for deduction guides."), but it is worth having a dedicated test case with a templated struct and a using declaration. Differential Revision: https://reviews.llvm.org/D157477
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D157501
-
Dmitri Gribenko authored
Tests should not write to the CWD because it might not be writeable. Either use %t, or /dev/null if the test does not check the output.
-
Nikita Popov authored
This bitcast is no longer needed.
-
Vy Nguyen authored
Details: calling getMemoryBufferRef() on an empty archive can trigger segfault so the code should check before calling this. this seems like a bug in the Archive API but that can be fixed separately. P.S: follow up to D156468 Differential Revision: https://reviews.llvm.org/D157300
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D157074
-
Mikhail R. Gadelha authored
This patch adds support for yocto images, which are custom Linux-base systems created by yocto. $CMAKE_HOST_SYSTEM_NAME returns "poky" as the system name, but it is a linux image, so we just replace the name with "linux", so libc can use the correct path. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D157404
-
Ties Stuij authored
This patch moves the overall lower-bound arch restriction for Arm XO sections from v8m to v6m. Actual implementation of code-gen for v6m will follow in follow-up patches, which will include an implementation of relocations needed to support this. Reviewed By: simonwallis2, MaskRay Differential Revision: https://reviews.llvm.org/D149444
-
Endre Fülöp authored
The alpha.cplusplus.EnumCastOutOfRange checker previously gave many false positives because a warning was given if the initializer value did not appear in the enumerator list. The strict handling caused std::byte to always give a warning, as it is implemented as an enum class without any declarators. Reviewed By: donat.nagy, steakhal Differential Revision: https://reviews.llvm.org/D153954
-
Christian Ulmann authored
This commit ensures that debug intrinsics are imported after all other instructions of a function were imported. Debug intrinsics in LLVM are excluded from the define-before-use invariant, i.e., they can reference SSA values that do not dominate them. So far, we had implemented checks to stop the import of such intrinsics, but there were always additional cases that were not covered (the latest being terminators that define such used values). Reviewed By: gysit, zero9178 Differential Revision: https://reviews.llvm.org/D157496
-
Paul Walker authored
The function changeVectorElementType assumes MVT input types will result in MVT output types. There's no gurantee this is possible during early code generation and so this patch converts an instance used during initial DAG construction to instead explicitly create a new EVT. NOTE: I could have added more MVTs, but that seemed unscalable as you can either have MVTs with 100% element count coverage or 100% bitwidth coverage, but not both. Differential Revision: https://reviews.llvm.org/D157392
-
Matt Devereau authored
The example sequence add z0.h, z0.h, #32 lsr z0.h, #6 st1b z0.h, x1 can be replaced with rshrnb z0.b, #6 st1b z0.h, x1 As the top half of the destination elements are truncated. In similar fashion, add z0.s, z0.s, #32 lsr z1.s, z1.s, #6 add z1.s, z1.s, #32 lsr z0.s, z0.s, #6 uzp1 z0.h, z0.h, z1.h Can be replaced with rshrnb z1.h, z1.s, #6 rshrnb z0.h, z0.s, #6 uzp1 z0.h, z0.h, z1.h Differential Revision: https://reviews.llvm.org/D155299
-
Nikita Popov authored
Avoid spurious variable name changes in future patch.
-
Quentin Colombet authored
When emitting the assembly we perform some late global variables demotion. Prior to this patch, this optimization was only performed on variables with the internal linkage whereas any local global variable can be demoted. Fix that by using `hasLocalLinkage` instead of `hasInternalLinkage`. Without this change, global variables with the `private` linkage wouldn't be demoted. Differential Revision: https://reviews.llvm.org/D154507
-