summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/program.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-02-02 21:07:00 -0300
committerGravatar ameerj2021-07-22 21:51:21 -0400
commit6c4cc0cd062fbbba5349da1108d3c23cb330ca8a (patch)
tree544291931da8a85fafcea71964c77d9278ec7f29 /src/shader_recompiler/frontend/maxwell/program.h
parentshader: Initial recompiler work (diff)
downloadyuzu-6c4cc0cd062fbbba5349da1108d3c23cb330ca8a.tar.gz
yuzu-6c4cc0cd062fbbba5349da1108d3c23cb330ca8a.tar.xz
yuzu-6c4cc0cd062fbbba5349da1108d3c23cb330ca8a.zip
shader: SSA and dominance
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/frontend/maxwell/program.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/program.h b/src/shader_recompiler/frontend/maxwell/program.h
index 7814b2c01..36e678a9e 100644
--- a/src/shader_recompiler/frontend/maxwell/program.h
+++ b/src/shader_recompiler/frontend/maxwell/program.h
@@ -4,13 +4,16 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <memory>
7#include <string> 8#include <string>
8#include <vector> 9#include <vector>
9 10
11#include <boost/container/small_vector.hpp>
10#include <boost/pool/pool_alloc.hpp> 12#include <boost/pool/pool_alloc.hpp>
11 13
12#include "shader_recompiler/environment.h" 14#include "shader_recompiler/environment.h"
13#include "shader_recompiler/frontend/ir/basic_block.h" 15#include "shader_recompiler/frontend/ir/basic_block.h"
16#include "shader_recompiler/frontend/ir/function.h"
14#include "shader_recompiler/frontend/maxwell/control_flow.h" 17#include "shader_recompiler/frontend/maxwell/control_flow.h"
15 18
16namespace Shader::Maxwell { 19namespace Shader::Maxwell {
@@ -22,16 +25,10 @@ public:
22 explicit Program(Environment& env, const Flow::CFG& cfg); 25 explicit Program(Environment& env, const Flow::CFG& cfg);
23 26
24private: 27private:
25 struct Function {
26 ~Function();
27
28 std::vector<IR::Block*> blocks;
29 };
30
31 boost::pool_allocator<IR::Block, boost::default_user_allocator_new_delete, 28 boost::pool_allocator<IR::Block, boost::default_user_allocator_new_delete,
32 boost::details::pool::null_mutex> 29 boost::details::pool::null_mutex>
33 block_alloc_pool; 30 block_alloc_pool;
34 std::vector<Function> functions; 31 boost::container::small_vector<IR::Function, 1> functions;
35}; 32};
36 33
37[[nodiscard]] std::string DumpProgram(const Program& program); 34[[nodiscard]] std::string DumpProgram(const Program& program);