17#ifndef LLVM_CODEGEN_BYTEPROVIDER_H
18#define LLVM_CODEGEN_BYTEPROVIDER_H
37 template <
typename T>
class is_op {
39 using yes = std::true_type;
40 using no = std::false_type;
44 static auto test(
int) ->
decltype(std::declval<U>().getOpcode(), yes());
46 template <
typename>
static no
test(...);
49 using remove_pointer_t =
typename std::remove_pointer<T>::type;
50 static constexpr bool value =
51 std::is_same<decltype(test<remove_pointer_t>(0)), yes>::value;
57 std::optional<ISelOp>
Src = std::nullopt;
67 int64_t VectorOffset) {
68 static_assert(is_op<ISelOp>().value,
69 "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
std::optional< ISelOp > Src
bool isConstantZero() const
This is an optimization pass for GlobalISel generic memory operations.