summaryrefslogtreecommitdiff
path: root/source/slang/ir.h
diff options
context:
space:
mode:
authorTim Foley <tim.foley.is@gmail.com>2017-09-25 11:27:54 -0700
committerGitHub <noreply@github.com>2017-09-25 11:27:54 -0700
commitb6cf0f4ae0f3f9d1f377d3f134dcf994676e68b4 (patch)
treebcc781497b36664cbebe10d91f888be674c82f8b /source/slang/ir.h
parentb206af702cbc8cc42c73052ad690d69984ecd7b7 (diff)
parent0aa440a22ab18bc4a9077fcf17966ed4949d684b (diff)
Merge pull request #191 from tfoleyNV/ir-work
More work on IR-based lowering and cross-compilation
Diffstat (limited to 'source/slang/ir.h')
-rw-r--r--source/slang/ir.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h
index bc73ffb66..a557e22f5 100644
--- a/source/slang/ir.h
+++ b/source/slang/ir.h
@@ -148,6 +148,7 @@ enum IRDecorationOp : uint16_t
kIRDecorationOp_EntryPoint,
kIRDecorationOp_ComputeThreadGroupSize,
kIRDecorationOp_LoopControl,
+ kIRDecorationOp_MangledName,
};
// A "decoration" that gets applied to an instruction.
@@ -269,6 +270,13 @@ struct IRParentInst : IRInst
IRInst* lastChild;
};
+// A function parameter is represented by an instruction
+// in the entry block of a function.
+struct IRParam : IRInst
+{
+ IRParam* getNextParam();
+};
+
// A basic block is a parent instruction that adds the constraint
// that all the children need to be "ordinary" instructions (so
// no function declarations, or nested blocks). We also expect
@@ -284,13 +292,8 @@ struct IRBlock : IRParentInst
IRBlock* getNextBlock() { return (IRBlock*) nextInst; }
IRFunc* getParent() { return (IRFunc*)parent; }
-};
-// A function parameter is represented by an instruction
-// in the entry block of a function.
-struct IRParam : IRInst
-{
- IRParam* getNextParam();
+ IRParam* getFirstParam();
};
struct IRFuncType;