LLVM: lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_MATINT_H

10#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_MATINT_H

11

15#include

16

17namespace llvm {

19

21

28

30 unsigned Opc;

31 int32_t Imm;

32

33public:

34 Inst(unsigned Opc, int64_t I) : Opc(Opc), Imm(I) {

35 assert(I == Imm && "truncated");

36 }

37

38 unsigned getOpcode() const { return Opc; }

39 int64_t getImm() const { return Imm; }

40

42};

44

45

46

47

48

49

51

52

55

56

57

58

59

60

62 unsigned &ShiftAmt, unsigned &AddOpc);

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

80 bool CompressionCost = false, bool FreeZeroes = false);

81}

82}

83#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

This file defines the SmallVector class.

Class for arbitrary precision integers.

Wrapper class representing physical registers. Should be passed by value.

Generic base class for all target subtargets.

Inst(unsigned Opc, int64_t I)

Definition RISCVMatInt.h:34

int64_t getImm() const

Definition RISCVMatInt.h:39

unsigned getOpcode() const

Definition RISCVMatInt.h:38

OpndKind getOpndKind() const

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

InstSeq generateInstSeq(int64_t Val, const MCSubtargetInfo &STI)

int getIntMatCost(const APInt &Val, unsigned Size, const MCSubtargetInfo &STI, bool CompressionCost, bool FreeZeroes)

OpndKind

Definition RISCVMatInt.h:22

@ Imm

Definition RISCVMatInt.h:24

@ RegX0

Definition RISCVMatInt.h:26

@ RegReg

Definition RISCVMatInt.h:25

@ RegImm

Definition RISCVMatInt.h:23

InstSeq generateTwoRegInstSeq(int64_t Val, const MCSubtargetInfo &STI, unsigned &ShiftAmt, unsigned &AddOpc)

SmallVector< Inst, 8 > InstSeq

Definition RISCVMatInt.h:43

void generateMCInstSeq(int64_t Val, const MCSubtargetInfo &STI, MCRegister DestReg, SmallVectorImpl< MCInst > &Insts)

This is an optimization pass for GlobalISel generic memory operations.