LLVM  4.0.0
Public Member Functions | Static Public Attributes | List of all members
llvm::X86InstrFMA3Group Class Reference

This class is used to group {132, 213, 231} forms of FMA opcodes together. More...

#include <X86InstrFMA3Info.h>

Collaboration diagram for llvm::X86InstrFMA3Group:
[legend]

Public Member Functions

 X86InstrFMA3Group (const uint16_t *RegOpcodes, const uint16_t *MemOpcodes, unsigned Attr)
 Constructor. More...
 
unsigned getMemOpcode (unsigned RegOpcode) const
 Returns a memory form opcode that is the equivalent of the given register form opcode RegOpcode. More...
 
unsigned getReg132Opcode () const
 Returns the 132 form of FMA register opcode. More...
 
unsigned getReg213Opcode () const
 Returns the 213 form of FMA register opcode. More...
 
unsigned getReg231Opcode () const
 Returns the 231 form of FMA register opcode. More...
 
unsigned getMem132Opcode () const
 Returns the 132 form of FMA memory opcode. More...
 
unsigned getMem213Opcode () const
 Returns the 213 form of FMA memory opcode. More...
 
unsigned getMem231Opcode () const
 Returns the 231 form of FMA memory opcode. More...
 
bool isIntrinsic () const
 Returns true iff the group of FMA opcodes holds intrinsic opcodes. More...
 
bool isKMergeMasked () const
 Returns true iff the group of FMA opcodes holds k-merge-masked opcodes. More...
 
bool isKZeroMasked () const
 Returns true iff the group of FMA opcodes holds k-zero-masked opcodes. More...
 
bool isKMasked () const
 Returns true iff the group of FMA opcodes holds any of k-masked opcodes. More...
 
bool isRegOpcodeFromGroup (unsigned Opcode) const
 Returns true iff the given Opcode is a register opcode from the groups of FMA opcodes. More...
 
bool isMemOpcodeFromGroup (unsigned Opcode) const
 Returns true iff the given Opcode is a memory opcode from the groups of FMA opcodes. More...
 

Static Public Attributes

static const unsigned X86FMA3Intrinsic = 0x1
 This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of FMA intrinsic opcodes. More...
 
static const unsigned X86FMA3KMergeMasked = 0x2
 This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of AVX512 opcodes accepting a k-mask and passing the elements from the 1st operand to the result of the operation when the correpondings bits in the k-mask are unset. More...
 
static const unsigned X86FMA3KZeroMasked = 0x4
 This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of AVX512 opcodes accepting a k-zeromask. More...
 

Detailed Description

This class is used to group {132, 213, 231} forms of FMA opcodes together.

Each of the groups has either 3 register opcodes, 3 memory opcodes, or 6 register and memory opcodes. Also, each group has an attrubutes field describing it.

Definition at line 28 of file X86InstrFMA3Info.h.

Constructor & Destructor Documentation

llvm::X86InstrFMA3Group::X86InstrFMA3Group ( const uint16_t *  RegOpcodes,
const uint16_t *  MemOpcodes,
unsigned  Attr 
)
inline

Constructor.

Creates a new group of FMA opcodes with three register form FMA opcodes RegOpcodes and three memory form FMA opcodes MemOpcodes. The parameters RegOpcodes and MemOpcodes may be set to nullptr, which means that the created group of FMA opcodes does not have the corresponding (register or memory) opcodes. The parameter Attr specifies the attributes describing the created group.

Definition at line 70 of file X86InstrFMA3Info.h.

References assert().

Member Function Documentation

unsigned llvm::X86InstrFMA3Group::getMem132Opcode ( ) const
inline

Returns the 132 form of FMA memory opcode.

Definition at line 108 of file X86InstrFMA3Info.h.

References assert().

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

unsigned llvm::X86InstrFMA3Group::getMem213Opcode ( ) const
inline

Returns the 213 form of FMA memory opcode.

Definition at line 114 of file X86InstrFMA3Info.h.

References assert().

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

unsigned llvm::X86InstrFMA3Group::getMem231Opcode ( ) const
inline

