21 return op &&
op->
low() == low() &&
op->high() == high() &&
op->argument(0) == argument(0);
30std::optional<std::vector<Output *>>
33 const std::vector<Output *> &
operands)
38 const auto bitType = util::assertedCast<const BitType>(operand->Type().get());
41 return std::vector{ operand };
47std::optional<std::vector<Output *>>
50 const std::vector<Output *> &
operands)
66std::optional<std::vector<Output *>>
69 const std::vector<Output *> &
operands)
86std::optional<std::vector<Output *>>
89 const std::vector<Output *> &
operands)
93 const auto low = operation.
low();
100 size_t pos = 0,
n = 0;
105 const auto base = pos;
106 const auto numBits = std::static_pointer_cast<const BitType>(
argument->Type())->nbits();
123std::unique_ptr<Operation>
126 return std::make_unique<BitSliceOperation>(*
this);
134 std::dynamic_pointer_cast<const jlm::rvsdg::BitType>(argument->
Type()),
static Output & create(Region ®ion, BitValueRepresentation value)
static std::optional< std::vector< Output * > > normalizeIdempotent(const BitSliceOperation &operation, const std::vector< Output * > &operands)
static std::optional< std::vector< Output * > > narrowSlice(const BitSliceOperation &operation, const std::vector< Output * > &operands)
static std::optional< std::vector< Output * > > foldConstant(const BitSliceOperation &operation, const std::vector< Output * > &operands)
std::unique_ptr< Operation > copy() const override
static std::optional< std::vector< Output * > > distributeSlice(const BitSliceOperation &operation, const std::vector< Output * > &operands)
~BitSliceOperation() noexcept override
std::string debug_string() const override
size_t high() const noexcept
size_t low() const noexcept
const std::shared_ptr< const rvsdg::Type > & Type() const noexcept
const std::shared_ptr< const rvsdg::Type > & argument(size_t index) const noexcept
static std::vector< jlm::rvsdg::Output * > operands(const Node *node)
jlm::rvsdg::Output * bitconcat(const std::vector< jlm::rvsdg::Output * > &operands)
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
jlm::rvsdg::Output * bitslice(jlm::rvsdg::Output *argument, size_t low, size_t high)
Create bitslice.
static std::string strfmt(Args... args)