mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
ASHR.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include <memory>
6
#include <string>
7
#include <utility>
8
9
#include "
mini-llvm/ir/Instruction/BinaryIntegerArithmeticOperator.h
"
10
#include "
mini-llvm/ir/InstructionVisitor.h
"
11
#include "
mini-llvm/ir/Value.h
"
12
#include "
mini-llvm/utils/Compiler.h
"
13
14
namespace
mini_llvm::ir
{
15
16
class
MINI_LLVM_EXPORT
ASHR
final :
public
BinaryIntegerArithmeticOperator
{
17
public
:
18
ASHR
(std::shared_ptr<Value>
lhs
, std::shared_ptr<Value>
rhs
)
19
:
BinaryIntegerArithmeticOperator
(std::move(
lhs
), std::move(
rhs
)) {}
20
21
bool
isCommutative
()
const override
{
22
return
false
;
23
}
24
25
bool
isAssociative
()
const override
{
26
return
false
;
27
}
28
29
std::shared_ptr<Constant>
fold
()
const override
;
30
31
void
accept
(
InstructionVisitor
&visitor)
override
{
32
visitor.
visitASHR
(*
this
);
33
}
34
35
void
accept
(
InstructionVisitor
&visitor)
const override
{
36
visitor.
visitASHR
(*
this
);
37
}
38
39
std::string
format
()
const override
;
40
std::unique_ptr<Value>
clone
()
const override
;
41
};
42
43
}
// namespace mini_llvm::ir
BinaryIntegerArithmeticOperator.h
Compiler.h
MINI_LLVM_EXPORT
#define MINI_LLVM_EXPORT
Definition
Compiler.h:17
Value.h
mini_llvm::ir::ASHR::format
std::string format() const override
mini_llvm::ir::ASHR::ASHR
ASHR(std::shared_ptr< Value > lhs, std::shared_ptr< Value > rhs)
Definition
ASHR.h:18
mini_llvm::ir::ASHR::fold
std::shared_ptr< Constant > fold() const override
mini_llvm::ir::ASHR::isCommutative
bool isCommutative() const override
Definition
ASHR.h:21
mini_llvm::ir::ASHR::clone
std::unique_ptr< Value > clone() const override
mini_llvm::ir::ASHR::isAssociative
bool isAssociative() const override
Definition
ASHR.h:25
mini_llvm::ir::ASHR::accept
void accept(InstructionVisitor &visitor) const override
Definition
ASHR.h:35
mini_llvm::ir::ASHR::accept
void accept(InstructionVisitor &visitor) override
Definition
ASHR.h:31
mini_llvm::ir::BinaryIntegerArithmeticOperator::BinaryIntegerArithmeticOperator
BinaryIntegerArithmeticOperator(std::shared_ptr< Value > lhs, std::shared_ptr< Value > rhs)
Definition
BinaryIntegerArithmeticOperator.h:30
mini_llvm::ir::BinaryIntegerOperator::lhs
auto & lhs(this Self &&self)
Definition
BinaryIntegerOperator.h:19
mini_llvm::ir::BinaryIntegerOperator::rhs
auto & rhs(this Self &&self)
Definition
BinaryIntegerOperator.h:24
mini_llvm::ir::InstructionVisitor
Definition
InstructionVisitor.h:58
mini_llvm::ir::InstructionVisitor::visitASHR
virtual void visitASHR(ASHR &I)
Definition
InstructionVisitor.h:73
InstructionVisitor.h
mini_llvm::ir
Definition
Argument.h:13
include
mini-llvm
ir
Instruction
ASHR.h
Generated by
1.17.0