[clang][amdgpu] - Choose when to promote VarDecl to address space 4.
There are instances where clang codegen creates stores to address space 4 in ctors, which causes a crash in llc. This store was being optimized out at opt levels > 0. For example: pragma omp declare target static const double log_smallx = log2(smallx); pragma omp end declare target This patch ensures that any global const that does not have constant initialization stays in address space 1. Note - a second patch is in the works where all global constants are placed in address space 1 during codegen and then the opt pass InferAdressSpaces will promote to address space 4 where necessary. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D115661
Loading
Please sign in to comment