15 #include "llvm/ADT/TypeSwitch.h"
26 bool GenericSpaceAttr::isValidLoad(
27 Type type, ptr::AtomicOrdering ordering, IntegerAttr alignment,
32 bool GenericSpaceAttr::isValidStore(
33 Type type, ptr::AtomicOrdering ordering, IntegerAttr alignment,
38 bool GenericSpaceAttr::isValidAtomicOp(
39 ptr::AtomicBinOp op,
Type type, ptr::AtomicOrdering ordering,
44 bool GenericSpaceAttr::isValidAtomicXchg(
45 Type type, ptr::AtomicOrdering successOrdering,
46 ptr::AtomicOrdering failureOrdering, IntegerAttr alignment,
51 bool GenericSpaceAttr::isValidAddrSpaceCast(
55 assert(
false &&
"unimplemented, see TODO in the source.");
59 bool GenericSpaceAttr::isValidPtrIntCast(
63 assert(
false &&
"unimplemented, see TODO in the source.");
72 uint32_t size, uint32_t abi, uint32_t preferred,
75 return emitError() <<
"size entry must be divisible by 8";
77 return emitError() <<
"abi entry must be divisible by 8";
79 return emitError() <<
"preferred entry must be divisible by 8";
80 if (index != kOptionalSpecValue && index %
kBitsInByte != 0)
81 return emitError() <<
"index entry must be divisible by 8";
83 return emitError() <<
"preferred alignment is expected to be at least "
84 "as large as ABI alignment";
constexpr static const unsigned kBitsInByte
This class represents a diagnostic that is inflight and set to be reported.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Include the generated interface declarations.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
LogicalResult verify(Operation *op, bool verifyRecursively=true)
Perform (potentially expensive) checks of invariants, used to detect compiler bugs,...