LLVM
20.0.0git
lib
Target
X86
X86InstrFoldTables.h
Go to the documentation of this file.
1
//===-- X86InstrFoldTables.h - X86 Instruction Folding Tables ---*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains the interface to query the X86 memory folding tables.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_LIB_TARGET_X86_X86INSTRFOLDTABLES_H
14
#define LLVM_LIB_TARGET_X86_X86INSTRFOLDTABLES_H
15
16
#include <cstdint>
17
#include "
llvm/Support/X86FoldTablesUtils.h
"
18
19
namespace
llvm
{
20
21
// This struct is used for both the folding and unfold tables. They KeyOp
22
// is used to determine the sorting order.
23
struct
X86FoldTableEntry
{
24
unsigned
KeyOp
;
25
unsigned
DstOp
;
26
uint16_t
Flags
;
27
28
bool
operator<
(
const
X86FoldTableEntry
&
RHS
)
const
{
29
return
KeyOp
<
RHS
.KeyOp;
30
}
31
bool
operator==
(
const
X86FoldTableEntry
&
RHS
)
const
{
32
return
KeyOp
==
RHS
.KeyOp;
33
}
34
friend
bool
operator<
(
const
X86FoldTableEntry
&TE,
unsigned
Opcode) {
35
return
TE.KeyOp < Opcode;
36
}
37
};
38
39
// Look up the memory folding table entry for folding a load and a store into
40
// operand 0.
41
const
X86FoldTableEntry *
lookupTwoAddrFoldTable
(
unsigned
RegOp);
42
43
// Look up the memory folding table entry for folding a load or store with
44
// operand OpNum.
45
const
X86FoldTableEntry *
lookupFoldTable
(
unsigned
RegOp,
unsigned
OpNum);
46
47
// Look up the broadcast folding table entry for folding a broadcast with
48
// operand OpNum.
49
const
X86FoldTableEntry *
lookupBroadcastFoldTable
(
unsigned
RegOp,
50
unsigned
OpNum);
51
52
// Look up the memory unfolding table entry for this instruction.
53
const
X86FoldTableEntry *
lookupUnfoldTable
(
unsigned
MemOp);
54
55
// Look up the broadcast folding table entry for this instruction from
56
// the regular memory instruction.
57
const
X86FoldTableEntry *
lookupBroadcastFoldTableBySize
(
unsigned
MemOp,
58
unsigned
BroadcastBits);
59
60
bool
matchBroadcastSize
(
const
X86FoldTableEntry &Entry,
unsigned
BroadcastBits);
61
}
// namespace llvm
62
63
#endif
X86FoldTablesUtils.h
RHS
Value * RHS
Definition:
X86PartialReduction.cpp:76
uint16_t
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::lookupBroadcastFoldTableBySize
const X86FoldTableEntry * lookupBroadcastFoldTableBySize(unsigned MemOp, unsigned BroadcastBits)
Definition:
X86InstrFoldTables.cpp:325
llvm::lookupBroadcastFoldTable
const X86FoldTableEntry * lookupBroadcastFoldTable(unsigned RegOp, unsigned OpNum)
Definition:
X86InstrFoldTables.cpp:146
llvm::lookupTwoAddrFoldTable
const X86FoldTableEntry * lookupTwoAddrFoldTable(unsigned RegOp)
Definition:
X86InstrFoldTables.cpp:124
llvm::lookupUnfoldTable
const X86FoldTableEntry * lookupUnfoldTable(unsigned MemOp)
Definition:
X86InstrFoldTables.cpp:230
llvm::matchBroadcastSize
bool matchBroadcastSize(const X86FoldTableEntry &Entry, unsigned BroadcastBits)
Definition:
X86InstrFoldTables.cpp:308
llvm::lookupFoldTable
const X86FoldTableEntry * lookupFoldTable(unsigned RegOp, unsigned OpNum)
Definition:
X86InstrFoldTables.cpp:128
llvm::X86FoldTableEntry
Definition:
X86InstrFoldTables.h:23
llvm::X86FoldTableEntry::operator==
bool operator==(const X86FoldTableEntry &RHS) const
Definition:
X86InstrFoldTables.h:31
llvm::X86FoldTableEntry::KeyOp
unsigned KeyOp
Definition:
X86InstrFoldTables.h:24
llvm::X86FoldTableEntry::operator<
friend bool operator<(const X86FoldTableEntry &TE, unsigned Opcode)
Definition:
X86InstrFoldTables.h:34
llvm::X86FoldTableEntry::operator<
bool operator<(const X86FoldTableEntry &RHS) const
Definition:
X86InstrFoldTables.h:28
llvm::X86FoldTableEntry::DstOp
unsigned DstOp
Definition:
X86InstrFoldTables.h:25
llvm::X86FoldTableEntry::Flags
uint16_t Flags
Definition:
X86InstrFoldTables.h:26
Generated on Fri Nov 22 2024 20:39:16 for LLVM by
1.9.6