MLIR 22.0.0git
Predicate.cpp File Reference
#include "mlir/TableGen/Predicate.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"

Go to the source code of this file.

Functions

static PredCombinerKind getPredCombinerKind (const Pred &pred)
static void performSubstitutions (std::string &str, ArrayRef< Subst > substitutions)
 Perform the given substitutions on 'str' in-place.
static PredNode * buildPredicateTree (const Pred &root, SpecificBumpPtrAllocator< PredNode > &allocator, ArrayRef< Subst > substitutions)
static PredNode * propagateGroundTruth (PredNode *node, const llvm::SmallPtrSetImpl< Pred * > &knownTruePreds, const llvm::SmallPtrSetImpl< Pred * > &knownFalsePreds)
static std::string combineBinary (ArrayRef< std::string > children, const std::string &combiner, std::string init)
static std::string combineNot (ArrayRef< std::string > children)
static std::string getCombinedCondition (const PredNode &root)

Function Documentation

◆ buildPredicateTree()

PredNode * buildPredicateTree ( const Pred & root,
SpecificBumpPtrAllocator< PredNode > & allocator,
ArrayRef< Subst > substitutions )
static

◆ combineBinary()

std::string combineBinary ( ArrayRef< std::string > children,
const std::string & combiner,
std::string init )
static

Definition at line 300 of file Predicate.cpp.

Referenced by getCombinedCondition().

◆ combineNot()

std::string combineNot ( ArrayRef< std::string > children)
static

Definition at line 320 of file Predicate.cpp.

Referenced by getCombinedCondition().

◆ getCombinedCondition()

std::string getCombinedCondition ( const PredNode & root)
static

◆ getPredCombinerKind()

PredCombinerKind getPredCombinerKind ( const Pred & pred)
static

Definition at line 119 of file Predicate.cpp.

References mlir::tblgen::Pred::isCombined().

Referenced by buildPredicateTree().

◆ performSubstitutions()

void performSubstitutions ( std::string & str,
ArrayRef< Subst > substitutions )
static

Perform the given substitutions on 'str' in-place.

Definition at line 139 of file Predicate.cpp.

Referenced by buildPredicateTree().

◆ propagateGroundTruth()

PredNode * propagateGroundTruth ( PredNode * node,
const llvm::SmallPtrSetImpl< Pred * > & knownTruePreds,
const llvm::SmallPtrSetImpl< Pred * > & knownFalsePreds )
static