LLVM: lib/Target/RISCV/RISCVConstantPoolValue.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

19

20using namespace llvm;

21

22RISCVConstantPoolValue::RISCVConstantPoolValue(Type *Ty, const GlobalValue *GV)

24

27 Kind(RISCVCPKind::ExtSymbol) {}

28

30 return new RISCVConstantPoolValue(GV->getType(), GV);

31}

32

35 return new RISCVConstantPoolValue(C, S);

36}

37

39 Align Alignment) {

40 const std::vector &Constants = CP->getConstants();

41 for (unsigned i = 0, e = Constants.size(); i != e; ++i) {

42 if (Constants[i].isMachineConstantPoolEntry() &&

43 Constants[i].getAlign() >= Alignment) {

44 auto *CPV =

45 static_cast<RISCVConstantPoolValue *>(Constants[i].Val.MachineCPVal);

47 return i;

48 }

49 }

50

51 return -1;

52}

53

56 ID.AddPointer(GV);

57 else {

59 ID.AddString(S);

60 }

61}

62

65 O << GV->getName();

66 else {

68 O << S;

69 }

70}

71

74 return GV == A->GV;

76 return S == A->S;

77

78 return false;

79}

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

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

This file defines a hash set that can be used to remove duplication of nodes in a graph.

FoldingSetNodeID - This class is used to gather all the unique data bits of a node.

This is an important class for using LLVM in a threaded context.

Abstract base class for all machine specific constantpool value subclasses.

The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...

static RISCVConstantPoolValue * Create(const GlobalValue *GV)

Definition RISCVConstantPoolValue.cpp:29

bool equals(const RISCVConstantPoolValue *A) const

Definition RISCVConstantPoolValue.cpp:72

void print(raw_ostream &O) const override

print - Implement operator<<

Definition RISCVConstantPoolValue.cpp:63

bool isGlobalValue() const

void addSelectionDAGCSEId(FoldingSetNodeID &ID) override

Definition RISCVConstantPoolValue.cpp:54

int getExistingMachineCPValue(MachineConstantPool *CP, Align Alignment) override

Definition RISCVConstantPoolValue.cpp:38

StringRef - Represent a constant reference to a string, i.e.

The instances of the Type class are immutable: once they are created, they are never changed.

This class implements an extremely fast bulk output stream that can only output to a stream.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

MaybeAlign getAlign(const CallInst &I, unsigned Index)

This struct is a compact representation of a valid (non-zero power of two) alignment.