//===- CodeGenInstAlias.cpp - CodeGen InstAlias Class Wrapper -------------===// // // 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 file implements the CodeGenInstAlias class. // //===----------------------------------------------------------------------===// #include "CodeGenInstAlias.h" #include "CodeGenInstruction.h" #include "CodeGenRegisters.h" #include "CodeGenTarget.h" #include "llvm/ADT/StringMap.h" #include "llvm/TableGen/Error.h" #include "llvm/TableGen/Record.h" usingnamespacellvm; /// tryAliasOpMatch - This is a helper function for the CodeGenInstAlias /// constructor. It checks if an argument in an InstAlias pattern matches /// the corresponding operand of the instruction. It returns true on a /// successful match, with ResOp set to the result operand to be used. bool CodeGenInstAlias::tryAliasOpMatch(const DagInit *Result, unsigned AliasOpNo, const Record *InstOpRec, bool hasSubOps, ArrayRef<SMLoc> Loc, const CodeGenTarget &T, ResultOperand &ResOp) { … } unsigned CodeGenInstAlias::ResultOperand::getMINumOperands() const { … } CodeGenInstAlias::CodeGenInstAlias(const Record *R, const CodeGenTarget &T) : … { … }