- Jul 20, 2021
-
-
Sami Tolvanen authored
This reverts commit 700d07f8. Reverting due to a ThinLTO+CFI breakage on -msvc targets.
-
Fangrui Song authored
In the textual format, `noduplicates` means no COMDAT/section group deduplication is performed. Therefore, if both sets of sections are retained, and they happen to define strong external symbols with the same names, there will be a duplicate definition linker error. In PE/COFF, the selection kind lowers to `IMAGE_COMDAT_SELECT_NODUPLICATES`. The name describes the corollary instead of the immediate semantics. The name can cause confusion to other binary formats (ELF, wasm) which have implemented/ want to implement the "no deduplication" selection kind. Rename it to be clearer. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D106319
-
Nikita Popov authored
-
Sami Tolvanen authored
Create an internal alias with the original name for static functions that are renamed in promoteInternals to avoid breaking inline assembly references to them. This version uses module inline assembly to avoid issues with LowerTypeTestsModule. Relands commmit 8e3b5cb3 with arch specific tests fixed. Link: https://github.com/ClangBuiltLinux/linux/issues/1354 Reviewed By: nickdesaulniers, pcc Differential Revision: https://reviews.llvm.org/D104058
-
Giorgis Georgakoudis authored
SPMDization in D102307 does not change the RequiresFullRuntime argument of kmpc_target_init/deinit calls. However, the constraints of SPMDization detection for converting a target region to SPMD mode should guarantee that the region does not require full runtime support. Hence, this patch sets RequiresFullRuntime to false for improved execution performance. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105556
-
Shimin Cui authored
This patch extends the OptimizeGlobalAddressOfMalloc to handle the null check of global pointer variables. It is disabled with https://reviews.llvm.org/rGb7cd291c1542aee12c9e9fde6c411314a163a8ea. This PR is to reenable it while fixing the original problem reported. The fix is to set the store value correctly when creating store for the new created global init bool symbol. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D102711
-
Kazu Hirata authored
The last use was removed on Jan 22, 2021 in commit c9cd9a00.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
We already simplified to a constant, given the new interface we can also simplify to a generic value.
-
Johannes Doerfert authored
AAMemoryBehaviorFloating used a custom use tracking mechanism even though checkForAllUses exists and is already more powerful. Further, AAMemoryBehaviorFloating uses AANoCapture to guarantee that there are no aliases and following the uses is sufficient. This is an OK assumption if checkForAllUses is used but custom tracking is easily out of sync with AANoCapture and problems follow.
-
Johannes Doerfert authored
As with other patches before, the simplification callback interface requires us to go through the Attributor::getAssumedSimplified API first before we recurs. It is unclear if the problem can be explicitly tested with our current infrastructure.
-
Johannes Doerfert authored
We first simplify the operands of a compare and then reason on the simplified versions, e.g., with AANonNull. This does improve the simplification capabilities but also fixes a potential problem that has not yet been observed by simplifying the operands first.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
A byval argument is a different value in the caller and callee, we cannot propagate the information as part of AAValueSimplify. Users that want to deal with byval arguments need to specifically perform the argument -> call site step. We do not do this for now.
-
Johannes Doerfert authored
This patch introduces AAPointerInfo which tracks the uses of a pointer and places them in "bins" based on their offset from the base and access size. As with other AAs, any pointer can be tracked but it is up to the user to make sense of the results. The user in this patch is AAValueSimplify and AAPotentialValues which both utilize AAPointerInfo to determine the value of a load. For now, this is restricted to loads of allocas and internal globals. Through the use of AAPointerInfo and the "bins" we can track struct members separately. The users also know that storing only zeros (at unknown indices) will result in loading only 0 (from unknown indices). Other than that, the users are flow and context insensitive (for now). To deal with the "bins" more easily, AAPointerInfo provides a forallInterfearingAccesses that applies a callback on all accesses that might interfere with a given load or store. Differential Revision: https://reviews.llvm.org/D104432
-
Johannes Doerfert authored
As a first step to simplify loads we only handle `null` and `undef` underlying objects, as well as objects that have the load as a single user. Loads of those values can be replaced by the initializer, if any. Proper reasoning is introduced in a follow up patch Differential Revision: https://reviews.llvm.org/D103862
-
Johannes Doerfert authored
We did not properly use SPMDCompatibilityTracker in various places. This patch makes sure we look at the validity properly and also fix the state if we can. Differential Revision: https://reviews.llvm.org/D106085
-
- Jul 17, 2021
-
-
Shilei Tian authored
This patch fixed two issues found when folding `__kmpc_is_spmd_exec_mode`: 1. When the reaching kernels are empty, it should not fold to generic mode. 2. When creating AA for the caller when updating information, the dependency should be required. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D106209
-
Wenlei He authored
Iterative-BFI produces better count quality and performance when evaluated on internal benchmarks. Turning it on by default now for CSSPGO. We can consider turn it on by default for AutoFDO as well in the future. Differential Revision: https://reviews.llvm.org/D106202
-
- Jul 16, 2021
-
-
Sami Tolvanen authored
This reverts commit 8e3b5cb3. Reverting to investigate test failures.
-
Sami Tolvanen authored
Create an internal alias with the original name for static functions that are renamed in promoteInternals to avoid breaking inline assembly references to them. This version uses module inline assembly to avoid issues with LowerTypeTestsModule. Link: https://github.com/ClangBuiltLinux/linux/issues/1354 Reviewed By: nickdesaulniers, pcc Differential Revision: https://reviews.llvm.org/D104058
-
Joseph Huber authored
-
Joseph Huber authored
This patch adds unique idenfitiers to the existing OpenMP remarks. This makes it easier to identify the corresponding documentation for each remark that will be hosted in the OpenMP webpage. Depends on D105898 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105939
-
Joseph Huber authored
This patch rewrites and reworks a few of the existing remarks to make the mmore concise and consistent prior to writing the documentation for them. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105898
-
Shilei Tian authored
A common use of `ChangeStatus` is as follows: ``` ChangeStatus Changed = ChangeStatus::UNCHANGED; Changed |= foo(); ``` where `foo` returns `ChangeStatus` as well. Currently `ChangeStatus` doesn't support compound assignment, we have to write as ``` Changed = Changed | foo(); ``` which is not that convenient. This patch add the support for compound assignment for `ChangeStatus`. Compound assignment is usually implemented as a member function, and binary arithmetic operator is therefore implemented using compound assignment. However, unlike regular C++ class, enum class doesn't support member functions. As a result, they can only be implemented in the way shown in the patch. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D106109
-
Shilei Tian authored
In the device runtime there are many function calls to `__kmpc_is_spmd_exec_mode` to query the execution mode of current kernels. In many cases, user programs only contain target region executing in one mode. As a consequence, those runtime function calls will only return one value. If we can get rid of these function calls during compliation, it can potentially improve performance. In this patch, we use `AAKernelInfo` to analyze kernel execution. Basically, for each kernel (device) function `F`, we collect all kernel entries `K` that can reach `F`. A new AA, `AAFoldRuntimeCall`, is created for each call site. In each iteration, it will check all reaching kernel entries, and update the folded value accordingly. In the future we will support more function. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105787
-
- Jul 15, 2021
-
-
Shilei Tian authored
This reverts commit 1100e4aa.
-
Kuter Dinel authored
This patch adds a feature to AACallEdges AbstractAttribute that allows users to ask if there is a unknown callee that isn't a inline assembly. This feature is needed by some of it's users. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105992
-
- Jul 14, 2021
-
-
Shilei Tian authored
In the device runtime there are many function calls to `__kmpc_is_spmd_exec_mode` to query the execution mode of current kernels. In many cases, user programs only contain target region executing in one mode. As a consequence, those runtime function calls will only return one value. If we can get rid of these function calls during compliation, it can potentially improve performance. In this patch, we use `AAKernelInfo` to analyze kernel execution. Basically, for each kernel (device) function `F`, we collect all kernel entries `K` that can reach `F`. A new AA, `AAFoldRuntimeCall`, is created for each call site. In each iteration, it will check all reaching kernel entries, and update the folded value accordingly. In the future we will support more function. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D105787
-
- Jul 13, 2021
-
-
Arthur Eubanks authored
-
Arthur Eubanks authored
-
Jeroen Dobbelaere authored
Just like intrinsics are not tracked for IFI.InlinedCalls, they should not be tracked for IFI.InlinedCallSites. In the current top-of-tree this change is a NFC, but the full restrict patches (D68484) potentially trigger an read-after-free if intrinsics are also added to the InlindeCallSites, due to a late optimization potentially removing some of the inlined intrinsics. Also see https://lists.llvm.org/pipermail/llvm-dev/2021-July/151722.html for a discussion about the problem. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D105805
-
- Jul 12, 2021
-
-
Nikita Popov authored
Continuing from D105763, this allows placing certain properties about attributes in the TableGen definition. In particular, we store whether an attribute applies to fn/param/ret (or a combination thereof). This information is used by the Verifier, as well as the ForceFunctionAttrs pass. I also plan to use this in LLParser, which also duplicates info on which attributes are valid where. This keeps metadata about attributes in one place, and makes it more likely that it stays in sync, rather than in various functions spread across the codebase. Differential Revision: https://reviews.llvm.org/D105780
-
Liqiang Tao authored
The patch templatize PriorityInlinerOrder so that it can accept any type priority metric. Reviewed By: kazu Differential Revision: https://reviews.llvm.org/D104972
-
Johannes Doerfert authored
As with other Attributor interfaces we often want to know if assumed information was used to answer a query. This is important if only known information is allowed or if known information can lead to an early fixpoint. The users have been adjusted but none of them utilizes the new information yet.
-
- Jul 11, 2021
-
-
Johannes Doerfert authored
AllocationInfo and DeallocationInfo objects themselves are allocated with the Attributor bump allocator and do not need to be deallocated. That said, the sets in AllocationInfo and DeallocationInfo need to be destroyed to avoid memory leaks.
-
Johannes Doerfert authored
In the spirit of TRegions [0], this patch analyzes a kernel and tracks if it can be executed in SPMD-mode. If so, we flip the arguments of the __kmpc_target_init and deinit call to enable the mode. We also update the `<kernel>_exec_mode` flag to indicate to the runtime we changed the mode to SPMD. The code analysis is done interprocedurally by extending the AAKernelInfo abstract attribute to track SPMD compatibility as well. [0] https://link.springer.com/chapter/10.1007/978-3-030-28596-8_11 Differential Revision: https://reviews.llvm.org/D102307
-
Johannes Doerfert authored
-