LLVM  6.0.0svn
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 "Target/X86/X86InstrFMA3Info.h"

Collaboration diagram for llvm::X86InstrFMA3Group:
Collaboration graph
[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 30 of file X86InstrFMA3Info.h.

Constructor & Destructor Documentation

◆ X86InstrFMA3Group()

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 72 of file X86InstrFMA3Info.h.

References assert().

Member Function Documentation

◆ getMem132Opcode()

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

Returns the 132 form of FMA memory opcode.

Definition at line 110 of file X86InstrFMA3Info.h.

References assert().

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

◆ getMem213Opcode()

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

Returns the 213 form of FMA memory opcode.

Definition at line 116 of file X86InstrFMA3Info.h.

References assert().

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

◆ getMem231Opcode()

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

Returns the 231 form of FMA memory opcode.

Definition at line 122 of file X86InstrFMA3Info.h.

References assert().

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

◆ getMemOpcode()

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 82 of file X86InstrFMA3Info.h.

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

◆ getReg132Opcode()

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

Returns the 132 form of FMA register opcode.

Definition at line 92 of file X86InstrFMA3Info.h.

References assert().

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

◆ getReg213Opcode()

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

Returns the 213 form of FMA register opcode.

Definition at line 98 of file X86InstrFMA3Info.h.

References assert().

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

◆ getReg231Opcode()

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

Returns the 231 form of FMA register opcode.

Definition at line 104 of file X86InstrFMA3Info.h.

References assert().

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

◆ isIntrinsic()

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

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

Definition at line 128 of file X86InstrFMA3Info.h.

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

◆ isKMasked()

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

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

Definition at line 139 of file X86InstrFMA3Info.h.

◆ isKMergeMasked()

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

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

Definition at line 131 of file X86InstrFMA3Info.h.

◆ isKZeroMasked()

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

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

Definition at line 136 of file X86InstrFMA3Info.h.

◆ isMemOpcodeFromGroup()

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 156 of file X86InstrFMA3Info.h.

◆ isRegOpcodeFromGroup()

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 145 of file X86InstrFMA3Info.h.

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

Member Data Documentation

◆ X86FMA3Intrinsic

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 53 of file X86InstrFMA3Info.h.

◆ X86FMA3KMergeMasked

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 59 of file X86InstrFMA3Info.h.

◆ X86FMA3KZeroMasked

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 63 of file X86InstrFMA3Info.h.


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