//===-- SystemZInstrInfo.h - SystemZ instruction information ----*- 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 file contains the SystemZ implementation of the TargetInstrInfo class. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZINSTRINFO_H #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZINSTRINFO_H #include "SystemZ.h" #include "SystemZRegisterInfo.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include <cstdint> #define GET_INSTRINFO_HEADER #include "SystemZGenInstrInfo.inc" namespace llvm { class SystemZSubtarget; namespace SystemZII { enum { … }; static inline unsigned getAccessSize(unsigned int Flags) { … } static inline unsigned getCCValues(unsigned int Flags) { … } static inline unsigned getCompareZeroCCMask(unsigned int Flags) { … } // SystemZ MachineOperand target flags. enum { … }; // z/OS XPLink specific: classifies the types of // accesses to the ADA (Associated Data Area). // These enums contains values that overlap with the above MO_ enums, // but that's fine since the above enums are used with ELF, // while these values are used with z/OS. enum { … }; // Classifies a branch. enum BranchType { … }; // Information about a branch instruction. class Branch { … }; // Kinds of fused compares in compare-and-* instructions. Together with type // of the converted compare, this identifies the compare-and-* // instruction. enum FusedCompareType { … }; } // end namespace SystemZII namespace SystemZ { int getTwoOperandOpcode(uint16_t Opcode); int getTargetMemOpcode(uint16_t Opcode); // Return a version of comparison CC mask CCMask in which the LT and GT // actions are swapped. unsigned reverseCCMask(unsigned CCMask); // Create a new basic block after MBB. MachineBasicBlock *emitBlockAfter(MachineBasicBlock *MBB); // Split MBB after MI and return the new block (the one that contains // instructions after MI). MachineBasicBlock *splitBlockAfter(MachineBasicBlock::iterator MI, MachineBasicBlock *MBB); // Split MBB before MI and return the new block (the one that contains MI). MachineBasicBlock *splitBlockBefore(MachineBasicBlock::iterator MI, MachineBasicBlock *MBB); } class SystemZInstrInfo : public SystemZGenInstrInfo { … }; } // end namespace llvm #endif // LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZINSTRINFO_H