mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-02 00:35:27 +00:00
[X86] Use smaller types to shrink the intrinsic lowering tables by about 12K.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32e67c3f6b
commit
915ac2bcce
@ -19,7 +19,7 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
enum IntrinsicType {
|
||||
enum IntrinsicType : uint16_t {
|
||||
INTR_NO_TYPE,
|
||||
GATHER, SCATTER, PREFETCH, RDSEED, RDRAND, RDPMC, RDTSC, XTEST, ADX, FPCLASS, FPCLASSS,
|
||||
INTR_TYPE_1OP, INTR_TYPE_2OP, INTR_TYPE_2OP_IMM8, INTR_TYPE_3OP, INTR_TYPE_4OP,
|
||||
@ -40,10 +40,10 @@ enum IntrinsicType {
|
||||
|
||||
struct IntrinsicData {
|
||||
|
||||
unsigned Id;
|
||||
uint16_t Id;
|
||||
IntrinsicType Type;
|
||||
unsigned Opc0;
|
||||
unsigned Opc1;
|
||||
uint16_t Opc0;
|
||||
uint16_t Opc1;
|
||||
|
||||
bool operator<(const IntrinsicData &RHS) const {
|
||||
return Id < RHS.Id;
|
||||
@ -237,7 +237,7 @@ static const IntrinsicData IntrinsicsWithChain[] = {
|
||||
/*
|
||||
* Find Intrinsic data by intrinsic ID
|
||||
*/
|
||||
static const IntrinsicData* getIntrinsicWithChain(unsigned IntNo) {
|
||||
static const IntrinsicData* getIntrinsicWithChain(uint16_t IntNo) {
|
||||
|
||||
IntrinsicData IntrinsicToFind = {IntNo, INTR_NO_TYPE, 0, 0 };
|
||||
const IntrinsicData *Data = std::lower_bound(std::begin(IntrinsicsWithChain),
|
||||
@ -2267,7 +2267,7 @@ static const IntrinsicData IntrinsicsWithoutChain[] = {
|
||||
* Retrieve data for Intrinsic without chain.
|
||||
* Return nullptr if intrinsic is not defined in the table.
|
||||
*/
|
||||
static const IntrinsicData* getIntrinsicWithoutChain(unsigned IntNo) {
|
||||
static const IntrinsicData* getIntrinsicWithoutChain(uint16_t IntNo) {
|
||||
IntrinsicData IntrinsicToFind = { IntNo, INTR_NO_TYPE, 0, 0 };
|
||||
const IntrinsicData *Data = std::lower_bound(std::begin(IntrinsicsWithoutChain),
|
||||
std::end(IntrinsicsWithoutChain),
|
||||
|
Loading…
x
Reference in New Issue
Block a user