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

update llir/llvm to support 12.0 #169

Closed
dannypsnl opened this issue Mar 11, 2021 · 13 comments · Fixed by #197
Closed

update llir/llvm to support 12.0 #169

dannypsnl opened this issue Mar 11, 2021 · 13 comments · Fixed by #197

Comments

@dannypsnl
Copy link
Member

dannypsnl commented Mar 11, 2021

NOTE: send pull requests to branch llvm12.

Changes to LLVM IR

  • Added the byref attribute to better represent argument passing for the amdgpu_kernel calling convention.
  • Added type parameter to the sret attribute to continue work on removing pointer element types.
  • The llvm.experimental.vector.reduce family of intrinsics has been renamed to drop the “experimental” from the name, reflecting their now fully supported status in the IR.
@dannypsnl dannypsnl changed the title LLVM 12.0 update llir/llvm to support 12.0 Mar 11, 2021
@dannypsnl

This comment has been minimized.

@mewmew
Copy link
Member

mewmew commented Apr 15, 2021

LLVM 12.0 has now been released https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.0

Release announcement: https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html

@mewmew
Copy link
Member

mewmew commented Apr 16, 2021

The work updating llir/llvm to support LLVM 12.0 is similar to that done for supporting LLVM 11.0. See #147 and #158 for reference.

@dannypsnl
Copy link
Member Author

Compare ASM parser changes:

$ wget https://github.com/llvm/llvm-project/archive/llvmorg-11.0.0.tar.gz
$ wget https://github.com/llvm/llvm-project/archive/llvmorg-12.0.0.tar.gz
$ tar zxf llvmorg-11.0.0.tar.gz
$ tar zxf llvmorg-12.0.0.tar.gz
$ git diff llvm-project-llvmorg-11.0.0/llvm/lib/AsmParser llvm-project-llvmorg-12.0.0/llvm/lib/AsmParser

I cannot paste the result this time since
圖片

@dannypsnl
Copy link
Member Author

Instead of pasting the result, I would create a diff file, delete the updated part from it in PR.

@mewmew
Copy link
Member

mewmew commented Apr 19, 2021

I cannot paste the result this time since

Post as a GitHub gist file? https://gist.github.com/

@dannypsnl
Copy link
Member Author

dannypsnl commented Apr 19, 2021

I cannot paste the result this time since

Post as a GitHub gist file? https://gist.github.com/

I want to track with PR, using diff file can see changes, maybe put it at llir/grammar?

update

and gist is personal I remember? Then we cannot track changes.

@mewmew
Copy link
Member

mewmew commented Apr 19, 2021

I want to track with PR, using diff file can see changes, maybe put it at llir/grammar?

You can keep it in llir/llvm (or llir/grammar if you prefer), as both repos have to be updated in either case. So long as we keep the diff in a branch, and then remove the diff before merging it should be possible to keep repository size down.

and gist is personal I remember? Then we cannot track changes.

Fair point. Keep the diff in the llvm-12 branch is a good idea then.

@mewmew
Copy link
Member

mewmew commented May 16, 2021

Added type parameter to the sret attribute to continue work on removing pointer element types.

ref: llir/ll#7 and llir/ll#8.

@dannypsnl
Copy link
Member Author

@mewmew would you like to start working on test cases updating?

@mewmew
Copy link
Member

mewmew commented Jul 16, 2021

@mewmew would you like to start working on test cases updating?

If you would like to try updating the test cases this time, then feel free. Otherwise, I can update them later on. I'll be heading out on vacation soon; will be tenting this weekend and then going for a longer trek in the south of Sweden starting next week.

@mewmew
Copy link
Member

mewmew commented Jul 18, 2021

@mewmew would you like to start working on test cases updating?

I had some time left over :) So sent a PR for updating the test cases: llir/testdata#9

There are currently 1 known parse error (see #195 (comment))

@mewmew
Copy link
Member

mewmew commented Jul 18, 2021

Translating AST to IR

  • support for *ast.StructRetAttr not yet implemented
l-tm testdata/llvm/test/DebugInfo/ARM/selectiondag-deadcode.ll
# Output:
# === [ testdata/llvm/test/DebugInfo/ARM/selectiondag-deadcode.ll ] =======================
# 
# panic: support for parameter attribute *ast.StructRetAttr not yet implemented
#
# goroutine 1 [running]:
# github.com/llir/llvm/asm.(*generator).irParamAttribute(0x686bd8, {0x7f0ffd834390, 0xc00000e1a0})
#	/home/u/life/projects/github.com/llir/llvm/asm/helper.go:630 +0x693

Edit: fixed in commit a84775f.

  • dso_local_equivalent
  • poison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants