28static rvsdg::RegionResult *
32 std::vector<rvsdg::Node *> & load_nodes,
33 const std::vector<rvsdg::Node *> & store_nodes,
54 std::vector<jlm::rvsdg::Output *>
vec;
55 new_edge = gammaNode->AddExitVar(
ip.branchArgument).output;
62 for (
size_t i = 0;
i < gammaNode->nsubregions(); ++
i)
76 auto olv = theta->MapInputLoopVar(
user);
85 auto op = &
sn->GetOperation();
89 if (store_nodes.end() != std::find(store_nodes.begin(), store_nodes.end(),
sn))
104 if (load_nodes.end() != std::find(load_nodes.begin(), load_nodes.end(),
sn))
120 int oi =
sn->noutputs() -
sn->ninputs() +
user.index();
148std::vector<rvsdg::Node *>
170 calls.push_back(node);
176 std::vector<rvsdg::Node *>
calls;
215 for (
size_t i = 0;
i < numMemoryStates; ++
i)
264 const auto rootRegion = &graph.GetRootRegion();
267 throw std::logic_error(
"Root should have only one node now");
274 throw std::logic_error(
"Node needs to be a lambda");
~MemoryStateSeparation() noexcept override
static std::vector< rvsdg::Node * > gatherNonDecoupleCalls(rvsdg::Region ®ion)
static void separateMemoryStates(const rvsdg::LambdaNode &lambdaNode)
void Run(rvsdg::RvsdgModule &rvsdgModule, util::StatisticsCollector &statisticsCollector) override
Perform RVSDG transformation.
static rvsdg::SimpleNode & CreateNode(rvsdg::Output &operand, std::vector< MemoryNodeId > memoryNodeIds)
static rvsdg::SimpleNode & CreateNode(rvsdg::Region ®ion, const std::vector< rvsdg::Output * > &operands, const std::vector< MemoryNodeId > &memoryNodeIds)
Represents the result of a region.
Represent acyclic RVSDG subgraphs.
#define JLM_UNREACHABLE(msg)
rvsdg::SimpleNode * find_decouple_response(const rvsdg::LambdaNode *lambda, const llvm::IntegerConstantOperation *request_constant)
std::string get_function_name(jlm::rvsdg::Input *input)
const llvm::IntegerConstantOperation * trace_constant(const rvsdg::Output *dst)
std::vector< TracedPointerNodes > TracePointerArguments(const rvsdg::LambdaNode *lambda)
static rvsdg::Output * trace_edge(rvsdg::Input *state_edge, rvsdg::Output *new_edge, rvsdg::SimpleNode *target_call, rvsdg::Output *end)
rvsdg::Input & GetMemoryStateRegionResult(const rvsdg::LambdaNode &lambdaNode) noexcept
rvsdg::Output & GetMemoryStateRegionArgument(const rvsdg::LambdaNode &lambdaNode) noexcept
static std::vector< jlm::rvsdg::Output * > outputs(const Node *node)
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
detail::TopDownTraverserGeneric< false > TopDownTraverser
Traverser for visiting every node in a region in a top down order.