================
@@ -2928,12 +2928,13 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name,
   for (unsigned i = 0, e = List.size(); i != e; ++i) {
     UsedArray[i] =
         llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
-            cast<llvm::Constant>(&*List[i]), CGM.Int8PtrTy);
----------------
yxsamliu wrote:

We have HIP apps which ship bitcode library which may contain 
llvm.compiler.used or llvm.global_ctors which use addr space 0. If we switch to 
use addr space 1, the new HIP app may not be able to link with the existing 
bitcode libraries.

My understanding is that the addr space used in llvm.compiler.used or 
llvm.global_ctors do not really have meanings since no one loads or stores to 
them. As long as they are the same for different TU's it is fine. It should be 
OK to use addr space 0.

https://github.com/llvm/llvm-project/pull/93601
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to