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

add a spec for loop unroll #263

Merged
merged 5 commits into from
Jul 11, 2024
Merged

Conversation

farzonl
Copy link
Collaborator

@farzonl farzonl commented Jun 14, 2024

unroll & loop spec:
image

Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

Looks good. Some notes about being consistent with the rest of the spec's typographical conventions, and a couple of wording nits.

specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
Copy link
Collaborator

@llvm-beanz llvm-beanz left a comment

Choose a reason for hiding this comment

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

One general formatting issue to note, please put \p at the beginning of paragraphs to provide paragraph numbering.

specs/language/statements.tex Show resolved Hide resolved
specs/language/statements.tex Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
specs/language/statements.tex Outdated Show resolved Hide resolved
@farzonl farzonl merged commit 9b8f96d into microsoft:main Jul 11, 2024
3 checks passed
@farzonl farzonl deleted the loop-unroll-spec branch July 11, 2024 21:05
farzonl added a commit to llvm/llvm-project that referenced this pull request Jul 11, 2024
spec: microsoft/hlsl-specs#263

- `Attr.td` - Define the HLSL loop attribute hints (unroll and loop)
- `AttrDocs.td` - Add documentation for unroll and loop
- `CGLoopInfo.cpp` - Add codegen for HLSL unroll that maps to clang
unroll expectations
- `ParseStmt.cpp` - For statements if HLSL define DeclSpecAttrs via
MaybeParseMicrosoftAttributes
- `SemaStmtAttr.cpp` - Add the HLSL loop unroll handeling

resolves #70114

dxc examples: 
- for loop: https://hlsl.godbolt.org/z/8EK6Pa139
- while loop:  https://hlsl.godbolt.org/z/ebr5MvEcK
- do while: https://hlsl.godbolt.org/z/be8cedoTs 

Documentation:

![Screenshot_20240531_143000](https://github.com/llvm/llvm-project/assets/1802579/9da9df9b-68a6-49eb-9d4f-e080aa2eff7f)
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
spec: microsoft/hlsl-specs#263

- `Attr.td` - Define the HLSL loop attribute hints (unroll and loop)
- `AttrDocs.td` - Add documentation for unroll and loop
- `CGLoopInfo.cpp` - Add codegen for HLSL unroll that maps to clang
unroll expectations
- `ParseStmt.cpp` - For statements if HLSL define DeclSpecAttrs via
MaybeParseMicrosoftAttributes
- `SemaStmtAttr.cpp` - Add the HLSL loop unroll handeling

resolves llvm#70114

dxc examples: 
- for loop: https://hlsl.godbolt.org/z/8EK6Pa139
- while loop:  https://hlsl.godbolt.org/z/ebr5MvEcK
- do while: https://hlsl.godbolt.org/z/be8cedoTs 

Documentation:

![Screenshot_20240531_143000](https://github.com/llvm/llvm-project/assets/1802579/9da9df9b-68a6-49eb-9d4f-e080aa2eff7f)
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.

None yet

4 participants