- May 18, 2024
-
-
Felix Schneider authored
This patch adapts the `test.reflect_bounds` test Op to use explicitly signed and unsigned representation for signed and unsigned bounds of `IntegerType`s. This is mostly a cosmetic change as the internal representation of the ranges is unchanged. However, it improves readability of tests. Example: ```mlir // old: test.reflect_bounds {smax = 127 : i8, smin = -128 : i8, umax = -56 : i8, umin = 100 : i8} // new: test.reflect_bounds {smax = 127 : si8, smin = -128 : si8, umax = 200 : ui8, umin = 100 : ui8} ``` -
Fangrui Song authored
-
Kareem Ergawy authored
-
Michael Klemm authored
-
Fangrui Song authored
``` .irp foo,1 nop .endr nop ``` expands to an excess EOL between two nop lines. Other loop directives and .macro have the same issue. `Lex()` at "Jump to the macro instantiation and prime the lexer" requires that there is one single \n token in CurTok. Therefore, we cannot consume the trailing \n when parsing the macro(-like) body. (commit c6e787f7 (reverted by 1e5f29af)) Instead, skip the potential \n after jumpToLoc at handleMacroExit.
-
jiajie zhang authored
The purpose of this PR is to remove the 'etime-function.mlir' file that I mistakenly committed in https://github.com/llvm/llvm-project/pull/92571. This file is not necessary in source code control, and its presence may cause confusion or misunderstanding.
-
Aiden Grossman authored
f3524e9a accidentally touched the dependabot config. This patch reverts that change.
-
Mircea Trofin authored
This reverts commit 881f20e9. Passing -ldl -lpthread explicitly
-
Valentin Clement (バレンタイン クレメン) authored
-
Fangrui Song authored
This reverts commit 01f79899. This unusual special case has been discussed on the binutils mailing list. The approach will be revisited: https://sourceware.org/pipermail/binutils/2024-May/134092.html Pull Request: https://github.com/llvm/llvm-project/pull/92584
-
Jonas Devlieghere authored
-
David Blaikie authored
-
Aiden Grossman authored
This reverts commit 487d5af6. This was causing failures on some buildbots. https://lab.llvm.org/buildbot/#/builders/247/builds/18559
-
-
Dan Liew authored
In 0ec3b972 an additional restriction was added when applying the `counted_by` attribute to flexible array members in structs. The restriction prevented the element type being a struct that itself had a flexible array member. E.g.: ``` struct has_unannotated_VLA { int count; char buffer[]; }; struct buffer_of_structs_with_unnannotated_vla { int count; struct has_unannotated_VLA Arr[] __counted_by(count); }; ``` In this example assuming the size of `Arr` is `sizeof(struct has_unannotated_VLA)*count` (which is what the attribute says) is wrong because it doesn't account for the size of `has_unannotated_VLA::buffer`. This is why this kind of code construct was treated as an error. However, it turns out existing Linux kernel code used the attribute on a flexible array member in this way (https://github.com/llvm/llvm-project/pull/90786#issuecomment-2118416515). To unbreak the build this restriction is downgraded to a warning with the plan to make it an error again once the errornous use of the attribute in the Linux kernel is resolved.
-
Jeremy Kun authored
Out of tree we have other dialects that use the ring attribute, but we get compilation errors when generating ops while pulling in all the Polynomial tablegen ops (there's no `-dialect` flag in `mlir-tblgen` for op generation like there is for attributes and types). This PR simply moves the attributes into its own file, so it can be included separately, and this also requires moving the dialect declaration into its own file.
-
Peter Klausler authored
As was done recently to allow derived types that are not explicitly BIND(C), but meet the requirements of BIND(C), to be acceptable for use in contexts nominally requiring BIND(C), this patch allows procedures that are not explicitly BIND(C) to be used in contexts that nominally require BIND(C) so long as (1) they meet the requirements of BIND(C), and (2) don't use dummy arguments whose implementations may vary under BIND(C), such as VALUE.
-
Peter Klausler authored
For testing purposes the implementations of the output APIs like OutputInteger32 have been simply constructing descriptors and executing the operation through the general DescriptorIO template. This patch decouples those APIs from that mechanism so that programs using simple "PRINT *" statements for output can link to a smaller portion of the I/O runtime support library. (This is the only form of I/O accepted in GPU device code by previous CUDA Fortran and Fortran OpenACC compilers.)
-
Alex MacLean authored
This extends the NVPTX support for over-aligned parameters and return values in a few related ways: - Support for `alignstack` attribute, as an alternative to legacy nvvm `!"align"` metadata entries. While we still maintain the legacy support, long term it might be nice to auto-upgrade to `alignstack`. - Check the alignment info when emitting the parameter list to prevent a mismatch between alignment of caller and callee, which would previously cause a fatal error for `ptxas`. - Check the alignment info when emitting loads for parameters, potentially enabling better vectorization.
-
Fangrui Song authored
Similar to a6d7828f
-
Jonas Devlieghere authored
Bump the version to 0.2.1 to test the publishing workflow and update the extension README and URL.
-
Valentin Clement (バレンタイン クレメン) authored
This is a re-worked version of #91668. It adds the `cudadevice` module and set the `device` attributes on its functions/subroutines so there is no need for special case in semantic check. `cudadevice` module is implicitly USE'd in `global`/`device` subprogram.
-
Julian Lettner authored
Fix flaky test: the spawned thread keeps spinning on `sampler_mutex` which may be released before the thread is terminated based on termination ordering. My understanding of C++ semantics are that the program here is invalid: the destructors of global variables are invoked at the time of program termination, and it is the responsibility of the program to ensure that invoking those destructors is safe. rdar://126768628
-
John Ericson authored
- No indirect syscalls on OpenBSD. Instead there is a `futex` function which issues a direct syscall. - Monotonic clock is available despite the full POSIX suite of timers not being available in its entirety. See https://lists.boost.org/boost-bugs/2015/07/41690.php and https://github.com/boostorg/log/commit/c98b1f459add14d5ce3e9e63e2469064601d7f71 for a description of an analogous problem and fix for Boost.
-
Vlad Serebrennikov authored
-
Dan Liew authored
0ec3b972 changed the `counted_by` attribute to be `LateAttrParseExperimentalExt`. This means the attribute is no longer supported by `#pragma clang attribute`. However, the `pragma-attribute-supported-attributes-list.test` wasn't updated to account for that. rdar://125400257
-
Nathan Sidwell authored
`isUnsupportedBranch` is not a very informative name, and doesn't match its corresponding `reverseBranchCondition`, as I noted in PR #92018. Here's a renaming to a more mnemonic name.
-
Fangrui Song authored
Regression test for 1e5f29af Reduced from Linux kernel arch/x86/crypto/sha1_avx2_x86_64_asm.S
-
Dan Liew authored
Previously the attribute was only allowed on flexible array members. This patch patch changes this to also allow the attribute on pointer fields in structs and also allows late parsing of the attribute in some contexts. For example this previously wasn't allowed: ``` struct BufferTypeDeclAttributePosition { size_t count; char* buffer __counted_by(count); // Now allowed } ``` Note the attribute is prevented on pointee types where the size isn't known at compile time. In particular pointee types that are: * Incomplete (e.g. `void`) and sizeless types * Function types (e.g. the pointee of a function pointer) * Struct types with a flexible array member This patch also introduces late parsing of the attribute when used in the declaration attribute position. For example ``` struct BufferTypeDeclAttributePosition { char* buffer __counted_by(count); // Now allowed size_t count; } ``` is now allowed but **only** when passing `-fexperimental-late-parse-attributes`. The motivation for using late parsing here is to avoid breaking the data layout of structs in existing code that want to use the `counted_by` attribute. This patch is the first use of `LateAttrParseExperimentalExt` in `Attr.td` that was introduced in a previous patch. Note by allowing the attribute on struct member pointers this now allows the possiblity of writing the attribute in the type attribute position. For example: ``` struct BufferTypeAttributePosition { size_t count; char *__counted_by(count) buffer; // Now allowed } ``` However, the attribute in this position is still currently parsed immediately rather than late parsed. So this will not parse currently: ``` struct BufferTypeAttributePosition { char *__counted_by(count) buffer; // Fails to parse size_t count; } ``` The intention is to lift this restriction in future patches. It has not been done in this patch to keep this size of this commit small. There are also several other follow up changes that will need to be addressed in future patches: * Make late parsing working with anonymous structs (see `on_pointer_anon_buf` in `attr-counted-by-late-parsed-struct-ptrs.c`). * Allow `counted_by` on more subjects (e.g. parameters, returns types) when `-fbounds-safety` is enabled. * Make use of the attribute on pointer types in code gen (e.g. for `_builtin_dynamic_object_size` and UBSan's array-bounds checks). This work is heavily based on a patch originally written by Yeoul Na. rdar://125400257 Co-authored-by:Dan Liew <dan@su-root.co.uk>
-
Fangrui Song authored
This reverts commit c6e787f7. parseEOL() would remove \n # after .endr, not recognizing the line marker. ``` // reduced from Linux kernel arch/x86/crypto/sha1_avx2_x86_64_asm.S .rept 1 nop .endr # 512 "a.s" ```
-
Matt Arsenault authored
-
Joseph Huber authored
Summary: This isn't `libomptarget` anymore, and these messages were always unnecessary because no other project uses these prefixed messages. The effect of this is that no longer will the logs have `LIBOMPTARGET --` in front of everything. We have a message stating when we start building the offload project so it'll still be trivial to find.
-
Joseph Huber authored
Summary: This patch cleans up the training whitespace in a bunch of tests and CMake files. Most just in preparation for other cleanups.
-
Mircea Trofin authored
Compile with clang a program that's instrumented for contextual profiling and verify a profile can be collected.
-
Fangrui Song authored
Based on @OfekShochat's https://reviews.llvm.org/D133648 init.c is the primary test for array initialization, but it uses a 32-bit triple, which would lead to an "array is too large" error. Add the new test to array-init.c instead. Fix #57353 Pull Request: https://github.com/llvm/llvm-project/pull/92473
-
Jeremy Kun authored
https://lab.llvm.org/buildbot/#/builders/268/builds/14288 ```undefined reference to `mlir::detail::TypeIDResolver<mlir::arith::ConstantOp, void>::id'```
-
Jeremy Kun authored
Adds simple canonicalization rules to the polynomial dialect. Mainly to get the boilerplate incorporated before more substantial canonicalization patterns are added. --------- Co-authored-by:Jeremy Kun <j2kun@users.noreply.github.com>
-
Jonas Devlieghere authored
Fixes new test that were added or modified after #82073. Also fixes a formatting issue.
-
jiajie zhang authored
This is same as https://github.com/llvm/llvm-project/pull/90578 with an added fix. This PR updated tests of etime intrinsic due to Lowering changes for assigning dummy_scope to hlfir.declare. Referring to https://github.com/llvm/llvm-project/pull/92472 and https://github.com/llvm/llvm-project/pull/90989
-
Jonas Devlieghere authored
-