diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-03-14 03:41:05 -0300 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:23 -0400 |
commit | 71f96fa6366dc6dd306a953bca1b958fb32bc55a (patch) | |
tree | 12e13f9502e4b9510446c967a831e5d4bacb729e /src/shader_recompiler/frontend/ir/program.cpp | |
parent | b9f7bf4472b8e0a5aad1aec3a5ff5bb56470bfff (diff) |
shader: Implement CAL inlining function calls
Diffstat (limited to 'src/shader_recompiler/frontend/ir/program.cpp')
-rw-r--r-- | src/shader_recompiler/frontend/ir/program.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/shader_recompiler/frontend/ir/program.cpp b/src/shader_recompiler/frontend/ir/program.cpp index 8c301c3a10..5f51aeb5f3 100644 --- a/src/shader_recompiler/frontend/ir/program.cpp +++ b/src/shader_recompiler/frontend/ir/program.cpp @@ -9,7 +9,8 @@ #include <fmt/format.h> -#include "shader_recompiler/frontend/ir/function.h" +#include "shader_recompiler/frontend/ir/basic_block.h" +#include "shader_recompiler/frontend/ir/microinstruction.h" #include "shader_recompiler/frontend/ir/program.h" namespace Shader::IR { @@ -19,18 +20,13 @@ std::string DumpProgram(const Program& program) { std::map<const IR::Inst*, size_t> inst_to_index; std::map<const IR::Block*, size_t> block_to_index; - for (const IR::Function& function : program.functions) { - for (const IR::Block* const block : function.blocks) { - block_to_index.emplace(block, index); - ++index; - } + for (const IR::Block* const block : program.blocks) { + block_to_index.emplace(block, index); + ++index; } std::string ret; - for (const IR::Function& function : program.functions) { - ret += fmt::format("Function\n"); - for (const auto& block : function.blocks) { - ret += IR::DumpBlock(*block, block_to_index, inst_to_index, index) + '\n'; - } + for (const auto& block : program.blocks) { + ret += IR::DumpBlock(*block, block_to_index, inst_to_index, index) + '\n'; } return ret; } |