Skip to content
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

[AutoBump] Merge with 53c06c56 (Jun 13) (72) #336

Merged
merged 176 commits into from
Sep 13, 2024

Conversation

mgehre-amd
Copy link
Collaborator

No description provided.

chelcassanova and others added 30 commits June 11, 2024 15:20
…deCallback (llvm#94518)

`SBCommandInterpreter::CommandOverrideCallback` was not being exposed to
the Python API and has no coverage in the
API test suite, so this commits exposes and adds a test for it. Doing
this involves also adding a typemap for the callback used for this
function so that it matches the functionality of other callback
functions that are exposed to Python.
…ndOverrideCallback (llvm#94518)"

This reverts commit 6fb6eba.
This test breaks due to an incorrect import in the test.
llvm#94389)

…ned operators

The checks for conflicts between defined operators/assignments and the
intrinsic operators/assignment need to take CUDA procedure and data
attributes into account to avoid false positive error messages.
Test Plan:
llvm-lit
llvm-project/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
Allow an explicit BIND(C) derived type to have a non-BIND(C) component
so long as the component's type is interoperable and it satisfies all
other constraints.
…llvm#95181)

…andOverrideCallback (llvm#94518)"

This reverts commit 7cff05a. The API
test that was added erroneously imports a module that isn't needed and
wouldn't be found which causes a test failures. This reversion removes
that import.
Search *.so libraries regardless of -pie to make it a bit more
straightforward to build non-pie dynamic-linked executables.

Flip the default to -Bstatic (unless -pie or -shared is specified) as I
think it's what most users expect for the default as of today.
The assumption here is that, because dynamic-linking is not widely used
for WebAssembly, the most users do not specify -Bdynamic or -Bstatic,
expecting static link.
Although the recent wasi-sdk ships *.so files, there are not many wasm
runtimes providing the support of dynamic-linking. (only emscripten and
toywasm as far as i know.)
…ections (llvm#95144)

Add missing __DATA sections that the objc runtime expects to register.
This fixes running objc code that makes use of `@protocol` references
and `__attribute__((objc_nonlazy_class))` classes.

rdar://129368761
This CDEFINED keyword extension to a language-binding-spec signifies
that static storage for an interoperable variable will be allocated
outside of Fortran, probably by a C/C++ external object definition.
For now, we include headers and don't use libc++abi.
No specification expression in the declaration of the result variable of
an elemental function may depend on the value of a dummy argument. This
ensures that all of the results have the same type when the elemental
function is applied to the elements of an array.
Prevent messages from module files, respect the language feature flags
when enabling the relaxed PURE dummy argument checking, and check that
the new warnings are enabled.
llvm#94768)

… that's not BIND(C)

An interoperable BIND(C) object with a derived type should have a
BIND(C) derived type, but will now work with a derived type that
satisfies all of the requirements of a BIND(C) derived type.
cppcheck recommends that a std::map being passed by value be changed to
a const reference.

Fixes llvm#94932.
cppcheck recommends that a std::vector argument be passed as a const
reference rather than by value.

Fixes llvm#94929.
…e-instruction immediate materialization over a two-instruction materialization. (llvm#83218)

llvm#76460
…elining (llvm#65609)

Modulo variable expansion is a technique that resolves overlap of
variable lifetimes by unrolling. The existing implementation solves it
by making a copy by move instruction for processors with ordinary
registers such as Arm and x86. This method may result in a very large
number of move instructions, which can cause performance problems.

Modulo variable expansion is enabled by specifying -pipeliner-mve-cg. A
backend must implement some newly defined interfaces in
PipelinerLoopInfo. They were implemented for AArch64.

Discourse thread:
https://discourse.llvm.org/t/implementing-modulo-variable-expansion-for-machinepipeliner
…lvm#87615)

The lstat/stat/fstat functions have no guarantee whether the `struct stat`
buffer is changed or not on failure. The filesystem::__copy function assumes
that the `struct stat` buffer is not updated on failure, which is not
necessarily correct.

It appears that for a non-existing destination `detail::posix_lstat(to,
t_st, &m_ec1)` returns a failure indicator and overwrites the `struct stat`
buffer with a garbage value, which is accidentally equal to the `f_st` from
stack internals from the previous `detail::posix_lstat(from, f_st, &m_ec1)` 
call.

file_type::not_found is a known status, so checking against 
`if (not status_known(t))` passes spuriously and execution continues.
Then the __copy function returns errc::function_not_supported because stats
are accidentally equivalent, which is incorrect.

Before checking for `detail::stat_equivalent`, we instead need to make sure 
that the call to lstat/stat/fstat was successful.

As a result of `f_st` and `t_st` not being accessed anymore without checking 
for the lstat/stat/fstat success indicator, it is not needed to zero-initialize 
them.
This avoids generating landing pads in some of the `atomic` functions
that will never be used, since these functions never throw exceptions.
Enable -fsanitize=kernel-memory support in Clang.

Add tests.

---------

Co-authored-by: Nicholas Miehlbradt <nicholas@linux.ibm.com>
…dp_ps (llvm#94875)

Default intrinsic handling was to report any
uninitialized part of argument. However intrinsics
use mask which allow to ignore parts of input, so
it's OK to have vectors partially initialized.
Follow-up of llvm#94358. Do the checks even before calling getRegisterInfo
etc., because some of these are virtual function calls.
Cleanup after AMXProgModel introduction. AMXProgModel is ManagedRA
whenever virtual tile registers exist at some point.
…llvm#95110)

The `noinline`, `alwaysinline`, and `optnone` function attributes are
already being used in MLIR code for the LLVM inlining interface and in
some SPIR-V lowering, despite residing in the passthrough dictionary,
which is intended as exactly that -- a pass through MLIR -- and not to
model any actual semantics being handled in MLIR itself.

Promote the `noinline`, `alwaysinline`, and `optnone` attributes out of
the passthrough dictionary on `llvm.func` into first class unit
attributes, updating the import and export accordingly.

Add a verifier to `llvm.func` that checks that these attributes are not
set in an incompatible way according to the LLVM specification.

Update the LLVM dialect inlining interface to use the first class
attributes to check whether inlining is possible.
crazydemo and others added 26 commits June 13, 2024 11:23
Neither isConstant() not isConstQualified() return true for these.
These were caught by the clang static analyzer.
…#93322)

We cannot use assumed dead information for nonnull IR-implied deduction
as we will never go back and re-check. This was reported in
  llvm#85810
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.

This is a part of llvm#94270 to land in smaller patches.
I am using `isKnownInversion` in the following pr 
llvm#94915

it is useful to have the method in a shared class so I can reuse it. I am not sure if `ValueTracking` is the correct place but it looks like most of the methods with the pattern `isKnownX` belong there.
I believe we should return after the SDR for the error case, instead of
invoking it a second time with Error::success().
…lvm#95237)"

It's very expensive and doesn't achieve anything.

I one test I did, it saves almost 10s on a 2m23s build, bringing it down
to 2m15s using a downstream branch.
We already used a flat array of kernel launch parameters for the AMD GPU
launch but now we also use this scheme for the NVIDIA GPU launch. The
only remaining/required use of the indirection is the host plugin (due
ot ffi). This allows to us simplify the use for non-OpenMP kernel
launch.
…uired (llvm#94159)

This adds a fix-it hint in situations where a modifiable lvalue is expected, but a prvalue
or non-modifiable lvalue of pointer type was found, so long as dereferencing the pointer 
would result in a modifiable lvalue.

Resolves llvm#93066
…s. (llvm#95262)

I'm not aware of any other documentation changes that are needed to
complete the migration from chromium to github to report security
issues. The top-level security.md file refers to
https://llvm.org/docs/Security.html#how-to-report-a-security-issue for
documentation on reporting a security issue, which is being updated as
part of this PR.
…ry FORMAT values. (llvm#95243)

Some tools generate such instructions with the FORMAT field set to 0,
which corresponds to buf_fmt_invalid, but that should not prevent them
from being recognised on decoding.
…ng builtin functions (llvm#95176)

This PR adds builtin functions to insert instructions from 'Group and
Subgroup' section of the SPIR-V Specification. Corresponding tests are
updated, `spirv-val` run is added where it was missed.
…acked constants (llvm#95303)

This PR fixes a problem in logics of cleaning unused constants, ensuring
that cleaning of temporary constants doesn't purge tracked constants. On
a rare occasion when this happens SPIR-V Backend emits a code that
refers to a non-existent register, earlier related with a constant.
Attached to the PR test case is a minimal reproducer where names of
variables and instructions lead to such a rare coincidence.
The same has been done in a couple other existing tests, that also are
skipped on Windows (e.g. ld-path.c). Some tests that really do want to
test setting the path on Windows does it differently, see e.g.
ps4-ps5-linker-win.c.

Since a65771f, the spirv-toolchain.cl
test does one test where PATH is set. Setting PATH does work in some
build configurations - however, if built with e.g. llvm-mingw, the built
Clang executable depends on libc++.dll (and libunwind.dll) which are
found in PATH. If the PATH is overridden, the newly built Clang
executable no longer can run.
llvm#95277)

Do not require a libm ldexp libcall to emit the ldexp intrinsic when
transforming pow(2, x) -> ldexp(1, x)

This enables the half intrinsic case to fold.
When running some tests with --gtest_repeat=100 --gtest_shuffle, I
encountered some problems because the allocator wasn't torn down
completely, and the singleton pointer ended up pointing to a
use-after-scope'd object.

This patch has a couple of fixes and niceties:
 1. Removing the once-init stuff from tests, now that it's implicitly
    done in GuardedPoolAllocator::installAtFork() anyway.
 2. Calling uninitTestOnly() in the late_init test.
 3. Resetting the HasReportedBadPoolAccess when the signal handlers are
    installed (allowing for --gtest_repeat w/ recoverable mode).
 4. Adding a check and resetting the singleton pointer in
    uninitTestOnly().
…#95240)

Dynamic type and element size of the descriptor dummy must match the
dummy static type when the dummy is not polymorphic, otherwise
IS_CONTIGUOUS, C_SIZEOF.... won't work properly inside the callee.

When the actual argument is polymorphic the descriptor of the actual may
have a different dynamic type/element size. Hence, the dummy argument
cannot simply take or copy the descriptor of the actual argument.
LBOUND and SHAPE runtime were added with an API that avoids making a
dynamic allocation for the small result storage. Update the UBOUND API
that was already there and used in lowering outside of the assumed-rank
case.
Add tests for the assumed-rank case.
llvm#95227)

…ARFDIE

This puts them closer to the other two functions doing something very
similar. I've tried to stick to the original logic of the functions as
much as possible, though I did apply some easy simplifications.

The changes in DWARFDeclContext.h are there to make the unit tests
produce more useful error messages.
Deal with the cases where lower bounds, or attribute, or dynamic type
must be updated when passing an assumed-rank actual argument to an
assumed-rank dummy argument.

copy-in/copy-out and passing target assumed-rank to intent(in) pointers
will be handled in separate patch.
Re-use already queried call arguments and matched APFloat, instead
of re-matching the original argument.
Base automatically changed from bump_to_0fb216fb to feature/fused-ops September 12, 2024 07:11
@mgehre-amd mgehre-amd merged commit fa28ce5 into feature/fused-ops Sep 13, 2024
10 checks passed
@mgehre-amd mgehre-amd deleted the bump_to_53c06c56 branch September 13, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.