[llvm] [DirectX backend] generate ISG1, OSG1 part for compute shader (PR #90508)
Chris B via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 14:06:46 PDT 2024
================
@@ -104,6 +112,38 @@ GlobalVariable *DXContainerGlobals::computeShaderHash(Module &M) {
return GV;
}
+GlobalVariable *DXContainerGlobals::buildContainerGlobal(
+ Module &M, Constant *Content, StringRef Name, StringRef SectionName) {
+ auto *GV = new llvm::GlobalVariable(
+ M, Content->getType(), true, GlobalValue::PrivateLinkage, Content, Name);
+ GV->setSection(SectionName);
+ GV->setAlignment(Align(4));
+ return GV;
----------------
llvm-beanz wrote:
You added this function but it is only called in one place. If you intend this as a refactoring, we should extend it across the file, otherwise it seems odd to add a function that is only called from one location.
https://github.com/llvm/llvm-project/pull/90508
More information about the llvm-commits
mailing list