[flang][cuda] Make default.nonTbpDefinedIoTable compiler generated (#120686)
`default.nonTbpDefinedIoTable` is a special global defined for IO that doesn't follow the mangling scheme and is then not handle correctly in the `CompilerGeneratedNames` pass. Update how it is generated with doGenerated so it can be handle without special handling. Also do not generate comdat in gpu module as the current code is not handling nested module correctly.
This commit is contained in:
committed by
GitHub
parent
89cb528f07
commit
3e13acfbf4
@@ -2990,10 +2990,12 @@ struct GlobalOpConversion : public fir::FIROpConversion<fir::GlobalOp> {
|
||||
g.setAlignment(*global.getAlignment());
|
||||
|
||||
auto module = global->getParentOfType<mlir::ModuleOp>();
|
||||
auto gpuMod = global->getParentOfType<mlir::gpu::GPUModuleOp>();
|
||||
// Add comdat if necessary
|
||||
if (fir::getTargetTriple(module).supportsCOMDAT() &&
|
||||
(linkage == mlir::LLVM::Linkage::Linkonce ||
|
||||
linkage == mlir::LLVM::Linkage::LinkonceODR)) {
|
||||
linkage == mlir::LLVM::Linkage::LinkonceODR) &&
|
||||
!gpuMod) {
|
||||
addComdat(g, rewriter, module);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user