- Jan 24, 2023
-
-
Nuno Lopes authored
For some reason, it only fails on some buildbots, but not in all, and not on my computer..
-
Francesco Petrogalli authored
It breaks some builds [1] with the following error: ``` ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.build/tools/clang/lib/Basic -I/home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.src/clang/lib/Basic -I/home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.src/clang/include -I/home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.build/tools/clang/include -I/home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.build/include -I/home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.src/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/RISCV.cpp.o -MF tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/RISCV.cpp.o.d -o tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/RISCV.cpp.o -c /home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.src/clang/lib/Basic/Targets/RISCV.cpp In file included from /home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.src/clang/lib/Basic/Targets/RISCV.cpp:19: /home/omp-vega20-0/bbot/openmp-offload-amdgpu-runtime/llvm.src/llvm/include/llvm/TargetParser/RISCVTargetParser.h:29:10: fatal error: llvm/TargetParser/RISCVTargetParserDef.inc: No such file or directory 29 | #include "llvm/TargetParser/RISCVTargetParserDef.inc" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. 2.225 [3029/31/825] Building CXX object tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Version.cpp.o 2.524 [3029/30/826] Building RISCVTargetParserDef.inc... ``` [1] https://lab.llvm.org/buildbot/#/builders/193/builds/25362 This reverts commit 52bcdac3. -
Chris Cotter authored
rename_check.py now find and renames the test file. rename_check.py also will now use 'git mv', so the developer no longer has to manually add the file after running the script. Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D141463
-
Carlos Galvez authored
We forgot to apply the change to headers in the previous patch, due to missing "-header-filter" in the run-clang-tidy invocation. Differential Revision: https://reviews.llvm.org/D142307
-
Sam James authored
In Gentoo, we make use of Clang's recently-enhanced config file support and add a default include to `clang` invocations using '-include ...'. This breaks clang-python tests like so: ``` ====================================================================== ERROR: test_includes (tests.cindex.test_translation_unit.TestTranslationUnit) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/dev-python/clang-python-15.0.6/work/clang/bindings/python/tests/cindex/test_translation_unit.py", line 145, in test_includes eq(i[0], i[1]) File "/var/tmp/portage/dev-python/clang-python-15.0.6/work/clang/bindings/python/tests/cindex/test_translation_unit.py", line 132, in eq self.assert_normpaths_equal(expected[0], actual.source.name) AttributeError: 'NoneType' object has no attribute 'name' ====================================================================== FAIL... -
Francesco Petrogalli authored
The header file `llvm/include/llvm/Targetparser/RISCVTargetParser.h` relies on the auto-generated *.inc file associated to the tablegen target `RISCVTargetParserTableGen`. Both clangBasic and clangDriver include `RISCVTargetParser.h`, therefore we need to make sure that the *.inc file is avaiable to avoid compilation errors like the following: FAILED: tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/RISCV.cpp.o /usr/bin/c++ [bunch of non interesting stuff] -c <path-to>/llvm-project/clang/lib/Basic/Targets/RISCV.cpp In file included from <path-to>/llvm-project/clang/lib/Basic/Targets/RISCV.cpp:19: <path-to>/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h:29:10: fatal error: llvm/TargetParser/RISCVTargetParserDef.inc: No such file or directory 29 | #include "llvm/TargetParser/RISCVTargetParserDef.inc" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The stand-alone build of `clang` has been tested with the following script (see [*] for further information): ``` build_llvm=`pwd`/build-llvm build_clang=`pwd`/build-clang installprefix=`pwd`/install llvm=`pwd`/llvm-project mkdir -p $build_llvm mkdir -p $installprefix cmake -G Ninja -S $llvm/llvm -B $build_llvm \ -DLLVM_INSTALL_UTILS=ON \ -DCMAKE_INSTALL_PREFIX=$installprefix \ -DCMAKE_BUILD_TYPE=Release ninja -C $build_llvm install cmake -G Ninja -S $llvm/clang -B $build_clang \ -DLLVM_EXTERNAL_LIT=$build_llvm/utils/lit \ -DLLVM_ROOT=$installprefix ``` [*] https://llvm.org/docs/GettingStarted.html#stand-alone-builds Differential Revision: https://reviews.llvm.org/D141581 -
Hui authored
Differential Revision: https://reviews.llvm.org/D140913
-
Carlos Galvez authored
-
Carlos Galvez authored
We have a number of checks designed to analyze problems in header files only, for example: bugprone-suspicious-include google-build-namespaces llvm-header-guard misc-definitions-in-header ... All these checks duplicate the same logic and options to determine whether a location is placed in the main source file or in the header. More checks are coming up with similar requirements. Thus, to remove duplication, let's move this option to the top-level configuration of clang-tidy (since it's something all checks should share). Since the checks fetch the option via getLocalOrGlobal, the behavior is unchanged. Add a deprecation notice for all checks that use the local option, prompting to update to the global option. The functionality for parsing the option will need to remain in the checks during the transition period. Once the local options are fully removed, the goal is to store the parsed options in the ClangTidyContext, that checks can easily have access to. Differential Revision: https://reviews.llvm.org/D141000
-
Fangrui Song authored
-
Fangrui Song authored
-
Nicolai Hähnle authored
Occupancy is expressed as waves per SIMD. This means that we need to take into account the number of SIMDs per "CU" or, to be more precise, the number of SIMDs over which a workgroup may be distributed. getOccupancyWithLocalMemSize was wrong because it didn't take SIMDs into account at all. At the same time, we need to take into account that WGP mode offers access to a larger total amount of LDS, since this can affect how non-power-of-two LDS allocations are rounded. To make this work consistently, we distinguish between (available) local memory size and addressable local memory size (which is always limited by 64kB on gfx10+, even with WGP mode). This change results in a massive amount of test churn. A lot of it is caused by the fact that the default work group size is 1024, which means that (due to rounding effects) the default occupancy on older hardware is 8 instead of 10, which affects scheduling via register pressure estimates. I've adjusted most tests by just running the UTC tools, but in some cases I manually changed the work group size to 32 or 64 to make sure that work group size chunkiness has no effect. Differential Revision: https://reviews.llvm.org/D139468
-
Nicolai Hähnle authored
-
Nicolai Hähnle authored
Reduce the diff of subsequent changes.
-
Nicolai Hähnle authored
We will use this for more accurate occupancy computations. Note that IsaInfo takes WGP mode vs. CU mode into account on gfx10+. Differential Revision: https://reviews.llvm.org/D139467
-
Philip Reames authored
-
Slava Zakharin authored
Assume no conflict between pointer arrays and arrays without the target attribute, if the fact of an array not having the target attribute can be reliably computed. This change speeds up SPEC CPU2017/527.cam from 2.5k seconds to 880 seconds on Icelake, and makes further performance investigation easier. Differential Revision: https://reviews.llvm.org/D142273
-
Martin Storsjö authored
Differential Revision: https://reviews.llvm.org/D142346
-
Aart Bik authored
Fixes https://github.com/llvm/llvm-project/issues/59970 Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D142290
-
Fangrui Song authored
-
Valentin Clement authored
Make sure the source passed to an intrinsic is still polymorphic when it is an element of a polymorphic array. This was not handled properly before. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D142380
-
Lei Zhang authored
-
Anshil Gandhi authored
Allow iterating through SelectInst use of the alloca when checking if it is only ever overwritten from constant memory. Recursively determine if the SelectInst is replacable and insert it into the Worklist if so. Finally, define a new SelectInst to replace the old one, with both of it's values replaced according to the WorkMap. Differential Revision: https://reviews.llvm.org/D136524
-
Stanislav Mekhanoshin authored
Use more consistent way to avoid overflow when calculating SGPR and VGPR pressure limits. Differential Revision: https://reviews.llvm.org/D142262
-
Kazu Hirata authored
This patch fixes: llvm/lib/IR/DataLayout.cpp:942:13: warning: unused variable ‘VecTy’ [-Wunused-variable] llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2899:27: warning: unused variable ‘MI’ [-Wunused-variable]
-
Jay Foad authored
-
Aaron Ballman authored
-
Jason Molenda authored
On systems like ARM, where the non-addressable bits of a pointer value may be used for metadata (ARMv8.3 pointer authentication, or Type Byte Ignore), those bits need to be cleared before the address points to a valid memory location. Add a call to the target's ABI to clear those from address expression arguments to the lldb commands (e.g. `disassemble -a`). Differential Revision: https://reviews.llvm.org/D141629
-
Stanislav Mekhanoshin authored
Unlike older ASICs GFX10+ have a lot of VGPRs. Therefore, it is possible to achieve high occupancy even with all or almost all addressable VGPRs used. Our scheduler was never tuned for this scenario. The VGPR Critical Limit threshold always comes very high, even if maximum occupancy is targeted. For example on gfx1100 it is set to 192 registers even with the requested occupancy 16. As a result scheduler starts prioritizing register pressure reduction very late and we easily end up spilling. This patch makes VGPR critical limit similar to what we would have on pre-gfx10 targets with much more limited VGPR budget while still trying to maintain occupancy as it does now. Pre-gfx10 ASICs shall not be affected as the limit shall be the same as before, and on gfx10+ it shall only affect regions where we have to spill. Fixes: SWDEV-377300 Differential Revision: https://reviews.llvm.org/D141876
-
David Green authored
The Armv8.6-a and later architecture definitions included AES, SHA2, SHA3 and SM4, but this did not have an effect when specifying -march=armv8.6-a. The did not set preprocessor features (https://godbolt.org/z/1YKad6M8e) or enable the relevant instructions (like eor3 from sha3: https://godbolt.org/z/vY9v4MqvG). Similarly architectures armv8 to armv8.5 defined +crypto, but this did not effect the -march's, only the -mcpu with those architectures. I believe this was working as intended. After D141411 we now add the default features for architectures except for +crypto, which has had the effect of enabling aes/sha2/sha3/sm4 when -march=armv8.6-a is used. This patch removed those crypto features again, going back to how things were before. It also removes the AEK_CRYPTO feature from lower architecture levels, moving it to the cpus that use it. This shouldn't make any changes, but a few extra tests have been added for preprocessor features that have improved since llvm 15. The -mcpu=ampere1 cpu is the only armv8.6+ cpu at present. For that, the AES, SHA2 and SHA3 features have been re-added to the CPU definition to keep it in-line with the gcc definition from https://github.com/gcc-mirror/gcc/commit/db2f5d661239737157cf131de7d4df1c17d8d88d. Differential Revision: https://reviews.llvm.org/D141606
-
Pavel Iliin authored
Differential Revision: https://reviews.llvm.org/D142265
-
Han Zhu authored
Differential Revision: https://reviews.llvm.org/D142039
-
Pavel Iliin authored
This reverts commit 5474d7d9. Wrong differential revision link was used.
-
Shivam Gupta authored
When compiling clang/Lex/DirectoryLookup.h with option -Wbitfield-enum-conversion, we get the following warning: DirectoryLookup.h:77:17: warning: bit-field 'DirCharacteristic' is not wide enough to store all enumerators of 'CharacteristicKind' [-Wbitfield-enum-conversion] : u(Map), DirCharacteristic(DT), LookupType(LT_HeaderMap), DirCharacteristic is a bitfield with 2 bits (4 values) /// DirCharacteristic - The type of directory this is: this is an instance of /// SrcMgr::CharacteristicKind. unsigned DirCharacteristic : 2; Whereas SrcMgr::CharacterKind is an enum with 5 values: enum CharacteristicKind { C_User, C_System, C_ExternCSystem, C_User_ModuleMap, C_System_ModuleMap }; Solution is to increase DirCharacteristic bitfield from 2 to 3. Patch by Dimitri van Heesch Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D142304 -
Craig Topper authored
This reduces RISCV.td to mainly being a top level include file. Reviewed By: asb, luismarques Differential Revision: https://reviews.llvm.org/D142239
-
Adrian Prantl authored
-
Pavel Iliin authored
Differential Revision: https://reviews.llvm.org/D141606
-
Caroline Concatto authored
Add the following intrinsic: SQCVT SQCVTU UQCVT NOTE: These intrinsics are still in development and are subject to future changes. Reviewed By: kmclaughlin Differential Revision: https://reviews.llvm.org/D142035
-
Florian Hahn authored
This patch moves a couple of helper functions from the global llvm:: namespace into the SCCPSolver class. This reduces the need for separate SCCPSolver arguments and also limits the scope of those functions that have quite generic names. (The remaining isConstant and isOverdefined should ideally be removed) Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D142370
-