1//===- BlockVerifier.cpp - FDR Block Verifier -----------------------------===// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7//===----------------------------------------------------------------------===// 18return 1uLL <<
static_cast<std::size_t
>(S);
22returnstatic_cast<std::size_t
>(S);
63Error BlockVerifier::transition(State To) {
114 std::make_error_code(std::errc::executable_format_error),
115"BUG (BlockVerifier): Cannot find transition table entry for %s, " 116"transitioning to %s.",
117 recordToString(CurrentRecord).
data(), recordToString(To).
data());
119// If we're at an EndOfBuffer record, we ignore anything that follows that 120// isn't a NewBuffer record. 124auto &Mapping = TransitionTable[number(CurrentRecord)];
125auto &Destinations = Mapping.ToStates;
126assert(Mapping.From == CurrentRecord &&
127"BUG: Wrong index for record mapping.");
128if ((Destinations & ToSet(
mask(To))) == 0)
130 std::make_error_code(std::errc::executable_format_error),
131"BlockVerifier: Invalid transition from %s to %s.",
132 recordToString(CurrentRecord).
data(), recordToString(To).
data());
185// The known terminal conditions are the following: 186switch (CurrentRecord) {
197 std::make_error_code(std::errc::executable_format_error),
198"BlockVerifier: Invalid terminal condition %s, malformed block.",
199 recordToString(CurrentRecord).
data());
std::bitset< number(BlockVerifier::State::StateMax)> ToStates
BlockVerifier::State From
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Error visit(BufferExtents &) override
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
auto mask(ShuffFunc S, unsigned Length, OptArgs... args) -> MaskT