LLVM  8.0.1
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
LegalizerInfo.h File Reference
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/LowLevelTypeImpl.h"
#include <cassert>
#include <cstdint>
#include <tuple>
#include <unordered_map>
#include <utility>
Include dependency graph for LegalizerInfo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::InstrAspect
 Legalization is decided based on an instruction's opcode, which type slot we're considering, and what the existing type is. More...
 
struct  llvm::LegalityQuery
 The LegalityQuery object bundles together all the information that's needed to decide whether a given operation is legal or not. More...
 
struct  llvm::LegalityQuery::MemDesc
 
struct  llvm::LegalizeActionStep
 The result of a query. More...
 
struct  llvm::LegalityPredicates::TypePairAndMemSize
 
class  llvm::LegalizeRule
 A single rule in a legalizer info ruleset. More...
 
class  llvm::LegalizeRuleSet
 
class  llvm::LegalizerInfo
 

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::LegalizeActions
 
 llvm::LegalityPredicates
 
 llvm::LegalizeMutations
 

Typedefs

using llvm::LegalityPredicate = std::function< bool(const LegalityQuery &)>
 
using llvm::LegalizeMutation = std::function< std::pair< unsigned, LLT >(const LegalityQuery &)>
 

Enumerations

enum  llvm::LegalizeActions::LegalizeAction : std::uint8_t {
  llvm::LegalizeActions::Legal, llvm::LegalizeActions::NarrowScalar, llvm::LegalizeActions::WidenScalar, llvm::LegalizeActions::FewerElements,
  llvm::LegalizeActions::MoreElements, llvm::LegalizeActions::Lower, llvm::LegalizeActions::Libcall, llvm::LegalizeActions::Custom,
  llvm::LegalizeActions::Unsupported, llvm::LegalizeActions::NotFound, llvm::LegalizeActions::UseLegacyRules
}
 

Functions

template<typename Predicate >
Predicate llvm::LegalityPredicates::all (Predicate P0, Predicate P1)
 True iff P0 and P1 are true. More...
 
template<typename Predicate , typename... Args>
Predicate llvm::LegalityPredicates::all (Predicate P0, Predicate P1, Args... args)
 True iff all given predicates are true. More...
 
LegalityPredicate llvm::LegalityPredicates::typeIs (unsigned TypeIdx, LLT TypesInit)
 True iff the given type index is the specified types. More...
 
LegalityPredicate llvm::LegalityPredicates::typeInSet (unsigned TypeIdx, std::initializer_list< LLT > TypesInit)
 True iff the given type index is one of the specified types. More...
 
LegalityPredicate llvm::LegalityPredicates::typePairInSet (unsigned TypeIdx0, unsigned TypeIdx1, std::initializer_list< std::pair< LLT, LLT >> TypesInit)
 True iff the given types for the given pair of type indexes is one of the specified type pairs. More...
 
LegalityPredicate llvm::LegalityPredicates::typePairAndMemSizeInSet (unsigned TypeIdx0, unsigned TypeIdx1, unsigned MMOIdx, std::initializer_list< TypePairAndMemSize > TypesAndMemSizeInit)
 True iff the given types for the given pair of type indexes is one of the specified type pairs. More...
 
LegalityPredicate llvm::LegalityPredicates::isScalar (unsigned TypeIdx)
 True iff the specified type index is a scalar. More...
 
LegalityPredicate llvm::LegalityPredicates::narrowerThan (unsigned TypeIdx, unsigned Size)
 True iff the specified type index is a scalar that's narrower than the given size. More...
 
LegalityPredicate llvm::LegalityPredicates::widerThan (unsigned TypeIdx, unsigned Size)
 True iff the specified type index is a scalar that's wider than the given size. More...
 
LegalityPredicate llvm::LegalityPredicates::sizeNotPow2 (unsigned TypeIdx)
 True iff the specified type index is a scalar whose size is not a power of. More...
 
LegalityPredicate llvm::LegalityPredicates::memSizeInBytesNotPow2 (unsigned MMOIdx)
 True iff the specified MMO index has a size that is not a power of 2. More...
 
LegalityPredicate llvm::LegalityPredicates::numElementsNotPow2 (unsigned TypeIdx)
 True iff the specified type index is a vector whose element count is not a power of 2. More...
 
LegalityPredicate llvm::LegalityPredicates::atomicOrderingAtLeastOrStrongerThan (unsigned MMOIdx, AtomicOrdering Ordering)
 True iff the specified MMO index has at an atomic ordering of at Ordering or stronger. More...
 
LegalizeMutation llvm::LegalizeMutations::changeTo (unsigned TypeIdx, LLT Ty)
 Select this specific type for the given type index. More...
 
LegalizeMutation llvm::LegalizeMutations::changeTo (unsigned TypeIdx, unsigned FromTypeIdx)
 Keep the same type as the given type index. More...
 
LegalizeMutation llvm::LegalizeMutations::widenScalarToNextPow2 (unsigned TypeIdx, unsigned Min=0)
 Widen the type for the given type index to the next power of 2. More...
 
LegalizeMutation llvm::LegalizeMutations::moreElementsToNextPow2 (unsigned TypeIdx, unsigned Min=0)
 Add more elements to the type for the given type index to the next power of. More...
 
const MachineInstrllvm::machineFunctionIsIllegal (const MachineFunction &MF)
 Checks that MIR is fully legal, returns an illegal instruction if it's not, nullptr otherwise. More...
 

Variables

cl::opt< boolllvm::DisableGISelLegalityCheck