Skip to content

[Attributor] Honor alloca address space also for Heap2Stack allocas #53858

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

Closed
jdoerfert opened this issue Feb 15, 2022 · 6 comments
Closed

[Attributor] Honor alloca address space also for Heap2Stack allocas #53858

jdoerfert opened this issue Feb 15, 2022 · 6 comments

Comments

@jdoerfert
Copy link
Member

The AMD gpu backend doesn't like AS0 allocas. We need to create them in the alloca AS instead. Causes OpenMP programs on AMD GPU to crash at compile time, sometimes with the weirdest assertions.

@jdoerfert jdoerfert added openmp ipo Interprocedural optimizations labels Feb 15, 2022
@jdoerfert jdoerfert added this to the LLVM 14.0.0 Release milestone Feb 15, 2022
@jdoerfert jdoerfert self-assigned this Feb 15, 2022
@llvmbot
Copy link
Member

llvmbot commented Feb 15, 2022

@llvm/issue-subscribers-openmp

@jdoerfert
Copy link
Member Author

/cherry-pick 8ad39fb

@llvmbot
Copy link
Member

llvmbot commented Feb 16, 2022

Failed to cherry-pick: 8ad39fb

https://github.com/llvm/llvm-project/actions/runs/1855576025

Please manually backport the fix and push it to your github fork. Once this is done, please add a comment like this:

/branch <user>/<repo>/<branch>

@jdoerfert
Copy link
Member Author

/cherry-pick 8ad39fb

@llvmbot
Copy link
Member

llvmbot commented Feb 17, 2022

/branch llvmbot/llvm-project/issue53858

llvmbot pushed a commit to llvmbot/llvm-project that referenced this issue Feb 17, 2022
When we move an allocation from the heap to the stack we need to
allocate it in the alloca AS and then cast the result. This also
prevents us from inserting the alloca after the allocation call but
rather right before.

Fixes llvm#53858

(cherry picked from commit 8ad39fb)
@llvmbot
Copy link
Member

llvmbot commented Feb 17, 2022

/pull-request llvmbot#79

tstellar pushed a commit to llvmbot/llvm-project that referenced this issue Feb 21, 2022
When we move an allocation from the heap to the stack we need to
allocate it in the alloca AS and then cast the result. This also
prevents us from inserting the alloca after the allocation call but
rather right before.

Fixes llvm#53858

(cherry picked from commit 8ad39fb)
jdoerfert added a commit to jdoerfert/llvm-project that referenced this issue Mar 25, 2022
When we move an allocation from the heap to the stack we need to
allocate it in the alloca AS and then cast the result. This also
prevents us from inserting the alloca after the allocation call but
rather right before.

Fixes llvm#53858
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this issue Oct 7, 2022
When we move an allocation from the heap to the stack we need to
allocate it in the alloca AS and then cast the result. This also
prevents us from inserting the alloca after the allocation call but
rather right before.

Fixes llvm/llvm-project#53858
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants