- May 18, 2022
-
-
Nikita Popov authored
It's sufficient to just fold the icmp to true/false here, and then let constant terminator folding take care of the rest. It should be noted that while replaceFoldableUses() may not replace all uses of the icmp, at least the use in the terminator we're working on is always replaceable, so terminator constant folding should be reliably enabled as a subsequent step.
-
Jay Foad authored
Previously SIFoldOperands::foldInstOperand would only fold a non-inlinable immediate into a single user, so as not to increase code size by adding the same 32-bit literal operand to many instructions. This patch removes that restriction, so that a non-inlinable immediate will be folded into any number of users. The rationale is: - It reduces the number of registers used for holding constant values, which might increase occupancy. (On the other hand, many of these registers are SGPRs which no longer affect occupancy on GFX10+.) - It reduces ALU stalls between the instruction that loads a constant into a register, and the instruction that uses it. - The above benefits are expected to outweigh any increase in code size. Differential Revision: https://reviews.llvm.org/D114643
-
River Riddle authored
This avoids use-after-free when trying to access the regions after visiting the operation.
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D125803
-
David Spickett authored
GetDirtyPageList was being assigned to const & in most places anyway. If you wanted to change the list you'd make a new one and call SetDirtyPageList. GetPageSize is just an int so no issues being const. Differential Revision: https://reviews.llvm.org/D125786
-
Nikita Popov authored
There are multiple places that want to look through freeze, so store condition without freeze in a separate variable.
-
Gabor Marton authored
This new CTU implementation is the natural extension of the normal single TU analysis. The approach consists of two analysis phases. During the first phase, we do a normal single TU analysis. During this phase, if we find a foreign function (that could be inlined from another TU) then we don’t inline that immediately, we rather mark that to be analysed later. When the first phase is finished then we start the second phase, the CTU phase. In this phase, we continue the analysis from that point (exploded node) which had been enqueued during the first phase. We gradually extend the exploded graph of the single TU analysis with the new node that was created by the inlining of the foreign function. We count the number of analysis steps of the first phase and we limit the second (ctu) phase with this number. This new implementation makes it convenient for the users to run the single-TU and the CTU analysis in one go, they don't need to run the two analysis separately. Thus, we name this new implementation as "onego" CTU. Discussion: https://discourse.llvm.org/t/rfc-much-faster-cross-translation-unit-ctu-analysis-implementation/61728 Differential Revision: https://reviews.llvm.org/D123773
-
Gabor Marton authored
Summary: Add a new function with which we can query if a Decl had been newly created during the import process. This feature is a must if we want to have a different static analysis strategy for such newly created declarations. This is a dependent patch that is needed for the new CTU implementation discribed at https://discourse.llvm.org/t/rfc-much-faster-cross-translation-unit-ctu-analysis-implementation/61728 Differential Revision: https://reviews.llvm.org/D123685
-
Florian Hahn authored
-
Thomas Preud'homme authored
x86-target-features.c can spuriously fail when checking for absence of the string "lvi" in the compiler output due to the temporary path used for the output file. For example: "-o" "/tmp/lit-tmp-981j7lvi/x86-target-features-670b86.o" will make the test fail. This commit checks specifically for lvi as a target feature, in a similar way to the positive CHECK directive just above. Test Plan: fails when using -mlvi-hardening and pass otherwise Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D125084
-
Diana Picus authored
Add support for reading response files in the flang driver. Response files contain command line arguments and are used whenever a command becomes longer than the shell/environment limit. Response files are recognized via the special "@path/to/response/file.rsp" syntax, which distinguishes them from other file inputs. This patch hardcodes GNU tokenization, since we don't have a CL mode for the driver. In the future we might want to add a --rsp-quoting command line option, like clang has, to accommodate Windows platforms. Differential Revision: https://reviews.llvm.org/D124846
-
Yeting Kuo authored
The patch does not pass math flags to float VPCmpIntrinsics because LLParser could not identify float VPCmpIntrinsics as FPMathOperators. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D125600
-
Diana Picus authored
This is compiled as C code, so it's a good idea to be explicit about the prototype. Clang complains about this when -Wstrict-prototypes is used. Differential Revision: https://reviews.llvm.org/D125672
-
Qiu Chaofan authored
This fixes bug 55463, similar to D78668. This is a temporary fix since we will switch to post-isel CTR loop determination in the future. Reviewed By: dim, shchenz Differential Revision: https://reviews.llvm.org/D125746
-
rkayaith authored
The previous fix from af371f9f only applied when using a bottom-up traversal. The change here applies the constant preprocessing logic to the top-down case as well. This resolves the issue with the canonicalizer pass still reordering constants, since it uses a top-down traversal by default. Fixes #51892 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125623
-
Nikita Popov authored
%x umin_seq %y is currently expanded to %x == 0 ? 0 : umin(%x, %y). This patch changes the expansion to umin(%x, freeze %y) instead (https://alive2.llvm.org/ce/z/wujUhp). The motivation for this change are the test cases affected by D124910, where the freeze expansion ultimately produces better optimization results. This is largely because `(%x umin_seq %y) == %x` is a common expansion pattern, which reliably optimizes in freeze representation, but only sometimes with the zero comparison (in particular, if %x == 0 can fold to something else, we generally won't be able to cover reasonable code from this.) Differential Revision: https://reviews.llvm.org/D125372
-
Nikita Popov authored
When performing runtime unrolling with multiple exits, one of the earlier (non-latch) exits may exit the loop on the first iteration, such that we never branch on the latch exit condition. As such, we need to freeze the condition of the new branch that is introduced before the loop, as it now executes unconditionally. Differential Revision: https://reviews.llvm.org/D125754
-
Nikita Popov authored
Always enable opaque pointers in llvm-nm, because the tool doesn't actually care, and this allows us to read both typed pointer and opaque pointer bitcode files in one archive. Previously this depended on the order inside the archive (it would work with an opaque pointer bitcode file first, but fail with a typed pointer bitcode file first). Fixes https://github.com/llvm/llvm-project/issues/55506. Differential Revision: https://reviews.llvm.org/D125751
-
rkayaith authored
The canonicalize command-line options currently have no effect, as the pass is reading the pass options in its constructor, before they're actually initialized. This results in the default values of the options always being used. The change here moves the initialization of the `GreedyRewriteConfig` out of the constructor, so that it runs after the pass options have been parsed. Fixes #55466 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D125621
-
River Riddle authored
This allows for properly using / as a trigger character, i.e. more easily allows chaining include directory completions.
-
River Riddle authored
This allows for the range to encompass more of the source associated with the full expression, making diagnostics easier to see/tooling easier/etc.
-
River Riddle authored
This causes annoyances when attempting to use space as a trigger character (to start a different completion).
-
Martin Storsjö authored
The existing code was essentially untested; in some cases, it used too narrow variable types to fit all the bits, in some cases the bit manipulation operations were incorrect. For the "ldr lr, [sp], #x" opcode, there's nothing in the documentation that says it cannot be used in a prologue. (In practice, it would probably seldom be used there, but technically there's nothing stopping it from being used.) The documentation only specifies the operation to replay for unwinding it, but the corresponding mirror instruction to be printed for a prologue is "str lr, [sp, #-x]!". Also improve printing of register masks, by aggregating registers into ranges where possible, and make the printing of the terminating branches clearer, as "bx <reg>" and "b.w <target>". Differential Revision: https://reviews.llvm.org/D125643
-
Pavel Samolysov authored
If a pointer argument is unused within the callee, this argument should be removed from the function's signature while all used pointer arguments should be promoted as it is expected. The ArgumentPromotion pass doesn't touch unused non-pointer arguments at all.
-
Marek Kurdej authored
Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline." This reverts commit 50cd52d9. It provoked regressions in C++ and ObjectiveC as described in https://reviews.llvm.org/D123676#3515949. Reproducers: ``` MACRO_BEGIN #if A int f(); #else int f(); #endif ``` ``` NS_SWIFT_NAME(A) @interface B : C @property(readonly) D value; @end ```
-
Groverkss authored
This patch cleans up multiple getMaybeValue functions to take an IdKind instead of special functions. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D125617
-
Groverkss authored
This patch changes `FlatAffineValueConstraints` to only allow attaching values to non-local identifiers. The reasoning for this change is: 1. Information attached to local identifiers can be lost since local identifiers can be removed for output size optimizations. 2. There are no current use cases for attaching values to Local identifiers. 3. Attaching a value to a local identifier does not make sense since a local identifier represents existential quantification. This patch also adds some additional asserts to the affected functions. Reviewed By: arjunp, bondhugula Differential Revision: https://reviews.llvm.org/D125613
-
Philip Reames authored
This code pre-exists the generic handling for inaccessiblememonly. If we remove it and update one test with inaccessiblememonly, nothing else changes. Note that simply running O1 on that test would annotate malloc with the missing inaccessiblememonly.
-
Zi Xuan Wu (Zeson) authored
CSKY is always in 4-byte align, no matter it's long long type. For global aggregate variable, it's 4-byte align if its size is bigger than or equal to 4 bytes. Differential Revision: https://reviews.llvm.org/D124977
-
Shao-Ce SUN authored
Based on D123467. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D124508
-
Chenbing Zheng authored
-
Juneyoung Lee authored
This patch makes JumpThreading's ProcessImpliedCondition deal with frozen conditions. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D84941
-
Juneyoung Lee authored
-
Ben Shi authored
Reviewed By: MaskRay differential Revision: https://reviews.llvm.org/D125544
-
Robert Suderman authored
Added handling rounding behavior in 32-bits for when possible. This avoids kernel compilation generating scalarized code on platforms where 64-bit vectors are not available. As the 48-bit lowering requires 64-bit anyway, we added a full 64-bit solution simplifying the old path. Reviewed By: dcaballe, mravishankar Differential Revision: https://reviews.llvm.org/D125583
-
Philip Reames authored
This reverts commit 79a66ec9. The stronger asserts served their purpose; I stumbled across another bug. Will reapply once this one is also fixed. The bug appears to be a variant of a previous one: * We mutate an instruction in one block. * That mutation changes the phase3 results of another block. This is very similiar to a previous issue, except cross block instead of within a single block.
-
Matthias Springer authored
Before this fix, the bufferization implementation made the incorrect assumption that the values yielded from the "before" region must match with the values yielded from the "after" region. Differential Revision: https://reviews.llvm.org/D125835
-
Sam McCall authored
-
Alexander Shaposhnikov authored
This diff adjusts binaryAnd to take advantage of the analysis based on KnownBits. Differential revision: https://reviews.llvm.org/D125603 Test plan: 1/ ninja check-llvm 2/ ninja check-llvm-unit
-
Amir Ayupov authored
Addresses the warnings emitted by Apple Clang 13.1.6 (Xcode 13.3.1). Tip @tschuett issue #55404. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D125733
-