-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SVE][IR] Scalable Vector IR Type with pr42210 fix
Recommit of D32530 with a few small changes:
- Stopped recursively walking through aggregates in
the verifier, so that we don't impose too much
overhead on large modules under LTO (see PR42210).
- Changed tests to match; the errors are slightly
different since they only report the array or
struct that actually contains a scalable vector,
rather than all aggregates which contain one in
a nested member.
- Corrected an older comment
Reviewers: thakis, rengolin, sdesmalen
Reviewed By: sdesmalen
Differential Revision: https://reviews.llvm.org/D63321
llvm-svn: 363658- Loading branch information
1 parent
6658bfb
commit 43854e3
Showing
19 changed files
with
446 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| //===- ScalableSize.h - Scalable vector size info ---------------*- C++ -*-===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| // | ||
| // This file provides a struct that can be used to query the size of IR types | ||
| // which may be scalable vectors. It provides convenience operators so that | ||
| // it can be used in much the same way as a single scalar value. | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #ifndef LLVM_SUPPORT_SCALABLESIZE_H | ||
| #define LLVM_SUPPORT_SCALABLESIZE_H | ||
|
|
||
| namespace llvm { | ||
|
|
||
| class ElementCount { | ||
| public: | ||
| unsigned Min; // Minimum number of vector elements. | ||
| bool Scalable; // If true, NumElements is a multiple of 'Min' determined | ||
| // at runtime rather than compile time. | ||
|
|
||
| ElementCount(unsigned Min, bool Scalable) | ||
| : Min(Min), Scalable(Scalable) {} | ||
|
|
||
| ElementCount operator*(unsigned RHS) { | ||
| return { Min * RHS, Scalable }; | ||
| } | ||
| ElementCount operator/(unsigned RHS) { | ||
| return { Min / RHS, Scalable }; | ||
| } | ||
|
|
||
| bool operator==(const ElementCount& RHS) const { | ||
| return Min == RHS.Min && Scalable == RHS.Scalable; | ||
| } | ||
| }; | ||
|
|
||
| } // end namespace llvm | ||
|
|
||
| #endif // LLVM_SUPPORT_SCALABLESIZE_H |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ enum Kind { | |
| bar, // | | ||
| colon, // : | ||
|
|
||
| kw_vscale, | ||
| kw_x, | ||
| kw_true, | ||
| kw_false, | ||
|
|
||
Oops, something went wrong.