- Jun 16, 2022
-
-
Michael Jones authored
Add return values to converter functions to allow for better error handling when writing files. Also move the file writing code around to be easier to read. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D127773
-
Jacques Pienaar authored
-
Petr Hosek authored
We shouldn't assume that libunwind.so is available. Rather can defer the decision to the linker which defaults to libunwind.so, but if .so isn't available, it'd pick libunwind.a. Users can use -static-libgcc and -shared-libgcc to override this behavior and explicitly choose the version they want. Differential Revision: https://reviews.llvm.org/D127528
-
Benjamin Kramer authored
-
Jin Xin Ng authored
Previously if the inliner split an SCC such that an empty one remained, the MLInlineAdvisor could potentially lose track of the EdgeCount if a subsequent CGSCC pass modified the calls of a function that was initially in the SCC pre-split. Saving the seen nodes in onPassEntry resolves this. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D127693
-
Florian Hahn authored
The only user that passed in a custom builder was passing in VPTransformState::Builder, which is the same as ILV::Builder.
-
Fangrui Song authored
The driver option -no-pie is preferred: Clang selects different crt*.o files, though the PIC one usually can replace the non-PIC one.
-
Thomas Raoux authored
The maxf implementation of wmma elementwise op was incorrect as the operands of the select to check for Nan were swapped. Differential Revision: https://reviews.llvm.org/D127879
-
Simon Pilgrim authored
addImm takes a int64_t arg but we were using uint64_t types
-
Mitch Phillips authored
Adds the -fsanitize plumbing for memtag-globals. Makes -fsanitize=memtag imply -fsanitize=memtag-globals. This has no effect on codegen for now. Reviewed By: eugenis, aaron.ballman Differential Revision: https://reviews.llvm.org/D127163
-
Okwan Kwon authored
Differential Revision: https://reviews.llvm.org/D127691
-
Quinn Pham authored
This patch changes the PowerPC backend to generate VSX load/store instructions for all vector loads/stores on Power8 and earlier (LE) instead of VMX load/store instructions. The reason for this change is because VMX instructions require the vector to be 16-byte aligned. So, a vector load/store will fail with VMX instructions if the vector is misaligned. Also, `gcc` generates VSX instructions in this situation which allow for unaligned access but require a swap instruction after loading/before storing. This is not an issue for BE because we already emit VSX instructions since no swap is required. And this is not an issue on Power9 and up since we have access to `lxv[x]`/`stxv[x]` which allow for unaligned access and do not require swaps. This patch also delays the VSX load/store for LE combines until after LegalizeOps to prioritize other load/store combines. Reviewed By: #powerpc, stefanp Differential Revision: https://reviews.llvm.org/D127309
-
Rob Suderman authored
Existing slice lowering only supporting static shapes. Reviewed By: NatashaKnk Differential Revision: https://reviews.llvm.org/D127704
-
Benjamin Kramer authored
-
Snehasish Kumar authored
Until we have symbolization for position independent code lets update this documentation since clang now defaults to position independent code. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D127808
-
Alex Zinenko authored
- make transform.alternatives op apply only to isolated-from-above payload IR scopes; - fix potential leak; - fix several typos.
-
lorenzo chelini authored
- Post (minor) fix after: https://reviews.llvm.org/D127301 Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D127868
-
Pengxuan Zheng authored
It seems to be a bug in `LinkerDriver::findFile`, the file name is not converted to lowercase when being inserted into `visitedLibs`. This is the only exception in the file and all other places always convert file names to lowercase when inserting them into `visitedLibs` (or `visitedFiles`). Reviewed By: thieta, hans Differential Revision: https://reviews.llvm.org/D127709
-
Paul Robinson authored
-
Juergen Ributzka authored
The exports trie parser ordinal validation check doesn't consider the case where the ordinal can be zero or negative for certain special values that are defined in BindSpecialDylib. Update the validation to account for that fact and add a test case. This fixes rdar://94844233. Differential Revision: https://reviews.llvm.org/D127806
-
Joseph Huber authored
The offload binary contains internally a string map of all the key and value pairs identified in the binary itself. Normally users query these values from the `getString` function, but this makes it difficult to identify which strings are availible. This patch adds a simple const iterator range to the offload binary allowing users to iterate through the strings. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D127774
-
Stanislav Gatev authored
This makes it harder to misuse APIs that return references by accidentally copying the results which could happen when assigning the them to variables declared as `auto`. Differential Revision: https://reviews.llvm.org/D127865 Reviewed-by: ymandel, xazax.hun
-
Mark de Wever authored
Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D127675
-
Thomas Raoux authored
Make the reduction distribution pattern more generic and remove layering problem. The new pattern to distribute reduction is now independent of GPU and takes a lamdba to decide how the distributed reduction should be generated. Differential Revision: https://reviews.llvm.org/D127867
-
Paul Robinson authored
-
- Jun 15, 2022
-
-
Luo, Yuanke authored
The use operand may be undefined. In that case we can just continue to check the next operand since it won't increase register pressure. Differential Revision: https://reviews.llvm.org/D127848
-
Balazs Benics authored
The arithmetic restriction seems to be artificial. The comment below seems to be stale. Thus, we remove both. Depends on D127306. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127763
-
Balazs Benics authored
Previously, system globals were treated as immutable regions, unless it was the `errno` which is known to be frequently modified. D124244 wants to add a check for stores to immutable regions. It would basically turn all stores to system globals into an error even though we have no reason to believe that those mutable sys globals should be treated as if they were immutable. And this leads to false-positives if we apply D124244. In this patch, I'm proposing to treat mutable sys globals actually mutable, hence allocate them into the `GlobalSystemSpaceRegion`, UNLESS they were declared as `const` (and a primitive arithmetic type), in which case, we should use `GlobalImmutableSpaceRegion`. In any other cases, I'm using the `GlobalInternalSpaceRegion`, which is no different than the previous behavior. --- In the tests I added, only the last `expected-warning` was different, compared to the baseline. Which is this: ```lang=C++ void test_my_mutable_system_global_constraint() { assert(my_mutable_system_global > 2); clang_analyzer_eval(my_mutable_system_global > 2); // expected-warning {{TRUE}} invalidate_globals(); clang_analyzer_eval(my_mutable_system_global > 2); // expected-warning {{UNKNOWN}} It was previously TRUE. } void test_my_mutable_system_global_assign(int x) { my_mutable_system_global = x; clang_analyzer_eval(my_mutable_system_global == x); // expected-warning {{TRUE}} invalidate_globals(); clang_analyzer_eval(my_mutable_system_global == x); // expected-warning {{UNKNOWN}} It was previously TRUE. } ``` --- Unfortunately, the taint checker will be also affected. The `stdin` global variable is a pointer, which is assumed to be a taint source, and the rest of the taint propagation rules will propagate from it. However, since mutable variables are no longer treated immutable, they also get invalidated, when an opaque function call happens, such as the first `scanf(stdin, ...)`. This would effectively remove taint from the pointer, consequently disable all the rest of the taint propagations down the line from the `stdin` variable. All that said, I decided to look through `DerivedSymbol`s as well, to acquire the memregion in that case as well. This should preserve the previously existing taint reports. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127306 -
Phoebe Wang authored
Fixed the missing SQRT promotion. Adding several missing operations too.
-
Balazs Benics authored
Depends on D125709 Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127742
-
Balazs Benics authored
Initially, I thought there is some fundamental bug here by not using the bool fields, but it turns out D55425 split this checker into two separate ones; making these fields dead. Depends on D127836, which uncovered this issue. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127838
-
Balazs Benics authored
The `Profile` function was incorrectly implemented. The `StreamErrorState` has an implicit `bool` conversion operator, which will result in a different hash than faithfully hashing the raw value of the enum. I don't have a test for it, since it seems difficult to find one. Even if we would have one, any change in the hashing algorithm would have a chance of breaking it, so I don't think it would justify the effort. Depends on D127836, which uncovered this issue by marking the related `Profile` function dead. Reviewed By: martong, balazske Differential Revision: https://reviews.llvm.org/D127839
-
Balazs Benics authored
Thanks @kazu for helping me clean these parts in D127799. I'm leaving the dump methods, along with the unused visitor handlers and the forwarding methods. The dead parts actually helped to uncover two bugs, to which I'm going to post separate patches. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D127836
-
Valentin Clement authored
Fix some mismatch in format used in the file and reduce the diff with fir-dev to be able to finish the upstreaming on this file. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, kiranchandramohan Differential Revision: https://reviews.llvm.org/D127849
-
Matthias Springer authored
When specifying an op attribute with a default value (via DefaultValuedAttr), the default value is a string of C++ code. In the general case, the default value of such an attribute cannot be translated to Python when generating the bindings. However, we can hard-code default Python values for frequently-used C++ default values. This change adds a Python default value for empty ArrayAttrs. Differential Revision: https://reviews.llvm.org/D127750
-
Sunho Kim authored
Logs enum name of unsupported relocation type. This also changes elf/x86 to use common util function (getELFRelocationTypeName) inside llvm object module. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D127715
-
Shao-Ce SUN authored
When `riscv64-unknown-linux-gnu-ld` is in the PATH, `clang -### -fuse-ld=ld --target=riscv64-unknown-linux-gnu` will use unknown-linux-gnu-ld first, which causes the error in the lit test. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D127589
-
Kadir Cetinkaya authored
-
Kadir Cetinkaya authored
The alias itself is already included in the definition section of the hover (it's printed as spelled in source code). So it doesn't provide any value when we print the aliases as-is. Fixes https://github.com/clangd/clangd/issues/1134. Differential Revision: https://reviews.llvm.org/D127832
-
Krasimir Georgiev authored
Revert "[ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records AND [NFC][Thumb] Update frame-chain codegen test to use thumbv6m" This reverts commit 7625e01d and dependent cbcce82e. Commit 7625e01d causes some new codegen test failures under asan, e.g., CodeGen/ARM/execute-only.ll: https://lab.llvm.org/buildbot/#/builders/5/builds/24659/steps/15/logs/stdio.
-