19 if (operation ==
nullptr || getPointeeType() != operation->getPointeeType()
20 || narguments() != operation->narguments())
25 for (
size_t n = 0; n < narguments(); n++)
27 if (operation->argument(n) != argument(n))
39 return "GetElementPtr";
42 std::unique_ptr<rvsdg::Operation>
45 return std::make_unique<GetElementPtrOperation>(*
this);
48 std::optional<std::vector<uint64_t>>
51 JLM_ASSERT(is<GetElementPtrOperation>(node.GetOperation()));
53 std::vector<size_t> constants;
54 for (
auto & input : indices(node))
58 constants.push_back(constant.value());
std::string debug_string() const override
static std::optional< std::vector< uint64_t > > tryGetConstantIndices(const rvsdg::Node &node) noexcept
~GetElementPtrOperation() noexcept override
std::unique_ptr< Operation > copy() const override
Global memory state passed between functions.
std::optional< int64_t > tryGetConstantSignedInteger(const rvsdg::Output &output)