Returns the 231 form of FMA memory opcode.

Definition at line 120 of file X86InstrFMA3Info.h.

References assert().

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

unsigned llvm::X86InstrFMA3Group::getMemOpcode ( unsigned  RegOpcode) const
inline

Returns a memory form opcode that is the equivalent of the given register form opcode RegOpcode.

0 is returned if the group does not have either register of memory opcodes.

Definition at line 80 of file X86InstrFMA3Info.h.

Referenced by llvm::X86InstrFMA3Info::rm_iterator::getMemOpcode(), llvm::X86InstrFMA3Info::rm_iterator::operator++(), and llvm::X86InstrFMA3Info::rm_begin().

unsigned llvm::X86InstrFMA3Group::getReg132Opcode ( ) const
inline

Returns the 132 form of FMA register opcode.

Definition at line 90 of file X86InstrFMA3Info.h.

References assert().

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

unsigned llvm::X86InstrFMA3Group::getReg213Opcode ( ) const
inline

Returns the 213 form of FMA register opcode.

Definition at line 96 of file X86InstrFMA3Info.h.

References assert().

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

unsigned llvm::X86InstrFMA3Group::getReg231Opcode ( ) const
inline

Returns the 231 form of FMA register opcode.

Definition at line 102 of file X86InstrFMA3Info.h.

References assert().

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

bool llvm::X86InstrFMA3Group::isIntrinsic ( ) const
inline

Returns true iff the group of FMA opcodes holds intrinsic opcodes.

Definition at line 126 of file X86InstrFMA3Info.h.

References X86FMA3Intrinsic.

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

bool llvm::X86InstrFMA3Group::isKMasked ( ) const
inline

Returns true iff the group of FMA opcodes holds any of k-masked opcodes.

Definition at line 137 of file X86InstrFMA3Info.h.

References X86FMA3KMergeMasked, and X86FMA3KZeroMasked.

bool llvm::X86InstrFMA3Group::isKMergeMasked ( ) const
inline

Returns true iff the group of FMA opcodes holds k-merge-masked opcodes.

Definition at line 129 of file X86InstrFMA3Info.h.

References X86FMA3KMergeMasked.

bool llvm::X86InstrFMA3Group::isKZeroMasked ( ) const
inline

Returns true iff the group of FMA opcodes holds k-zero-masked opcodes.

Definition at line 134 of file X86InstrFMA3Info.h.

References X86FMA3KZeroMasked.

bool llvm::X86InstrFMA3Group::isMemOpcodeFromGroup ( unsigned  Opcode) const
inline

Returns true iff the given Opcode is a memory opcode from the groups of FMA opcodes.

Definition at line 154 of file X86InstrFMA3Info.h.

bool llvm::X86InstrFMA3Group::isRegOpcodeFromGroup ( unsigned  Opcode) const
inline

Returns true iff the given Opcode is a register opcode from the groups of FMA opcodes.

Definition at line 143 of file X86InstrFMA3Info.h.

Referenced by llvm::X86InstrInfo::getFMA3OpcodeToCommuteOperands().

Member Data Documentation

const unsigned llvm::X86InstrFMA3Group::X86FMA3Intrinsic = 0x1
static

This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of FMA intrinsic opcodes.

Definition at line 51 of file X86InstrFMA3Info.h.

Referenced by isIntrinsic().

const unsigned llvm::X86InstrFMA3Group::X86FMA3KMergeMasked = 0x2
static

This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of AVX512 opcodes accepting a k-mask and passing the elements from the 1st operand to the result of the operation when the correpondings bits in the k-mask are unset.

Definition at line 57 of file X86InstrFMA3Info.h.

Referenced by isKMasked(), and isKMergeMasked().

const unsigned llvm::X86InstrFMA3Group::X86FMA3KZeroMasked = 0x4
static

This bit must be set in the 'Attributes' field of FMA group if such group of FMA opcodes consists of AVX512 opcodes accepting a k-zeromask.

Definition at line 61 of file X86InstrFMA3Info.h.

Referenced by isKMasked(), and isKZeroMasked().


The documentation for this class was generated from the following file: