17#ifndef LLVM_CODEGEN_BYTEPROVIDER_H
18#define LLVM_CODEGEN_BYTEPROVIDER_H
32template <
typename ISelOp>
class ByteProvider {
41 using check_has_getOpcode =
42 decltype(std::declval<std::remove_pointer_t<U> &>().getOpcode());
45 static constexpr bool has_getOpcode =
51 std::optional<ISelOp>
Src = std::nullopt;
60 static ByteProvider
getSrc(std::optional<ISelOp> Val, int64_t ByteOffset,
61 int64_t VectorOffset) {
62 static_assert(has_getOpcode<ISelOp>,
63 "ByteProviders must contain an operation in selection DAG.");
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.
typename detail::detector< void, Op, Args... >::value_t is_detected
Detects if a given trait holds for some set of arguments 'Args'.