If an inlined kernel is called in a loop, the launch point alloca would
lead to increasing stack usage every time the kernel is invoked. This
could make the application run out of stack space and crash. This problem
is fixed by using the alloca insertion point while creating the alloca instruction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Check the other functions around, they take an AllocaIP, which is on the user side not necessarily the entry block. We need to follow that scheme here too.
LG, make sure all tests pass, this one seems to fail according to build kite: OpenMP/target_map_codegen_hold.cpp
clang/test/OpenMP/target_map_codegen_hold.cpp | ||
---|---|---|
211 | The hash is hardcoded. I recommend removing this part and putting the old check lines in again. |
clang/test/OpenMP/target_map_codegen_hold.cpp | ||
---|---|---|
211 | @jdoerfert Thanks for the suggestion. It was passing for me locally, I assume the locally built compiler was generating the same hash. I removed the hash lines like it was earlier, it should pass now. |
Removed attributes (as original) from clang test OpenMP/target_map_codegen_hold.cpp.
Rebased.
The hash is hardcoded. I recommend removing this part and putting the old check lines in again.