- Feb 17, 2023
-
-
Yeting Kuo authored
Some of TargetLowering functions needed opcodes are often used in DAGCombiner. The patch make those MatchContextClass classes have TargetLowering members and pass specific opcodes for those TargetLowering functions. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D144075
-
Alexander Belyaev authored
https://discourse.llvm.org/t/rfc-parallel-loops-on-tensors-in-mlir/68332 Differential Revision: https://reviews.llvm.org/D144072
-
Chuanqi Xu authored
This reverts commit c4e6e771. Since clang-tools-extra contains the use for std::experimental::coroutine_traits, the previsou commit breaks the build bot. Revert this one to make the bot green.
-
Chuanqi Xu authored
As we discussed before, we should stop supporting std::experimental::coroutine_traits in clang17. Now the clang16 is branched so we can clean them now. All the removed tests have been duplicated before.
-
Ryan Guo authored
-
Dave Lee authored
-
Dave Lee authored
-
Dave Lee authored
Remove the persistent result variable after executing `po`. Without this change, the following behavior happens: ``` (lldb) p thing (NSObject *) $0 = 0x600000008000 (lldb) po thing <NSObject: 0x600000008000> (lldb) p thing (NSObject *) $2 = 0x600000008000 (lldb) p $1 (NSObject *) $1 = 0x600000008000 ``` Even though `po` hides the persistent result variable, it's still created - as $1 in this example. It can be accessed even though its existence is not evident. With this change, the persistent result is removed after the object description has printed. Instead, this is the behavior: ``` (lldb) p thing (NSObject *) $0 = 0x600000008000 (lldb) po thing <NSObject: 0x600000008000> (lldb) p thing (NSObject *) $1 = 0x600000008000 ``` The difference here is that the `po` doens't silently create a persistent result. Differential Revision: https://reviews.llvm.org/D144044
-
Dave Lee authored
Rename `SetResultIsInternal` and `GetResultIsInternal` to `SetSuppressPersistentResult` and `GetSuppressPersistentResult` respectively. Also rename `m_result_is_internal`. This matches the naming in the SB API. A separate change calls `SetSuppressPersistentResult`, where the name `SetResultIsInternal` doesn't quite fit. Differential Revision: https://reviews.llvm.org/D144042
-
Nick Desaulniers authored
I introduced new tests in commit 5cc1016a ("[llvm][SelectionDAGBuilder] codegen callbr.landingpad intrinsic") https://reviews.llvm.org/D140160 that fails expensive checks. Disable -verify-machineinstrs in those tests for now. Enable it in other tests for now, since MachineVerifier isn't on by default for assertion builds. Link: https://github.com/llvm/llvm-project/issues/60827
-
Owen Pan authored
The token annotator doesn't annotate the template opener and closer as such if they enclose an overloaded operator. This causes the space between the operator and the closer to be removed, resulting in invalid C++ code. Fixes #58602. Differential Revision: https://reviews.llvm.org/D143755
-
Kazu Hirata authored
Tihs patches adds APInt::count{l,r}_{zero,one} and APInt::popcount to be consistent with those functions in ADT/bit.h. Once this patch lands, I'll take care of the migration. For now, I am intentionally leaving isPowerOf2 as is. Differential Revision: https://reviews.llvm.org/D144165 -
Kazu Hirata authored
This patch fixes: llvm/lib/CodeGen/CallBrPrepare.cpp:154:14: error: unused variable 'IsDominated' [-Werror,-Wunused-variable] llvm/lib/CodeGen/CallBrPrepare.cpp:150:13: error: unused function 'PrintDebugDomInfo' [-Werror,-Wunused-function]
-
Thomas Raoux authored
Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D144219
-
Thomas Raoux authored
This reverts commit 2fc3c5c3.
-
Akira Hatanaka authored
The assertion fails when the expression causing the this pointer to be captured is part of a constexpr if statement's branch and the branch gets discarded when the enclosing method is instantiated. Note that the test case is added to CodeGen instead of Sema since the translation unit has to be free of errors in order for the assertion to be checked. Differential Revision: https://reviews.llvm.org/D144016
-
Matt Arsenault authored
-
Noah Goldstein authored
No bug here, just needed to revert to revert 8bd0e948 which had a bug.
-
Noah Goldstein authored
Recommit "Transform vector SET{LE/ULT/ULE} -> SETLT and SET{GE/UGT/UGE} -> SETGT if possible" (2nd Try) Original version hit assert in `incDecVectorConstant` because VT could be EVT (as opposed to MVT). Fix is to add check for VT.isSimple() in `incDecVectorConstant`. Reviewed By: saugustine Differential Revision: https://reviews.llvm.org/D142254 -
Alex Langford authored
Given the line ``` launch_info = lldb.SBLaunchInfo(None) ``` We see different behaviors across different versionf of swig. On some older versions of swig (e.g. 3.0.2) this line fails because it attempts to use the copy constructor and blows up with an invalid null reference. On newer versions of swig, this is correctly routed to the constructor taking a pointer. Prior to generating the swig bindings with the API headers, SBLaunchInfo's copy constructor was not exposed so we're effectively going back to the old behavior anyway. Differential Revision: https://reviews.llvm.org/D144228
-
Teresa Johnson authored
We were not summarizing a function alias in the vtable, leading to incorrect WPD in some cases, and missing WPD in others. Specifically, we would end up ignoring function aliases as they aren't summarized, so we could incorrectly devirtualize if there was a single other non-alias function in a compatible vtable. And if there was only one implementation, but it was an alias, we would not be able to identify and perform the single implementation devirtualization. Handling the alias summary correctly also required fixing the handling in mustBeUnreachableFunction, so that it is not incorrectly ignored. Regular LTO is conservatively correct because it will skip devirtualizing when any pointer within a vtable is not a function. However, it needs additional work to be able to take advantage of function alias within the vtable that is in fact the only implementation. For that reason, the Regular LTO testing in the second test case is currently disabled, and will be enabled along with a follow on enhancement fix for Regular LTO WPD. Differential Revision: https://reviews.llvm.org/D144209
-
Nick Desaulniers authored
Also move the line about __has_extension(gnu_asm_goto_with_outputs) so that it is more generally about asm goto, not the paragraph on symbolic references. Reviewed By: efriedma, void Differential Revision: https://reviews.llvm.org/D143205
-
Nick Desaulniers authored
Now that we support outputs from asm goto along indirect edges, we can remove/revert some code that was added to help warn about the previous limitation that outputs were not supported along indirect edges. Reverts some code added in: commit 72aa619a ("Warn of uninitialized variables on asm goto's indirect branch") commit 3a604fdb ("[Clang][CFG] check children statements of asm goto") But keeps+updates the tests. Link: https://github.com/llvm/llvm-project/issues/53562 Reviewed By: void Differential Revision: https://reviews.llvm.org/D140508
-
Nick Desaulniers authored
Initial support for asm goto w/ outputs (D69876) only supported outputs along the "default" (aka "fallthrough") edge. We can support outputs along all edges by repeating the same pattern of stores along the indirect edges that we allready do for the default edge. One complication is that these indirect edges may be critical edges which would need to be split. Another issue is that mid-codgen of LLVM IR, the control flow graph might not reflect the control flow of the final function. To avoid this "chicken and the egg" problem assume that any given indirect edge may become a critical edge, and pro-actively split it. This is unnecessary if the edge does not become critical, but LLVM will optimize such cases via tail duplication. Fixes: https://github.com/llvm/llvm-project/issues/53562 Reviewed By: void Differential Revision: https://reviews.llvm.org/D136497
-
Nick Desaulniers authored
Prerequisite to further modifications in D136497. Basically, there is a large body of code in CodeGenFunction::EmitAsmStmt for emitting stores of outputs. We want to be able to repeat this logic, for each destination of a callbr (rather than just the default destination which is what the code currently does). Also does some smaller cleanups like whitespace cleanups, and removing pointless casts. Reviewed By: void, jyknight Differential Revision: https://reviews.llvm.org/D137113
-
Nick Desaulniers authored
Capstone of https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 Clang changes are still necessary to enable the use of outputs along indirect edges of asm goto statements. Link: https://github.com/llvm/llvm-project/issues/53562 Reviewed By: void Differential Revision: https://reviews.llvm.org/D140180
-
Nick Desaulniers authored
Given a CallBrInst, retain its first virtual register in SelectionDagBuilder's FunctionLoweringInfo if there's corresponding landingpad. Walk the list of COPY MachineInstr to find the original virtual and physical registers defined by the INLINEASM_BR MachineInst. Test cases from https://reviews.llvm.org/D139565. Link: https://github.com/llvm/llvm-project/issues/59538 Part 3 from https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 Follow up patches still need to wire up CallBrPrepare into the pass pipelines. Reviewed By: efriedma, void Differential Revision: https://reviews.llvm.org/D140160
-
Nick Desaulniers authored
Now that we've inserted a call to an intrinsic, we need to update certain previous uses of CallBrInst values to use the value of this intrinsic instead. There are 3 cases to handle: 1. The @llvm.callbr.landingpad.<type>() intrinsic call is in the same BasicBlock as the use of the callbr we're replacing. 2. The use is dominated by the direct destination. 3. The use is not dominated by the direct destination, and may or may not be dominated by the indirect destination. Part 2c of https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8. Reviewed By: efriedma, void, jyknight Differential Revision: https://reviews.llvm.org/D139970
-
Nick Desaulniers authored
Insert a new intrinsic call after splitting critical edges, and verify it. Later commits will update the SSA values to use this new value along indirect branches rather than the callbr's value, and have SelectionDAG consume this new value. Part 2b of https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8. Reviewed By: efriedma, jyknight Differential Revision: https://reviews.llvm.org/D139883
-
Nick Desaulniers authored
If we have a CallBrInst with output that's used, we need to split critical edges so that we have some place to insert COPYs for physregs to virtregs. Part 2a of https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8. Test cases and logic re-purposed from D138078. Reviewed By: efriedma, void, jyknight Differential Revision: https://reviews.llvm.org/D139872
-
Nick Desaulniers authored
Because this pass is to be a codegen pass, it must use the legacy pass manager. Link: https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 Reviewed By: aeubanks, void Differential Revision: https://reviews.llvm.org/D139861
-
Nick Desaulniers authored
This will be necessary to support outputs from asm goto along indirect edges. Test via: $ pushd llvm/build; ninja IRTests; popd $ ./llvm/build/unittests/IR/IRTests \ --gtest_filter=DominatorTree.CallBrDomination Also, return nullptr in Instruction::getInsertionPointAfterDef for CallBrInst as was recommened in https://reviews.llvm.org/D135997#3991427. The following phab review was folded into this commit: https://reviews.llvm.org/D140166 Link: Link: https://discourse.llvm.org/t/rfc-syncing-asm-goto-with-outputs-with-gcc/65453/8 Reviewed By: void, efriedma, ChuanqiXu, MaskRay Differential Revision: https://reviews.llvm.org/D135997 -
Shengchen Kan authored
Before this patch ``` $ echo "leal (,%r15), %eax" | llvm-mc --show-encoding --output-asm-variant=1 lea eax, [r15] # encoding: [0x42,0x8d,0x04,0x3d,0x00,0x00,0x00,0x00] $ echo "lea eax, [r15]" | llvm-mc --show-encoding -x86-asm-syntax=intel --output-asm-variant=1 lea eax, [r15] # encoding: [0x41,0x8d,0x07] ``` MC printed the register r15 as a base in intel syntax even when it's an index. Then we got a different encoding by using the assembly from the output of the first command. I believe the behavior is too weird to be called a feature. After this patch, we get ``` $ echo "leal (,%r15), %eax" | llvm-mc --show-encoding --output-asm-variant=1 lea eax, [1*r15] # encoding: [0x42,0x8d,0x04,0x3d,0x00,0x00,0x00,0x00] ``` Reviewed By: RKSimon, pengfei, MaskRay Differential Revision: https://reviews.llvm.org/D144183 -
Johannes Doerfert authored
When we simplify loads we need to adjust types (esp. null-values) properly to avoid inconsinstencies down the line. Add a cast and an error message. Fixes: https://github.com/llvm/llvm-project/issues/60788
-
Jie Fu authored
/data/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:398:34: error: variable 'lang_rt' set but not used [-Werror,-Wunused-but-set-variable] lldb_private::LanguageRuntime *lang_rt = nullptr; ^ 1 error generated. -
chenglin.bi authored
-
Alexander Yermolovich authored
This reverts commit 2062e90a.
-
Jun Ma authored
According to github.com/WebAssembly/simd/blob/main/proposals/simd/SIMD.md, the shift count of bit shift instructions is taken modulo lane width. This patch adds such operation. Fixes PR#60655 Differential Revision: https://reviews.llvm.org/D144169
-
Jun Ma authored
-