33 const std::vector<CFGBlock>& cfg_blocks)
override {
34 std::set<std::string> gen_set;
35 const auto& block = cfg_blocks[block_idx];
37 for (
int j = block.start_token_idx; j < block.end_token_idx; ++j) {
39 const auto& array_name =
40 std::get<TokenPayloadArrayOp>(tokens[j].payload).name;
48 meetOperation(
const std::vector<std::set<std::string>>& inputs)
override {
50 std::set<std::string> result;
51 for (
const auto& input : inputs) {
52 result.insert(input.begin(), input.end());
59 const std::set<std::string>& gen_set)
override {
61 std::set<std::string> out_value = gen_set;
62 out_value.insert(in_value.begin(), in_value.end());
68 return std::set<std::string>{};
76 const auto& cfg_blocks = block_result.cfg_blocks;
81 auto [in_sets, out_sets] =
analysis.analyze(tokens, cfg_blocks);
PassT::Result & getResult()
ForwardDataflowAnalysis()=default
std::set< std::string > computeGenSet(size_t block_idx, const std::vector< Token > &tokens, const std::vector< CFGBlock > &cfg_blocks) override
std::set< std::string > getBoundaryValue() override
std::set< std::string > meetOperation(const std::vector< std::set< std::string > > &inputs) override
std::set< std::string > transferFunction(const std::set< std::string > &in_value, const std::set< std::string > &gen_set) override
StaticAllocReachabilityResult Result
Result run(const std::vector< Token > &tokens, AnalysisManager &am) override
std::string getArrayName(std::string_view base_name)
std::vector< std::set< std::string > > static_alloc_in
std::vector< std::set< std::string > > static_alloc_out