Jlm
Loading...
Searching...
No Matches
AggregateOperations.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2026 Nico Reißmann <nico.reissmann@gmail.com>
3 * See COPYING for terms of redistribution.
4 */
5
7
8namespace jlm::llvm
9{
10
12
13bool
14ExtractValueOperation::operator==(const Operation & other) const noexcept
15{
16 auto op = dynamic_cast<const ExtractValueOperation *>(&other);
17 return op && op->indices_ == indices_ && op->type() == type();
18}
19
20std::string
22{
23 return "ExtractValue";
24}
25
26std::unique_ptr<rvsdg::Operation>
28{
29 return std::make_unique<ExtractValueOperation>(*this);
30}
31
33
34std::string
35InsertValueOperation::debug_string() const
36{
37 return "InsertValue";
38}
39
40std::unique_ptr<rvsdg::Operation>
45
46bool
47InsertValueOperation::operator==(const Operation & other) const noexcept
48{
49 const auto operation = dynamic_cast<const InsertValueOperation *>(&other);
50 return operation && operation->getAggregateType() == getAggregateType()
51 && operation->getValueType() == getValueType() && operation->getIndices() == getIndices();
52}
53
54}
std::unique_ptr< Operation > copy() const override
std::string debug_string() const override
~ExtractValueOperation() noexcept override
const std::shared_ptr< const rvsdg::Type > & getAggregateType() const noexcept
static std::unique_ptr< InsertValueOperation > create(const std::shared_ptr< const rvsdg::Type > &aggregateType, const std::shared_ptr< const rvsdg::Type > &valueType, std::vector< unsigned > indices)
~InsertValueOperation() noexcept override
const std::vector< unsigned > & getIndices() const noexcept
std::unique_ptr< Operation > copy() const override
bool operator==(const Operation &other) const noexcept override
const std::shared_ptr< const rvsdg::Type > & getValueType() const noexcept
Global memory state passed between functions.