[llvm] [DirectX backend] generate ISG1, OSG1 part for compute shader (PR #90508)

Damyan Pepper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 08:28:23 PDT 2024


================
@@ -18,18 +18,25 @@
 #include "llvm/CodeGen/Passes.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/InitializePasses.h"
+#include "llvm/MC/DXContainerPSVInfo.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/MD5.h"
 #include "llvm/Transforms/Utils/ModuleUtils.h"
 
 using namespace llvm;
 using namespace llvm::dxil;
+using namespace llvm::mcdxbc;
 
 namespace {
 class DXContainerGlobals : public llvm::ModulePass {
 
+  GlobalVariable *buildContainerGlobal(Module &M, Constant *Content,
+                                       StringRef Name, StringRef SectionName);
   GlobalVariable *getFeatureFlags(Module &M);
   GlobalVariable *computeShaderHash(Module &M);
+  GlobalVariable *buildSingature(Module &M, Signature &Sig, StringRef Name,
+                                 StringRef SectionName);
+  void addSingature(Module &M, SmallVector<GlobalValue *> &Globals);
----------------
damyanp wrote:

```suggestion
  GlobalVariable *buildSignature(Module &M, Signature &Sig, StringRef Name,
                                 StringRef SectionName);
  void addSignature(Module &M, SmallVector<GlobalValue *> &Globals);
```

https://github.com/llvm/llvm-project/pull/90508


More information about the llvm-commits mailing list