llvm/llvm/utils/TableGen/X86FoldTablesEmitter.cpp

//===- utils/TableGen/X86FoldTablesEmitter.cpp - X86 backend-*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This tablegen backend is responsible for emitting the memory fold tables of
// the X86 backend instructions.
//
//===----------------------------------------------------------------------===//

#include "Common/CodeGenInstruction.h"
#include "Common/CodeGenTarget.h"
#include "X86RecognizableInstr.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/X86FoldTablesUtils.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
#include <set>

usingnamespacellvm;
usingnamespaceX86Disassembler;

namespace {
// Represents an entry in the manual mapped instructions set.
struct ManualMapEntry {};

// List of instructions requiring explicitly aligned memory.
const char *ExplicitAlign[] =;

// List of instructions NOT requiring explicit memory alignment.
const char *ExplicitUnalign[] =;

const ManualMapEntry ManualMapSet[] =;

const std::set<StringRef> NoFoldSet =;

static bool isExplicitAlign(const CodeGenInstruction *Inst) {}

static bool isExplicitUnalign(const CodeGenInstruction *Inst) {}

class X86FoldTablesEmitter {};

// Return true if one of the instruction's operands is a RST register class
static bool hasRSTRegClass(const CodeGenInstruction *Inst) {}

// Return true if one of the instruction's operands is a ptr_rc_tailcall
static bool hasPtrTailcallRegClass(const CodeGenInstruction *Inst) {}

static uint8_t byteFromBitsInit(const BitsInit *B) {}

static bool mayFoldFromForm(uint8_t Form) {}

static bool mayFoldToForm(uint8_t Form) {}

static bool mayFoldFromLeftToRight(uint8_t LHS, uint8_t RHS) {}

static bool isNOREXRegClass(const Record *Op) {}

// Function object - Operator() returns true if the given Reg instruction
// matches the Mem instruction of this object.
class IsMatch {};

} // end anonymous namespace

void X86FoldTablesEmitter::addEntryWithFlags(FoldTable &Table,
                                             const CodeGenInstruction *RegInst,
                                             const CodeGenInstruction *MemInst,
                                             uint16_t S, unsigned FoldedIdx,
                                             bool IsManual) {}

void X86FoldTablesEmitter::addBroadcastEntry(
    FoldTable &Table, const CodeGenInstruction *RegInst,
    const CodeGenInstruction *MemInst) {}

void X86FoldTablesEmitter::updateTables(const CodeGenInstruction *RegInst,
                                        const CodeGenInstruction *MemInst,
                                        uint16_t S, bool IsManual,
                                        bool IsBroadcast) {}

void X86FoldTablesEmitter::run(raw_ostream &OS) {}

static TableGen::Emitter::OptClass<X86FoldTablesEmitter>
    X("gen-x86-fold-tables", "Generate X86 fold tables");