diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-08-07 16:06:58 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-08-15 12:21:08 -0700 |
| commit | 831896f844453ba09c9e6cbfe7d29f6d44282632 (patch) | |
| tree | b3f2bd89ffb324bbdc84e542ef42f8e9b3731c31 /source/slang/ir.cpp | |
| parent | e6abc6821a1bf13a9826e7db74362ce34ccaca2a (diff) | |
Starting to add intermediate representation (IR)
Right now none of this is hooked up, but I want to get things checked in incrementally rather than have along long-lived branches.
- Added placeholder declarations for IR representation of instructions, basic blocks, etc.
- Start adding a `lower-to-ir` pass to translate from AST representation to IR
Again: none of this is functional, so it shouldn't mess with existing users of the compiler.
Diffstat (limited to 'source/slang/ir.cpp')
| -rw-r--r-- | source/slang/ir.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp new file mode 100644 index 000000000..44eb7a727 --- /dev/null +++ b/source/slang/ir.cpp @@ -0,0 +1,29 @@ +// ir.cpp +#include "ir.h" + +#include "../core/basic.h" + +namespace Slang +{ + + IRType* IRBuilder::getBoolType() + { + SLANG_UNIMPLEMENTED_X("IR"); + } + + IRValue* IRBuilder::getBoolValue(bool value) + { + SLANG_UNIMPLEMENTED_X("IR"); + } + + IRValue* IRBuilder::getIntValue(IRType* type, IRIntegerValue value) + { + SLANG_UNIMPLEMENTED_X("IR"); + } + + IRValue* IRBuilder::getFloatValue(IRType* type, IRFloatingPointValue value) + { + SLANG_UNIMPLEMENTED_X("IR"); + } + +} |
