[llvm] [DirectX backend] generate ISG1, OSG1 part for compute shader (PR #90508)
Xiang Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 13:37:36 PDT 2024
================
@@ -104,6 +112,39 @@ 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;
+}
+
+GlobalVariable *DXContainerGlobals::buildSingature(Module &M, Signature &Sig,
+ StringRef Name,
+ StringRef SectionName) {
+ std::string Data;
+ raw_string_ostream OS(Data);
----------------
python3kgae wrote:
Updated.
https://github.com/llvm/llvm-project/pull/90508
More information about the llvm-commits
mailing list