[PATCH] D15426: AMDGPU/SI: Emit constant variables in the .hsatext section when targeting HSA

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 11:39:31 PST 2015


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:131-133
@@ -129,4 +130,5 @@
+  // so they don't need any special handling.
   if (TM.getTargetTriple().getOS() != Triple::AMDHSA ||
-      GV->isDeclaration()) {
+      GV->isDeclaration() || GV->getLinkage() == GlobalValue::PrivateLinkage) {
     AsmPrinter::EmitGlobalVariable(GV);
     return;
----------------
I would split the HSA vs. Non HSA into separate ifs


http://reviews.llvm.org/D15426





More information about the llvm-commits mailing list