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

LLVM and SPIRV-LLVM-Translator pulldown (WW45 2024) #16022

Merged
merged 3,147 commits into from
Nov 13, 2024
Merged

LLVM and SPIRV-LLVM-Translator pulldown (WW45 2024) #16022

merged 3,147 commits into from
Nov 13, 2024

Conversation

iclsrc
Copy link
Contributor

@iclsrc iclsrc commented Nov 7, 2024

tbaederr and others added 30 commits October 17, 2024 12:26
Add Integral::toAPInt(), which truncates to the given BitWidth, similar
to the toAPSInt() we already have.
Otherwise the shell might expand this in the command line.
/llvm-project/llvm/lib/Target/ARM/ARMFrameLowering.cpp:1028:9:
error: unused variable 'FPOffset' [-Werror,-Wunused-variable]
    int FPOffset = MFI.getObjectOffset(FramePtrSpillFI);
        ^
1 error generated.
/llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14:
error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
      return std::move(llvm::errorCodeToError(Err));
             ^
/llvm-project/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp:302:14: note: remove std::move call here
      return std::move(llvm::errorCodeToError(Err));
             ^~~~~~~~~~                           ~
1 error generated.
- Pass optimizes memcpy's by padding out destinations and sources to a
full word to make backend generate full word loads instead of loading a
single byte (ldrb) and/or half word (ldrh). Only pads destination when
it's a stack allocated constant size array and source when it's constant
array. Heuristic to decide whether to pad or not is very basic and could
be improved to allow more examples to be padded.
- Pass works within GlobalOpt but is disabled by default on all targets
except ARM.
`S->isConsteval()` is evaluated at the top of this method.
Likely mis-merging in #75425
Currently it is not an issue. It will be a problem if Bitmap is
located after single byte counters.
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4885:13: warning: enumeration value 'SveMFloat8' not handled in switch [-Wswitch]
 4885 |     switch (llvm::cast<clang::BuiltinType>(qual_type)->getKind()) {
      |
Fix #112593 by adding support in lowering to concatenation with an
absent optional _assumed length_ dummy argument because:
1. Most compilers seem to support it (most likely by accident).
2. This actually makes the compiler codegen simpler. Codegen was going
out of its way to poke the LLVM optimizer bear by producing an undef
argument for the length.

I insist on the fact that no compiler support this with _explicit
length_ optional arguments and the executable will segfault and I would
discourage users from using that "feature" because runtime checks for
bad optional dereference will kick when used (For instance, "nagfor
-C=present" will produce an executable that abort with an error message
. Flang does not have such runtime check option so far).

Hence, I am not updating the Extensions.md document because this is not
something I think we should advertise.
llvm/llvm-project#112693 will be
tracking the overall state of LoongArch support.

This means anyone can check without having to track down
an expert.
/llvm-project/polly/lib/CodeGen/LoopGeneratorsKMP.cpp:396:15: error: unused variable 'IdentTy' [-Werror,-Wunused-variable]
  StructType *IdentTy =
              ^
/llvm-project/polly/lib/CodeGen/LoopGeneratorsKMP.cpp:460:15: error: unused variable 'IdentTy' [-Werror,-Wunused-variable]
  StructType *IdentTy =
              ^
2 errors generated.
…mpt to constant fold

Don't rely on isConstantIntBuildVectorOrConstantInt followed by getNode() will constant fold - FoldConstantArithmetic will do all of this for us.

Cleanup for #112682
…mpt to constant fold

Don't rely on isConstantFPBuildVectorOrConstantFP followed by getNode() will constant fold - FoldConstantArithmetic will do all of this for us.

Cleanup for #112682
Returns true for shouldMaximizeVectorBandwidth when the register type
is a scalable vector and SVE or streaming SVE are available.
…RM (#109628)

The -mno-omit-leaf-frame-pointer flag works on 32-bit ARM architectures
and addresses the bug reported in #108019
Add a helper for shared folds between logical and bitwise and/or
and move the and/or of icmp and fcmp folds in there. This makes
it easier to extend to more folds.

A possible extension would be to base the current and/or of icmp
reassociation logic on this helper, so that it for example also
applies to fcmp.
Reverts llvm/llvm-project#107120 

Unexpected build failures in post-commit pipelines. Needs investigation
[Here](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L4188-L4203)
and
[here](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L3679-L3695)
we can see similar code samples and same examples:
```
cxxMemberCallExpr(on(callExpr()))
```

In the first case, it is
[written](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L4201)
that the object must not be matched:
```
/// cxxMemberCallExpr(on(callExpr()))
///   does not match `(g()).m()`, because the parens are not ignored.
```
In the second case, it is
[written](https://github.com/llvm/llvm-project/blob/6a98c4a1602591c942f01dceb3aa29ffd4cf1e5b/clang/include/clang/ASTMatchers/ASTMatchers.h#L3693)
that the object must be matched:
```
/// cxxMemberCallExpr(on(callExpr()))
///   matches `(g()).m()`.
```

I think that parens are ignored
MULS adversely affects performance on many implementations. Where this
is the case, we prefer not to shrink MUL to MULS.
The init args shape might change in the loop body and hence the pattern
doesn't hold true.
@jsji
Copy link
Contributor

jsji commented Nov 11, 2024

This is ready for review.

@hvdijk
Copy link
Contributor

hvdijk commented Nov 12, 2024

This update shows an incompatibility with the version of oneAPI Construction Kit that is used for NativeCPU, which is currently not tested in CI (configure.py --native_cpu without -DNATIVECPU_USE_OCK=OFF). Edit: this incompatibility is because it is based on an older version of the sycl branch and possibly will not cause problems after merging.

@jsji
Copy link
Contributor

jsji commented Nov 12, 2024

This update shows an incompatibility with the version of oneAPI Construction Kit that is used for NativeCPU, which is currently not tested in CI (configure.py --native_cpu without -DNATIVECPU_USE_OCK=OFF). Edit: this incompatibility is because it is based on an older version of the sycl branch and possibly will not cause problems after merging.

Yes, the please test it by merging this branch to sycl.

@elizabethandrews
Copy link
Contributor

Github is acting up and not allowing me to approve/review changes. FE Changes LGTM.

However, the following PRs are not FE PRs and require review from other components. The IR changes are due to LLVM passes IIUC

[SYCL][Test] Update attributes in tests after 69a798a 095d49d @intel/dpcpp-cfe-reviewers
[SYCL] Use union to do bitcast after bif removal in 8be6b10 @intel/sycl-matrix-reviewers @intel/dpcpp-cfe-reviewers

@jsji
Copy link
Contributor

jsji commented Nov 12, 2024

Github is acting up and not allowing me to approve/review changes. FE Changes LGTM.

However, the following PRs are not FE PRs and require review from other components. The IR changes are due to LLVM passes IIUC

[SYCL][Test] Update attributes in tests after 69a798a 095d49d @intel/dpcpp-cfe-reviewers [SYCL] Use union to do bitcast after bif removal in 8be6b10 @intel/sycl-matrix-reviewers @intel/dpcpp-cfe-reviewers

Thanks @elizabethandrews !

@intel/dpcpp-tools-reviewers Can someone help to have a look at

[SYCL][Test] Update attributes in tests after 69a798a 095d49d @intel/dpcpp-tools-reviewers
[SYCL] Use union to do bitcast after bif removal in 8be6b10 @intel/sycl-matrix-reviewers @intel/dpcpp-tools-reviewers

@AlexeySachkov
Copy link
Contributor

[SYCL][Test] Update attributes in tests after 69a798a 095d49d @intel/dpcpp-tools-reviewers

I'm not a code owner of those files, but those changes LGTM.

[SYCL] Use union to do bitcast after bif removal in 8be6b10 @intel/sycl-matrix-reviewers @intel/dpcpp-tools-reviewers

That I would defer to @intel/sycl-matrix-reviewers, I'm not familiar enough with the topic. Strictly speaking, bitcast through union is UB. Either bit_cast or memcpy should be used, but I will leave it up to actual code owners to decide

@jsji
Copy link
Contributor

jsji commented Nov 13, 2024

[SYCL][Test] Update attributes in tests after 69a798a 095d49d @intel/dpcpp-tools-reviewers

I'm not a code owner of those files, but those changes LGTM.

[SYCL] Use union to do bitcast after bif removal in 8be6b10 @intel/sycl-matrix-reviewers @intel/dpcpp-tools-reviewers

That I would defer to @intel/sycl-matrix-reviewers, I'm not familiar enough with the topic. Strictly speaking, bitcast through union is UB. Either bit_cast or memcpy should be used, but I will leave it up to actual code owners to decide

@intel/sycl-matrix-reviewers Can you comment on [SYCL] Use union to do bitcast after bif removal in 8be6b10

Copy link
Contributor

@dkhaldi dkhaldi left a comment

Choose a reason for hiding this comment

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

float to tf32 change LGTM

@jsji
Copy link
Contributor

jsji commented Nov 13, 2024

@intel/llvm-gatekeepers This is ready for merge. Can someone help to issue a "/merge"? Thanks

@sarnex
Copy link
Contributor

sarnex commented Nov 13, 2024

/merge

@bb-sycl
Copy link
Contributor

bb-sycl commented Nov 13, 2024

Wed 13 Nov 2024 02:45:28 PM UTC --- Start to merge the commit into sycl branch. It will take several minutes.

@bb-sycl
Copy link
Contributor

bb-sycl commented Nov 13, 2024

Wed 13 Nov 2024 02:50:16 PM UTC --- Merge failed with error: Please check whether the PR is mergeable

@sarnex
Copy link
Contributor

sarnex commented Nov 13, 2024

@jsji Uuuh, never seen that before. Does that mean we need to merge again?

@jsji
Copy link
Contributor

jsji commented Nov 13, 2024

@jsji Uuuh, never seen that before. Does that mean we need to merge again?

Let me check the mergeable state locally first.

@jsji
Copy link
Contributor

jsji commented Nov 13, 2024

@jsji Uuuh, never seen that before. Does that mean we need to merge again?

Let me check the mergeable state locally first.

It works for me locally. Yes, let us try another /merge again? @sarnex

@sarnex
Copy link
Contributor

sarnex commented Nov 13, 2024

/merge

@bb-sycl
Copy link
Contributor

bb-sycl commented Nov 13, 2024

Wed 13 Nov 2024 02:57:03 PM UTC --- Start to merge the commit into sycl branch. It will take several minutes.

@bb-sycl
Copy link
Contributor

bb-sycl commented Nov 13, 2024

Wed 13 Nov 2024 03:01:59 PM UTC --- Merge failed with error: Please check whether the PR is mergeable

@jsji
Copy link
Contributor

jsji commented Nov 13, 2024

Wed 13 Nov 2024 03:01:59 PM UTC --- Merge failed with error: Please check whether the PR is mergeable

@DoyleLi Can you help to check what is going on with the bot? The PR is certainly mergeable here.

@sarnex sarnex merged commit 797177b into sycl Nov 13, 2024
52 of 57 checks passed
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.