forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update llvm to green 6cf7fe4a #47
Merged
mgehre-amd
merged 2,237 commits into
misc_fixes
from
matthias.update_llvm_to_green-6cf7fe4a
Jun 14, 2023
Merged
Update llvm to green 6cf7fe4a #47
mgehre-amd
merged 2,237 commits into
misc_fixes
from
matthias.update_llvm_to_green-6cf7fe4a
Jun 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… method Fixed: llvm#62791 Fixed: llvm#62102 in c++20, default comparison is supported. `getLexicalDeclContext` maybe cannot get the `CXXRecord` if default comparison defined out of `CXXRecord`. This patch want to get these information from the first function argument. Reviewed By: #clang-language-wg, erichkeane Differential Revision: https://reviews.llvm.org/D151365
…blockId * blockDim This patch implements a rewrite pattern for transforming gpu.global_id x to gpu.thread_id + gpu.block_id * gpu.block_dim. Reviewed By: makslevental Differential Revision: https://reviews.llvm.org/D148978
We've got a performance regression after the https://reviews.llvm.org/D115261. Despite the loop being vectorized unroll is still required. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D149281
…rocess` module" This reverts commit 429e748 since it didn't address the test failures on GreenDragon. This patch will mark the tests as expected to fail until I can reproduce the issue and find a solution. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Strict warnings require explicit static_cast to counteract default widening of types narrower than int. Functions in header files should have vague linkage (inline keyword), not internal linkage (static) or external linkage (no inline keyword) even for template functions. Note these don't use the LIBC_INLINE macro since this is only for test code. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D151494
In this mode, LIBC_ASSERT is just standard C assert. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D151498
A recurring problem recently has been that libc++ has several generated tests which all need to be re-generated before committing a change. This creates noise during code reviews and friction for contributors. Furthermore, the way we generated most of these tests resulted in extremely bad compilation times when using modules, because we defined a macro before compiling each file. This commit introduces a new kind of test called a '.gen' test. These tests are normal shell tests, however the Lit test format will run the test to discover the actual Lit tests it should run. This basically allows generating a Lit test suite on the fly using arbitrary code, which can be used in the future to generate tests like our __verbose_abort tests and several others. Differential Revision: https://reviews.llvm.org/D151258
unittest_demangle.pass.cpp uses the preprocessor to #include cxa_demangle.cpp. D148566 will make more use of std::string_view in libcxxabi rather than the home-grown StringView, but as a result of D149092, a definition of abort_message needs to be provided. Otherwise builds of check-cxxabi with -DLLVM_ENABLE_ASSERTIONS=ON will fail to link with the errors: /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o: in function `(anonymous namespace)::itanium_demangle::starts_with(std::__1::basic_string_view<char, std::__1::char_traits<char> >, char)': unittest_demangle.pass.cpp:(.text+0x81): undefined reference to `abort_message' /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o: in function `(anonymous namespace)::itanium_demangle::starts_with(std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::basic_string_view<char, std::__1::char_traits<char> >)': unittest_demangle.pass.cpp:(.text+0x2aa): undefined reference to `abort_message' /usr/bin/ld: unittest_demangle.pass.cpp:(.text+0x312): undefined reference to `abort_message' /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o: in function `(anonymous namespace)::itanium_demangle::OutputBuffer::writeUnsigned(unsigned long, bool)': unittest_demangle.pass.cpp:(.text+0x54f): undefined reference to `abort_message' /usr/bin/ld: unittest_demangle.pass.cpp:(.text+0x5b7): undefined reference to `abort_message' /usr/bin/ld: /tmp/lit-tmp-0akcq37p/cc6DLdvw.o:unittest_demangle.pass.cpp:(.text+0xe6e): more undefined references to `abort_message' follow /usr/bin/ld: /home/libcxx-builder/.buildkite-agent/builds/google-libcxx-builder-f0560ea595b1-1/llvm-project/libcxx-ci/build/generic-gcc/test/Output/unittest_demangle.pass.cpp.dir/t.tmp.exe: hidden symbol `abort_message' isn't defined Use the preprocessor further to provide the definition of abort_message for this unittest. Reviewed By: #libc_abi, phosek Differential Revision: https://reviews.llvm.org/D151160
…l_id to thread + blockId * blockDim This patch updates the Bazel build to catch up with changes in https://reviews.llvm.org/D148978. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D151496
In D148959, I removed usage of std::string_view::substr because it may throw, and libcxxabi cannot use such code. I missed one instance in llvm::starts_with. That is blocking copying the code back upstream in D148566. Mark these helpers noexcept (as they are in C++20) as well, to remind future travelers. Make these changes upstream, and copy them back downstream using libcxxabi/src/demangle/cp-to-llvm.sh. Reviewed By: #libc_abi, MaskRay, ldionne Differential Revision: https://reviews.llvm.org/D151260
This patch adds support for i64, f64 values in `gpu.shuffle`, rewriting 64bit shuffles into two 32bit shuffles. The reason behind this change is that both CUDA & HIP support this kind of shuffling. The implementation provided by this patch is based on the LLVM IR emitted by clang for 64bit shuffles when using `-O3`. Reviewed By: makslevental Differential Revision: https://reviews.llvm.org/D148974
If we use a variable watchpoint with a condition using a scope variable, if we go out-of-scope, the watpoint remains active which can the expression evaluator to fail to parse the watchpoint condition (because of the missing varible bindings). This was discovered after `watchpoint_callback.test` started failing on the green dragon bot. This patch should address that issue by setting an internal breakpoint on the return addresss of the current frame when creating a variable watchpoint. The breakpoint has a callback that will disable the watchpoint if the the breakpoint execution context matches the watchpoint execution context. This is only enabled for local variables. This patch also re-enables the failing test following e108638. rdar://109574319 Differential Revision: https://reviews.llvm.org/D151366 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
…ustom printer/parser completeness Running: MLIR_OPT_CHECK_IR_ROUNDTRIP=1 ninja check-mlir will now exercises all of our test with a round-trip to bytecode and a comparison for equality. Reviewed By: rriddle, ftynse, jpienaar Differential Revision: https://reviews.llvm.org/D90088
This is adding a new interface (`BytecodeOpInterface`) to allow operations to opt-in skipping conversion to attribute and serializing properties to native bytecode. The scheme relies on a new section where properties are stored in sequence { size, serialize_properties }, ... The operations are storing the index of a properties, a table of offset is built when loading the properties section the first time. Back-deployment to version prior to 4 are relying on getAttrDictionnary() which we intend to deprecate and remove: that is putting a de-factor end-of-support horizon for supporting deployments to version older than 4. Differential Revision: https://reviews.llvm.org/D151065
(1) minor bug fix in copy back [always nice to run stuff ;-)] (2) run with and without lib (even though some fall back to CPU) Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D151507
Show availability of math functions on each target. Reviewed By: jeffbailey Differential Revision: https://reviews.llvm.org/D151489
…can be run. Currently unit tests cannot be run on macOS due to missing OSUtil. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D151377
The TosaInferShapes pass avoids updating the shapes of tensor operators when the consumers are not TOSA operations, limiting the efficacy of TosaInferShapes when the IR is a mix of TOSA and other operations. This change attempts to update the result shapes when the consumers themselves have reasonable type/shape inference methods. Reviewed By: eric-k256 Differential Revision: https://reviews.llvm.org/D151228
Don't hard code the page in FuzzerUtil.h, this breaks on e.g. LoongArch which defaults to a 16KiB page size. Reviewed By: #sanitizers, vitalybuka Differential Revision: https://reviews.llvm.org/D140607
…_Alignas - Fix diagnoses when the argument to `alignas` or `_Alignas` is an incomplete type. Before: ``` ./alignas.cpp:1:15: error: invalid application of 'alignof' to an incomplete type 'void' class alignas(void) Foo {}; ~^~~~~ 1 error generated. ``` Now: ``` ./alignas.cpp:1:15: error: invalid application of 'alignas' to an incomplete type 'void' class alignas(void) Foo {}; ~^~~~~ 1 error generated. ``` - Improve the AST fidelity of `alignas` and `_Alignas` attribute. Before: ``` AlignedAttr 0x13f07f278 <col:7> alignas `-ConstantExpr 0x13f07f258 <col:15, col:21> 'unsigned long' |-value: Int 8 `-UnaryExprOrTypeTraitExpr 0x13f07f118 <col:15, col:21> 'unsigned long' alignof 'void *' ``` Now: ``` AlignedAttr 0x14288c608 <col:7> alignas 'void *' ``` Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D150528
Add the trait `SameOperandsAndResultElementType` and `SameOperandsElementType` to verify ops that are known to have the same input and output type rather than generate an invalid tosa IR with mixed data types like: "tosa.add"(%0, %1) : (tensor<nxbf16>, tensor<nxf32>) -> tensor<nxf32> Thus apply tosa.cast prior if needed. Change-Id: Ie866b84e371e3b571ec04f7abb090c216dd39c33 Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D150472
This patch enables us to run the floating point tests as hermetic. Importantly we now use the internal versions of the `fesetround` and `fegetround` functions. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D151123
This passed locally but unfortauntely it seems some tests are not ready to be made hermetic. Revert for now until we can investigate specifically which tests are failing and mark those as `UNIT_TEST_ONLY`. This reverts commit 417ea79.
…e still mapped to the target device This patch fixes the issue that list items in `has_device_addr` are still mapped to the target device because front end emits map type `OMP_MAP_TO`. Fix llvm#59160. Reviewed By: jyu2 Differential Revision: https://reviews.llvm.org/D141627
The primary motivation for this change is to allow FreeHooks to obtain the allocated size of the pointer being freed in a fast, efficient manner. Differential Revision: https://reviews.llvm.org/D151360
…e split unit In Split DWARF, if the unit had a non-trivial base address (a real low_pc, rather than one with fixed value 0) then computing addresses needs to access that base address to add to any base address-relative values. But the code was trying to access the base address in the split unit, when it's actually in the skeleton unit. So delegate to the skeleton if it's available. Fixes llvm#62941
This reverts commit a2b677e. reverting Differential Revision: https://reviews.llvm.org/D140607 because <sys/auxv.h> and getauxval() are not available on macOS; this change is breaking the mac CI bots.
…to type 'size_t' error (NFC) /Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:1007:39: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned long') if (failed(propReader.parseVarInt(count))) ^~~~~ /Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:191:39: note: passing argument to parameter 'result' here LogicalResult parseVarInt(uint64_t &result) { ^ /Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:1033:41: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned long') if (failed(dialectReader.readVarInt(propertiesIdx))) ^~~~~~~~~~~~~ /Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:926:38: note: passing argument to parameter 'result' here LogicalResult readVarInt(uint64_t &result) override { ^ 2 errors generated. /Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:1033:41: error: non-const lvalue reference to type 'uint64_t' (aka 'unsigned long long') cannot bind to a value of unrelated type 'size_t' (aka 'unsigned long') if (failed(dialectReader.readVarInt(propertiesIdx))) ^~~~~~~~~~~~~ /Users/jiefu/llvm-project/mlir/lib/Bytecode/Reader/BytecodeReader.cpp:926:38: note: passing argument to parameter 'result' here LogicalResult readVarInt(uint64_t &result) override { ^ 1 error generated.
This patch adds support for the following SME ACLE intrinsics (as defined in https://arm-software.github.io/acle/main/acle.html): - svld1_hor_za8 // also for _za16, _za32, _za64 and _za128 - svld1_hor_vnum_za8 // also for _za16, _za32, _za64 and _za128 - svld1_ver_za8 // also for _za16, _za32, _za64 and _za128 - svld1_ver_vnum_za8 // also for _za16, _za32, _za64 and _za128 - svst1_hor_za8 // also for _za16, _za32, _za64 and _za128 - svst1_hor_vnum_za8 // also for _za16, _za32, _za64 and _za128 - svst1_ver_za8 // also for _za16, _za32, _za64 and _za128 - svst1_ver_vnum_za8 // also for _za16, _za32, _za64 and _za128 SveEmitter.cpp is extended to generate arm_sme.h (currently named arm_sme_draft_spec_subject_to_change.h) and other SME definitions from arm_sme.td, which is modeled after arm_sve.td. Common TableGen definitions are moved into arm_sve_sme_incl.td. Co-authored-by: Sagar Kulkarni <sagar.kulkarni1@huawei.com> Reviewed By: sdesmalen, kmclaughlin Differential Revision: https://reviews.llvm.org/D127910
D150436 changed the order for INC*r, but unintentionally remove 'isConvertibleToThreeAddress = 1' for INC*r_alt. This patch also update wrong comment X86InstrArithmetic.td, and move class ITy to InstrInfo.td for it's a general class. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D151527
…xists in COFF" This reverts part of commit 44363f2. Fixup for NO symbol table test has been reserved. Reviewed By: wxiao3 Differential Revision: https://reviews.llvm.org/D151417
Use big obj copy in range for-loop will call copy constructor every time, which can be avoided by use ref instead. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D150024
…BuiltinClassifyType() This patch uses cast instead of dyn_cast which will assert if the type doesn't match. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D151469
LICM could reassociate mixed variant/invariant comparison/arithmetic operations and hoist invariant parts out of loop if it can prove that they can be computed without overflow. Motivating example here: ``` INV1 - VAR1 < INV2 ``` can be turned into ``` VAR > INV1 - INV2 ``` if we can prove no-signed-overflow here. Then `INV1 - INV2` can be computed out of loop, so we save one arithmetic operation in-loop. Reviewed By: skatkov Differential Revision: https://reviews.llvm.org/D148001
Implements parts of P1614R2 Implemented `operator<=>` for `multiset` and `set` Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D148416
Iterating many time can be very expensive.
Seems natural to highlight 'nocapture' along with other attributes like 'nonnull', 'noundef', etc.. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D151639
Differential Revision: https://reviews.llvm.org/D151626 Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D151635
Inline builtins have a very special behavior compared to other functions, it's better if we keep them restricted to a minimal set of functions. Add a linkage check which prevents considering ODR definitions as inline builtins. Fix llvm#62958 Differential Revision: https://reviews.llvm.org/D148723
Following tests are now passing on LLDB AArch64 Windows buildbot: lldb-api :: commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py lldb-api :: functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py lldb-api :: lang/cpp/constructors/TestCppConstructors.py lldb-api :: lang/cpp/namespace/TestNamespace.py lldb-api :: lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py https://lab.llvm.org/buildbot/#/builders/219/builds/3012 This patch removes XFAIL decorator from all of the above. Differential Revision: https://reviews.llvm.org/D151268
…y path on Windows" This reverts commit fd0d846. It seems to have broken various flang unit tests on AArch64 Windows platform. https://lab.llvm.org/buildbot/#/builders/65/builds/9856 https://lab.llvm.org/buildbot/#/builders/120/builds/4883 Differential Revision: https://reviews.llvm.org/D151571
mgehre-amd
force-pushed
the
matthias.update_llvm_to_green-6cf7fe4a
branch
from
June 14, 2023 11:24
7333145
to
3663896
Compare
ttjost
approved these changes
Jun 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.