Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW48) #12046

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

Merged
merged 770 commits into from
Dec 1, 2023
Merged

Conversation

sys-ce-bb
Copy link
Contributor

preames and others added 30 commits November 28, 2023 07:27
This was suggested in another related review, so backporting it to the
existing code as well.
...to model the results of alloca() and _alloca() calls. Previously it
acted as if these functions were returning memory from the heap, which
led to alpha.security.ArrayBoundV2 producing incorrect messages.
…known (#73606)

If we have a high LMUL build_vector and a known exact VLEN, we can
decompose the build_vector into one build_vector per register in the
register group. Doing so requires exact knowledge of which elements
correspond to each register in the register group, and thus an exact
VLEN must be known.

Since we no longer have operations which are linear (or worse) in LMUL,
this also allows us to lower all build_vectors without resorting to
going through the stack.
…mber declarations (#73626)

In llvm/llvm-project#71780 we started emitting
definitions for all static data-members with constant initialisers, even
if they were constants (i.e., didn't have a location). We also dropped
the DW_AT_const_value from the declaration to [help resolve
inconsistencies during type merging in the
DWARFParallelLinker](llvm/llvm-project#68721).
However, for static data members that do have locations, we wouldn't
emit a DW_AT_const_value on it, assuming that the consumer knows how to
read the value using the location. This broke some consumers that really
wanted to find a DW_AT_const_value. Ultimately we want to attach a
DW_AT_const_value to definitions that have a location too. But to fix
consumers broken by said change, this patch adds the constant back onto
the declaration. This is what we used to do prior to
llvm/llvm-project#71780
Also rename the fixture class since these tests are not ELF-specific.
This implements assembly support for the Debug/PMU extensions introduced
as part of the Armv9.5-A architecture version.
The changes include:
* New ID_AA64DFR2_EL1 ID system register
* New MDSTEPOP_EL1 and SPMZR_EL0 system registers

Mode details about these extensions can be found at:
* https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2023
* https://developer.arm.com/documentation/ddi0602/2023-09/

Co-authored-by: Oliver Stannard <[email protected]>
…ned construct (#73581)

`A program may not branch into or out of a compute construct.` This
restriction is also true for combined constructs. This patch enforce
this rule.
Clarify how the addend is used in _HI relocation types like
R_AMDGPU_ABS32_HI based on the current behaviour of the Mesa and AMDPAL
ELF loaders.

This affects Mesa and AMDPAL because they use REL relocation records, so
the addend for these types is the 32-bit literal value from the
instruction being relocated. AMDHSA is not affected because it uses RELA
relocation records which have a 64-bit addend.
We can use inline constants with packed 16-bit operands, but these
should use op_sel. Currently splat of inlinable constants is considered
legal, which is not really true if we fail to fold it with op_sel and
drop the high half. It may be legal as a literal but not as inline
constant, but then usual literal checks must be performed.

This patch makes these splat literals illegal but adds additional logic
to the operand folding to keep current folds. This logic is somewhat
heavy though.

This has fixed constant bus violation in the fdot2 test.
The overhead of a library and 4 files seems high without benefit. This
simply tries to consolidate our structure.
  CONFLICT (content): Merge conflict in llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
This change makes x64 enablement case explicit and
adds an else case for 32bit which fixes a regression
on Windows i386 asan builds introduced
by llvm/llvm-project#66973.
This was causing an assert on invalid in the modified test case.
Some of the files in the docs/ directory are from 2019 and haven't been
updated since. This patch updates implementation_standard.rst,
source_tree_layout.rst, and has some minor fixes for strings.rst. It
also marks the most severely out of date files with a warning. These
files will be updated in a later patch.
Similar to #73677, there is no benefit from keeping MemoryManager
seperate; it's tied into the current design. Except the move I also
replaced the getenv call with our Env handling.
These tests use an old way to test code in constexpr context. This
changes the code to the idomatic libc++ method.

This is a preparation for #73162.

Side changes
- Updated formatting
- Made some helper functions constexpr
- Some naming improvements
Both active C++ proposals (P1144 and P2786) agree that
`is_trivially_relocatable_v<int&>` and
`is_trivially_relocatable_v<int()>` should be false, not true. Only
complete object types can be trivially relocatable.

Fixes #67498
…ion (#73605)

This commit allows a final progress report upon the destruction of the
`Progress` object to happen at all times as opposed to when the progress
was not completed.
…66) (#73680)

If we have a constant index and a known vlen, then we can identify which
registers out of a register group is being accessed. Given this, we can
reuse the (slightly generalized) existing handling for working on
sub-register groups. This results in all constant index extracts with
known vlen becoming m1 operations.

One bit of weirdness to highlight and explain: the existing code uses
the VL from the original vector type, not the inner vector type. This is
correct because the inner register group must be smaller than the
original (possibly fixed length) vector type. Overall, this seems to a
reasonable codegen tradeoff as it biases us towards immediate AVLs,
which avoids needing the vsetvli form which clobbers a GPR for no real
purpose. The downside is that for large fixed length vectors, we end up
materializing an immediate in register for little value. We should
probably generalize this idea and try to optimize the large fixed length
vector case, but that can be done in separate work.
Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.

Information about code object version in MLIR generated by the parser
can be reused by other tools. There is no need to specify extra flags if
we want to invoke MLIR tools (like fir-opt) separately.
Add documentation w.r.t. changes by #72606, which allows to set the dynamic
callstack size.
This commit causes test errors on buildbots.

This reverts commit a8ac930.
For CSEBlocks we can safely use DenseSet, the order should not be
preserved for this container.
…h the AddressSanitizerOptions struct. (#72439)

This patch adds the ability to pass values for the command line options
of -max-inline-poisoning-size, -instrumentation-with-calls-threshold and
-asan-guard-against-version-mismatch through the AddressSanitizerOptions
struct. The motivation is to use these new options when using the pass
in Swift.

rdar://118470958
VyacheslavLevytskyy and others added 5 commits November 30, 2023 11:02
- change Scope argument to one of two available options: ScopeWorkgroup/ScopeWorkgroup
- fix arguments order in calls to OpCooperativeMatrixLoadKHR()

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@4e1d3e0
…ter (#2232)

This fixes reverse translation for SPV_INTEL_fpga_memory_accesses.
Theoretically it fixes more, but seems like without the extension we
don't generate UserSemantic decoration in this case at all. Will
be investigated separately.

Signed-off-by: Sidorov, Dmitry <[email protected]>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@ef0165a
There is a fundamental misalignment between when translating llvm.ptr.annotation to SPIRV's OpMemberDecorate.

llvm.ptr.annotation is applied onto a pointer.

OpMemberDecorate is applied on a type, which means that all variables of this type will have this Decoration.

This change fixes this misalignment by translating llvm.ptr.annotation to SPIRV's OpDecorate instead, which instead places the decoration onto the pointer.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@3770469
@sys-ce-bb sys-ce-bb added the disable-lint Skip linter check step and proceed with build jobs label Nov 30, 2023
afe8b93 2023-11-25 [clang] Avoid
  memcopy for small structure with padding under -ftrivial-auto-var-init
  (#71677) [email protected]

Removed a call to memcopy, so we have 1 less attr.
The difference is due to revert in
#10950
@jsji jsji self-assigned this Nov 30, 2023
@jsji
Copy link
Contributor

jsji commented Dec 1, 2023

This is ready for review.

@jsji jsji marked this pull request as ready for review December 1, 2023 00:26
@jsji jsji requested review from a team and bader as code owners December 1, 2023 00:26
Copy link
Contributor

@AlexeySachkov AlexeySachkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[[SYCL][clang tools] Fix conflict resolution] (522cefd) The difference is due to revert in
#10950 - LGTM

Copy link
Contributor

@premanandrao premanandrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in test look okay to me.

@jsji
Copy link
Contributor

jsji commented Dec 1, 2023

@bader @intel/llvm-gatekeepers This is ready for merge. Thanks.

@aelovikov-intel
Copy link
Contributor

/merge

@bb-sycl
Copy link
Contributor

bb-sycl commented Dec 1, 2023

Fri 01 Dec 2023 05:01:46 PM UTC --- Start to merge the commit into sycl branch. It will take several minutes.

@bb-sycl
Copy link
Contributor

bb-sycl commented Dec 1, 2023

Fri 01 Dec 2023 05:07:31 PM UTC --- Merge the branch in this PR to base automatically. Will close the PR later.

@bb-sycl bb-sycl merged commit caaad39 into sycl Dec 1, 2023
@aelovikov-intel aelovikov-intel deleted the llvmspirv_pulldown branch December 1, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disable-lint Skip linter check step and proceed with build jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.