- Sep 30, 2023
-
-
Kazushi (Jam) Marukawa authored
Correct bad test in 1e004237. This affects clang-ppc64le-rhel.
-
Krzysztof Drewniak authored
SerializetToHsaco, as currently implemented, leaks the file descriptor of the .hsaco temporary file, which causes issues in long-running parallel compilation setups. See also https://github.com/ROCmSoftwarePlatform/rocMLIR/pull/1257
-
Alex Richardson authored
-
Alexey Bataev authored
This reverts commit 9f5960e0 to fix buildbots reported here https://lab.llvm.org/buildbot/#/builders/230/builds/19412.
-
Fangrui Song authored
On ELF platforms, when there is no global variable and the unique module ID is non-empty, COMDAT asan.module_ctor is created with no `__asan_register_elf_globals` calls. If this COMDAT is the prevailing copy selected by the linker, the linkage unit will have no `__asan_register_elf_globals` call: the redzone will not be poisoned and ODR violation checker will not work (#67677). This behavior is benign for -fno-sanitize-address-globals-dead-stripping because asan.module_ctor functions that call `__asan_register_globals` (`InstrumentGlobalsWithMetadataArray`) do not use COMDAT. To fix #67677: * Use COMDAT for -fsanitize-address-globals-dead-stripping on ELF platforms. * Call `__asan_register_elf_globals` even if there is no global variable. * If the unique module ID is empty, don't call SetComdatForGlobalMetadata: placing `@.str` in a COMDAT would incorrectly discard internal COMDAT `@.str` in other compile units. Alternatively, when there is no global variable, asan.module_ctor is not COMDAT and does not call `__asan_register_elf_globals`. However, the asan.module_ctor function cannot be eliminated by the linker. Tested the following script. Only ELF -fsanitize-address-globals-dead-stripping has changed behaviors. ``` echo > a.cc # no global variable, empty uniqueModuleId echo 'void f() {}' > b.cc # with global variable, with uniqueModuleId echo 'int g;' > c.cc # with global variable for t in x86_64-linux-gnu arm64-apple-macosx x86_64-windows-msvc; do for gc in -f{,no-}sanitize-address-globals-dead-stripping; do for f in a.cc b.cc c.cc; do echo /tmp/Rel/bin/clang -S --target=$t -fsanitize=address $gc $f -o - /tmp/Rel/bin/clang -S --target=$t -fsanitize=address $gc $f -o - | sed -n '/asan.module_ctor/,/ret/p' done done done ``` -
Congcong Cai authored
[Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (#65918)
-
Cyndy Ishida authored
-
Alex Langford authored
-
Fangrui Song authored
Revert #67745 "[asan] Ensure __asan_register_elf_globals is called in COMDAT asan.module_ctor (#67745)" This reverts commit 1a4b9b6f. When getUniqueModuleId(&M) is empty, we may add comdat to internal constants like $.str, causing spurious `error: relocation refers to a symbol in a discarded section` lld errors.
-
PiJoules authored
This initially just adds support for mangling.
-
Alexey Bataev authored
Need to add NumSrcElts param to is..Mask functions in ShuffleVectorInstruction class for better mask analysis. Mask.size() not always matches the sizes of the permuted vector(s). Allows to better estimate the cost in SLP and fix uses of the functions in other cases. Differential Revision: https://reviews.llvm.org/D158449
-
ziqingluo-90 authored
Extract included parts in the following tests to separate header files: - SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span-overload.cpp - SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span.cpp Removed the included part in the following tests as it is not useful: - SemaCXX/warn-unsafe-buffer-usage-warning-unevaluated-context.cpp
-
Arthur Eubanks authored
Otherwise they may mistakenly get the large section flag.
-
Kazu Hirata authored
This patch fixes: clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:61:13: error: unused function 'isShiftOverflow' [-Werror,-Wunused-function] clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp:66:13: error: unused function 'isLeftShiftResultUnrepresentable' [-Werror,-Wunused-function]
-
Kai Nacke authored
The GOFF file format is only supported on SystemZ.
-
LLVM GN Syncbot authored
-
Kai Nacke authored
Set ups the infrastructure to create an empty GOFF file. Also adds a GOFF writer which writes only HDR/END records. Reviewed By: jhenderson, kpn Differential Revision: https://reviews.llvm.org/D111437
-
Alex Langford authored
There is only one constructor in use so the rest can be removed.
-
Owen Pan authored
-
Shilei Tian authored
-
Richard Howell authored
This change sets the debug compilation directory when generating debug information for PCH object containers. This allows for overriding the compilation directory in debug information in precompiled pcm files.
-
Joseph Huber authored
Summary: The NVPTX backend is picky about the definitions of functions. Because we call these functions with these arguments it can cause some problems when it goes through the backend. This was observed in a different test for `printf` that hasn't been landed yet. Also adjust the priority.
-
DonatNagyE authored
Previously, bitwise shifts with constant operands were validated by the checker `core.UndefinedBinaryOperatorResult`. However, this logic was unreliable, and commit 25b9696b added the dedicated checker `core.BitwiseShift` which validated the preconditions of all bitwise shifts with a more accurate logic (that uses the real types from the AST instead of the unreliable type information encoded in `APSInt` objects). This commit disables the inaccurate logic that could mark bitwise shifts as 'undefined' and removes the redundant shift-related warning messages from core.UndefinedBinaryOperatorResult. The tests that were validating this logic are also deleted by this commit; but I verified that those testcases trigger the expected bug reports from `core.BitwiseShift`. (I didn't convert them to tests of `core.BitwiseShift`, because that checker already has its own extensive test suite with many analogous testcases.) I hope that there will be a time when the constant folding will be reliable, but until then we need hacky solutions like this improve the quality of results.
-
Joseph Huber authored
Summary: Previously this code was applied to the integration tests but did not copy the logic that stopped this from being passed to the GPU build. Copy the full line to avoid the warnings and prevent any libraries from being included.
-
Abhishek Varma authored
-- SoftmaxOp's `reifyResultShapes` function was wrongly casting it as a `LinalgOp`. -- This commit thus adds a fix to SoftmaxOp's reify result shape calculation. Signed-off-by:Abhishek Varma <abhishek@nod-labs.com>
-
Fangrui Song authored
On ELF platforms, when there is no global variable, COMDAT asan.module_ctor is created with no `__asan_register_elf_globals` calls. If this COMDAT is the prevailing copy selected by the linker, the linkage unit will have no `__asan_register_elf_globals` call: the redzone will not be poisoned and ODR violation checker will not work (#67677). This behavior is benign for -fno-sanitize-address-globals-dead-stripping because asan.module_ctor functions that call `__asan_register_globals` (`InstrumentGlobalsWithMetadataArray`) do not use COMDAT. To fix #67677: * Use COMDAT for -fsanitize-address-globals-dead-stripping on ELF platforms. * Call `__asan_register_elf_globals` even if there is no global variable. Alternatively, when there is no global variable, asan.module_ctor is not COMDAT and does not call `__asan_register_elf_globals`. However, the asan.module_ctor function cannot be eliminated by the linker. Tested the following script. Only ELF -fsanitize-address-globals-dead-stripping has changed behaviors. ``` echo > a.cc # no global variable, empty uniqueModuleId echo 'void f() {}' > b.cc # with global variable, with uniqueModuleId echo 'int g;' > c.cc # with global variable for t in x86_64-linux-gnu arm64-apple-macosx x86_64-windows-msvc; do for gc in -f{,no-}sanitize-address-globals-dead-stripping; do for f in a.cc b.cc c.cc; do echo /tmp/Rel/bin/clang -S --target=$t -fsanitize=address $gc $f -o - /tmp/Rel/bin/clang -S --target=$t -fsanitize=address $gc $f -o - | sed -n '/asan.module_ctor/,/ret/p' done done done ``` -
Visoiu Mistrih Francis authored
Similar to 806761a7
-
River Riddle authored
LLDB_EXPORT_ALL_SYMBOLS is useful when building out-of-tree plugins and extensions that rely on LLDB's internal symbols. For example, this is how the Mojo language provides its REPL and debugger support. Supporting this on windows is kind of tricky because this is normally expected to be done using dllexport/dllimport, but lldb uses these with the public api. This PR takes an approach similar to what LLVM does with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS, and what chromium does for [abseil](https://github.com/chromium/chromium/blob/253d14e20fdc0cab05e5516770dceca18f9bddaf/third_party/abseil-cpp/generate_def_files.py), and uses a python script to extract the necessary symbols by looking at the symbol table for the various lldb libraries.
-
Jan Svoboda authored
-
Arthur Eubanks authored
These don't affect the IR, so we should ignore them.
-
Fangrui Song authored
Similar to commit 806761a7 to avoid issues due to object file format differences. These tests are currently benign.
-
isuckatcs authored
This patch makes sure that everything is cleaned up properly when ExprConstant evaluates an ArrayInitLoopExpr. Fixes #57135
-
Shilei Tian authored
This patch starts the support for OpenMP kernel language, basically to write OpenMP target region in SIMT style, similar to kernel languages such as CUDA. What included in this first patch is the `ompx_bare` clause for `target teams` directive. When `ompx_bare` exists, globalization is disabled such that local variables will not be globalized. The runtime init/deinit function calls will not be emitted. That being said, almost all OpenMP executable directives are not supported in the region, such as parallel, task. This patch doesn't include the Sema checks for that, so the use of them is UB. Simple directives, such as atomic, can be used. We provide a set of APIs (for C, they are prefix with `ompx_`; for C++, they are in `ompx` namespace) to get thread id, block id, etc. For more details, you can refer to https://tianshilei.me/wp-content/uploads/llvm-hpc-2023.pdf.
-
Jan Svoboda authored
-
Andrzej Warzynski authored
-
Benjamin Kramer authored
They're still non-standard in C++17.
-
Shilei Tian authored
#67167 reports a potential memory overflow caused by the wrong size passed to the function `memcpy_s`. This patch fixes it. Fix #67167.
-
Andrzej Warzyński authored
Added extra comment that should clarify the need for an insertion guard when using `getLoopOverTileSlices`. Also removed some redundant calls to `setInsertionPointAfter` - the insertion guard would overwrite that on destruction anyway.
-