- Jan 12, 2024
-
-
paperchalice authored
Should fix arm build bots
-
Joseph Huber authored
Summary: This patch is an attempt to get a clean run of `check-openmp` running on an NVPTX machine. I simply took the lists of tests that failed on my `sm_89` machine and disabled them or fixed them. A lot of these tests are disabled on AMDGPU already, so it makes sense that NVPTX fails. The others are simply problems with NVPTX optimized debugging which will need to be fixed. I opened an issue on one of them.
-
Tom Stellard authored
Now that the project uses PRs for code review, we don't need to use the llvm/llvm-project-release-prs repo for reviewing backports.
-
Tom Stellard authored
This option is LLVM_RELEASE_ENABLE_LTO and it's turned on by default.
-
Haowei authored
Before this patch, when an unknown symbol type is used in IFS stub, it will be treated as a NO_TYPE and parsed without error. This patch makes llvm-ifs throw an error when this scenario happens.
-
Matthew Voss authored
Unified LTO and Fat LTO do not use the regular LTO prelink pipeline when -flto/-flto=full is specified on the command line, thus they require LowerMatrixIntrinsicsPass to be run during the link stage. To enable this, we pass -enable-matrix to the LTO driver, replicating ThinLTO behavior. This fix was applied to ThinLTO in https://reviews.llvm.org/D153583. This fixes #77621.
-
LLVM GN Syncbot authored
-
paperchalice authored
In fact, there are several backends, e.g. AArch64, AMDGPU etc. add module pass after function pass, this patch removes this constraint. This patch also adds a simple unit test for `CodeGenPassBuilder`.
-
Nico Weber authored
To heal bots that have been broken for days while discussions on https://github.com/llvm/llvm-project/pull/76733 are ongoing.
-
Alexandre Ganea authored
Previously, some tools such as `clang` or `lld` which require strict order for certain command-line options, such as `clang -cc1` or `lld -flavor`, would not longer work on Windows, when these tools were linked as part of `llvm-driver`. This was caused by `InitLLVM` which was part of the `*_main()` function of these tools, which in turn calls `windows::GetCommandLineArguments`. That function completly replaces argc/argv by new UTF-8 contents, so any ajustements to argc/argv made by `llvm-driver` prior to calling these tools was reset. `InitLLVM` is now called by the `llvm-driver`. Any tool that participates in (or is part of) the `llvm-driver` doesn't call `InitLLVM` anymore.
-
Alexandre Ganea authored
Previously, even though LLD was linked as part of llvm-driver when using `cmake ... -DLLVM_TOOL_LLVM_DRIVER_BUILD=ON`, there were build issues when compiling incrementally. Sometimes link errors when linking LLD, other times, the `llvm.exe` would be impropely be replaced by `lld.exe`.
-
PiJoules authored
In an effort to reduce more mmap fragmentation, allocate a large enough vmar where we can map sanitizer internals via DoAnonymousMmap. Objects being mapped here include asan's FakeStack, LowLevelAllocator mappings, the primary allocator's TwoLevelMap, InternalMmapVector, StackStore, and asan's thread internals. The vmar is large enough to hold the total size of these objects seen in a "typical" process lifetime. If the vmar is full, it will fallback to mapping in the root vmar.
-
Artem Dergachev authored
This is a performance optimization for HTML diagnostics output mode. Currently they're incredibly inefficient: * The HTMLRewriter is re-run from scratch on every file on every report. Each such re-run involves re-lexing the entire file and producing a syntax-highlighted webpage of the entire file, with text behind macros duplicated as pop-up macro expansion tooltips. Then, warning and note bubbles are injected into the page. Only the bubble part is different across reports; everything else can theoretically be cached. * Additionally, if duplicate reports are emitted (with the same issue hash), HTMLRewriter will be re-run even though the output file is going to be discarded due to filename collision. This is mostly an issue for path-insensitive bug reports because path-sensitive bug reports are already deduplicated by the BugReporter as part of searching for the shortest bug path. But on some translation units almost 80% of bug reports are dry-run here. We only get away with all this because there are usually very few reports emitted per file. But if loud checkers are enabled, such as `webkit.*`, this may explode in complexity and even cause the compiler to run over the 32-bit SourceLocation addressing limit. (We're re-lexing everything each time, remember?) This patch hotfixes the *second* problem. Adds a FIXME for the first problem, which will require more yak shaving to solve. rdar://120801986
-
Ivan Butygin authored
Temporarily reverting as it broke python bindings This reverts commit a7262d2d.
-
Ivan Butygin authored
Temporarily reverting as it broke python bindings This reverts commit 9ed30012.
-
Ivan Butygin authored
Temporaryly reverting as it broke python bindings This reverts commit 4278d9b5.
-
James Y Knight authored
This was planned since its introduction, but wasn't rolled out for a little bit longer than intended (ahem...8 years). All in-tree targets have now been adjusted to call setMaxAtomicSizeInBitsSupported explicitly where required, so this should be a no-op. The docs in docs/Atomics.rst already claimed the default was 0, so that doesn't need updating.
-
Jakub Kuderski authored
The new flag, `--mlir-print-skip-regions`, sets the op printing option that disables region printing. This results in the usual `--mlir-print-ir-*` debug options printing only the names of the executed passes and the signatures of the ops. Example: ```mlir // -----// IR Dump Before CSE (cse) //----- // func.func @bar(%arg0: f32, %arg1: f32) -> f32 {...} // -----// IR Dump Before Canonicalizer (canonicalize) //----- // func.func @bar(%arg0: f32, %arg1: f32) -> f32 {...} ``` The main use-case is to be triage compilation issues (crashes, slowness) on very deep pass pipelines and with very large IR files, where printing IR is prohibitively slow otherwise. -
Amir Ayupov authored
Further reduce the size of BAT section: - large binary: to 12716312 bytes (0.33x original), - medium binary: to 1649472 bytes (0.28x original), - small binary: to 428 bytes (0.30x original). Test Plan: Updated bolt/test/X86/bolt-address-translation.test
-
Amir Ayupov authored
This change further reduces the size of BAT: - large binary: to 13073904 bytes (0.34x original), - medium binary: to 1703116 bytes (0.29x original), - small binary: to 436 bytes (0.30x original). Test Plan: Updated bolt/test/X86/bolt-address-translation.test
-
a-n-n-a-l-e-e authored
When using LIBCXX_CXX_ABI=system-libcxxabi on Apple platforms, we would not re-export the libc++abi symbols unlike when LIBCXX_CXX_ABI=libcxxabi. This was caused by overly strict string matching in CMake. https://github.com/NixOS/nixpkgs/issues/269548
-
Fangrui Song authored
StackSafetyAnalysis determines whether stack-allocated variables are guaranteed to be safe from memory access bugs and enables the removal of certain unneeded instrumentations. (hwasan enables StackSafetyAnalysis in https://reviews.llvm.org/D108381) In a release build of clang, text sections are 9% smaller. Test updates: * asan-stack-safety.ll: test the -asan-use-stack-safety=1 default * lifetime-uar-uas.ll: switch to an indexed store to prevent StackSafetyAnalysis from optimizing out instrumentation for %c * alloca_vla_interact.cpp: add a load to prevent StackSafetyAnalysis from optimizing out `__asan_alloca_poison` for the VLA `array` * scariness_score_test.cpp: add -asan-use-stack-safety=0 to make a load of a `__asan_poison_memory_region`-poisoned local variable fail as intended. * other .ll tests: add -asan-use-stack-safety=0 Reviewed By: kstoimenov Pull Request: https://github.com/llvm/llvm-project/pull/77210
-
Valentin Clement authored
-
Fangrui Song authored
Clang generates llvm.memset.p0.i64 with a length of -1 for the following code in `-stdlib=libc++ -std=c++20` mode (https://github.com/llvm/llvm-project/pull/77210#issuecomment-1887650010) ```cpp bool strtof_clamp(const std::string &str); void floatsuffix_check(char *yytext_r) { std::string text = yytext_r; text.resize(text.size() - 1); strtof_clamp(text); } ``` `Sizes = [0xffffffffffffffff, 0)`. `SizeRange = [0, 0-1)`, leading to `assert(!isUnsafe(SizeRange));` failure. Bail out if the length is -1. Other negative values are handled by the existing condition.
-
Valentin Clement (バレンタイン クレメン) authored
Only the dim argument is allowed on the gang clause for the routine directive. Reject static and num arguments in the semantic check.
-
Andy Kaylor authored
Adding a new working group to discuss floating-point issues
-
Daniel Thornburgh authored
-
Philip Reames authored
This reverts commit fdb87640, and thus re-enables terminator folding for RISCV. The reported miscompile has been fixed in f5dd70c5.
-
Valentin Clement (バレンタイン クレメン) authored
this patch enforce or fix the enforcement of two restrictions from section 2.15.1: > Only the gang, worker, vector, seq and bind clauses may follow a device_type clause. `seq` was not allowed after `device_type` with the current implementation. > Exactly one of the gang, worker, vector, or seq clauses must appear. This was not properly checked. This patch check correctly for mutually exclusion as described in section 2.4. Mutually exclusive clauses may appear on the same directive if they apply for different device_type.
-
Krzysztof Parzyszek authored
This reverts commit cc53ec82. This commit hasn't accomplished anything. The original issue was that `DumpTree`, when called from lowering, caused linker errors due to some directive-naming functions being absent. Adding FrontendOpenMP to the parser library didn't fix that problem, and according to the notes in PR #77483, calling `DumpTree` from lowering isn't really supported.
-
Valentin Clement (バレンタイン クレメン) authored
The IR representation for gang, vector and worker has grown with the support for device_type. This patch simplify the IR representation for gang, vector and worker information on the acc.loop operation. When the only the keyword is present without any values, the information is printed at the same place than when there is values. The device_type is omitted if there is no values and it is equal to None. Otherwise the full information is displayed. First the keyword only device_type information and then the values with their device_type.
-
Joseph Huber authored
Summary: The constructors and destructors look up a symbol in the ELF quickly to determine if they need to be run on the GPU. This allows us to avoid the very slow actions required to do the slower lookup using the vendor API. One problem occurs with how we handle the lifetime of these images. Right now there is no invariant to specify the lifetime of the underlying binary image that is loaded. In the typical case, this comes from the binary itself in the `.llvm.offloading` section, meaning that the lifetime of the binary should match the executable itself. This would work fine, if it weren't for the fact that the plugin is loaded via `dlopen` and can have a teardown order out of sync with the main executable. This was likely what was occuring when this failed on some systems but not others. A potential solution would be to simply copy images into memory so the runtime does not rely on external references. Another would be to manually zero these out after initialization as to prevent this mistake from happening accidentally. The former has the benefit of making some checks easier, and allowing for constant initialization be done on the ELF itself (normally we can't do this because writing to a constant section, e.g. .llvm.offloading is a segfault.). The downside would be the extra time required to copy the image in bulk (Although we are likely doing this in the vendor runtimes as well). This patch went with a quick solution to simply set a boolean value at initialization time if we need to call destructors. Fixes: https://github.com/llvm/llvm-project/issues/77798
-
Tacet authored
This commit is a refactor (increases readability) and optimization fix. This is a fixed commit of https://github.com/llvm/llvm-project/pull/76200 First reverthed here: https://github.com/llvm/llvm-project/commit/1ea7a56057492d9da1124787a9855cc2edca7df9 Please, check original PR for details. The difference is a return type of the lambda. Original description: This commit addresses optimization and instrumentation challenges encountered within comma constructors. 1) _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS does not work in comma constructors. 2) Code inside comma constructors is not always correctly optimized. Problematic code examples: - `: __r_(((__str.__is_long() ? 0 : (__str.__annotate_delete(), 0)), std::move(__str.__r_))) {` - `: __r_(__r_([&](){ if(!__s.__is_long()) __s.__annotate_delete(); return std::move(__s.__r_);}())) {` However, lambda with argument seems to be correctly optimized. This patch uses that fact. Use of lambda based on idea from @ldionne.
-
Kazu Hirata authored
This patch fixes: mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp:3154:8: error: unused variable 'rank' [-Werror,-Wunused-variable]
-
Amir Ayupov authored
Reduces BAT section size, bytes: - large binary: 38676872 -> 23262524 (0.60x), - medium binary (trunk clang): 5938004 -> 3213504 (0.54x), - small binary (X86/bolt-address-translation.test): 1436 -> 680 (0.47x). Test Plan: Updated bolt/test/X86/bolt-address-translation.test
-
Amir Ayupov authored
Test Plan: Open the page in browser
-
Kazu Hirata authored
This patch fixes: flang/unittests/Runtime/CommandTest.cpp:702:14: error: variable length arrays are a C99 feature [-Werror,-Wvla-extension]
-
Kazu Hirata authored
This patch fixes: clang/unittests/Format/TokenAnnotatorTest.cpp:2181:29: error: lambda capture 'Style' is not used [-Werror,-Wunused-lambda-capture]
-
Kazu Hirata authored
This patch fixes: flang/runtime/extensions.cpp:111:12: error: variable length arrays are a C99 feature [-Werror,-Wvla-extension]
-