llvm/llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp

//===- lib/CodeGen/GlobalISel/LegalizerPredicates.cpp - Predicates --------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// A library of predicate factories to use for LegalityPredicate.
//
//===----------------------------------------------------------------------===//

// Enable optimizations to work around MSVC debug mode bug in 32-bit:
// https://developercommunity.visualstudio.com/content/problem/1179643/msvc-copies-overaligned-non-trivially-copyable-par.html
// FIXME: Remove this when the issue is closed.
#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_IX86)
// We have to disable runtime checks in order to enable optimizations. This is
// done for the entire file because the problem is actually observed in STL
// template functions.
#pragma runtime_checks("", off)
#pragma optimize("gs", on)
#endif

#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"

usingnamespacellvm;

LegalityPredicate LegalityPredicates::typeIs(unsigned TypeIdx, LLT Type) {}

LegalityPredicate
LegalityPredicates::typeInSet(unsigned TypeIdx,
                              std::initializer_list<LLT> TypesInit) {}

LegalityPredicate LegalityPredicates::typePairInSet(
    unsigned TypeIdx0, unsigned TypeIdx1,
    std::initializer_list<std::pair<LLT, LLT>> TypesInit) {}

LegalityPredicate LegalityPredicates::typePairAndMemDescInSet(
    unsigned TypeIdx0, unsigned TypeIdx1, unsigned MMOIdx,
    std::initializer_list<TypePairAndMemDesc> TypesAndMemDescInit) {}

LegalityPredicate LegalityPredicates::isScalar(unsigned TypeIdx) {}

LegalityPredicate LegalityPredicates::isVector(unsigned TypeIdx) {}

LegalityPredicate LegalityPredicates::isPointer(unsigned TypeIdx) {}

LegalityPredicate LegalityPredicates::isPointer(unsigned TypeIdx,
                                                unsigned AddrSpace) {}

LegalityPredicate LegalityPredicates::elementTypeIs(unsigned TypeIdx,
                                                    LLT EltTy) {}

LegalityPredicate LegalityPredicates::scalarNarrowerThan(unsigned TypeIdx,
                                                         unsigned Size) {}

LegalityPredicate LegalityPredicates::scalarWiderThan(unsigned TypeIdx,
                                                      unsigned Size) {}

LegalityPredicate LegalityPredicates::smallerThan(unsigned TypeIdx0,
                                                  unsigned TypeIdx1) {}

LegalityPredicate LegalityPredicates::largerThan(unsigned TypeIdx0,
                                                  unsigned TypeIdx1) {}

LegalityPredicate LegalityPredicates::scalarOrEltNarrowerThan(unsigned TypeIdx,
                                                              unsigned Size) {}

LegalityPredicate LegalityPredicates::scalarOrEltWiderThan(unsigned TypeIdx,
                                                           unsigned Size) {}

LegalityPredicate LegalityPredicates::scalarOrEltSizeNotPow2(unsigned TypeIdx) {}

LegalityPredicate LegalityPredicates::sizeNotMultipleOf(unsigned TypeIdx,
                                                        unsigned Size) {}

LegalityPredicate LegalityPredicates::sizeNotPow2(unsigned TypeIdx) {}

LegalityPredicate LegalityPredicates::sizeIs(unsigned TypeIdx, unsigned Size) {}

LegalityPredicate LegalityPredicates::sameSize(unsigned TypeIdx0,
                                               unsigned TypeIdx1) {}

LegalityPredicate LegalityPredicates::memSizeInBytesNotPow2(unsigned MMOIdx) {}

LegalityPredicate LegalityPredicates::memSizeNotByteSizePow2(unsigned MMOIdx) {}

LegalityPredicate LegalityPredicates::numElementsNotPow2(unsigned TypeIdx) {}

LegalityPredicate LegalityPredicates::atomicOrderingAtLeastOrStrongerThan(
    unsigned MMOIdx, AtomicOrdering Ordering) {}