17#ifndef LLVM_CODEGEN_BYTEPROVIDER_H
18#define LLVM_CODEGEN_BYTEPROVIDER_H
42 template <
typename T>
class is_op {
44 using yes = std::true_type;
45 using no = std::false_type;
49 static auto test(
int) ->
decltype(std::declval<U>().getOpcode(), yes());
51 template <
typename>
static no
test(...);
54 using remove_pointer_t =
typename std::remove_pointer<T>::type;
55 static constexpr bool value =
56 std::is_same<decltype(test<remove_pointer_t>(0)), yes>::value;
62 std::optional<ISelOp>
Src = std::nullopt;
75 int64_t VectorOffset) {
76 static_assert(is_op<ISelOp>().value,
77 "ByteProviders must contain an operation in selection DAG.");
84 static_assert(is_op<ISelOp>().value,
85 "ByteProviders must contain an operation in selection DAG.");
Given that RA is a live value
Represents known origin of an individual byte in combine pattern.
static ByteProvider getConstantZero()
bool operator==(const ByteProvider &Other) const
static ByteProvider getSrc(std::optional< ISelOp > Val, int64_t ByteOffset, int64_t VectorOffset)
bool hasSameSrc(const ByteProvider &Other) const
static ByteProvider getSrc(std::optional< ISelOp > Val, int64_t ByteOffset, int64_t VectorOffset, std::optional< bool > IsSigned)
std::optional< bool > IsSigned
std::optional< ISelOp > Src
bool isConstantZero() const
This is an optimization pass for GlobalISel generic memory operations.