16#ifndef LLVM_ADT_GENERICCONVERGENCEVERIFIER_H
17#define LLVM_ADT_GENERICCONVERGENCEVERIFIER_H
25 using BlockT =
typename ContextT::BlockT;
31 using CycleT =
typename CycleInfoT::CycleT;
38 this->FailureCB = FailureCB;
39 Context = ContextT(&
F);
51 std::function<void(
const Twine &Message)> FailureCB;
58 ControlledConvergence,
59 UncontrolledConvergence,
61 } ConvergenceKind = NoConvergence;
65 enum ConvOpKind { CONV_ANCHOR, CONV_ENTRY, CONV_LOOP, CONV_NONE };
69 DenseMap<const InstructionT *, const InstructionT *> Tokens;
71 bool SeenFirstConvOp =
false;
73 static bool isInsideConvergentFunction(
const InstructionT &
I);
79 void reportFailure(
const Twine &Message, ArrayRef<Printable> Values);
Find all cycles in a control-flow graph, including irreducible loops.
typename ContextT::InstructionT InstructionT
typename ContextT::DominatorTreeT DominatorTreeT
void initialize(raw_ostream *OS, function_ref< void(const Twine &Message)> FailureCB, const FunctionT &F)
typename ContextT::BlockT BlockT
typename CycleInfoT::CycleT CycleT
typename ContextT::FunctionT FunctionT
typename ContextT::ValueRefT ValueRefT
GenericCycleInfo< ContextT > CycleInfoT
void visit(const BlockT &BB)
Cycle information for a function.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.