LLVM: include/llvm/SandboxIR/Use.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_SANDBOXIR_USE_H

14#define LLVM_SANDBOXIR_USE_H

15

19

21

28

29

30

31

32

33class Use {

37

38

40 : LLVMUse(LLVMUse), Usr(Usr), Ctx(&Ctx) {}

41 Use() : LLVMUse(nullptr), Ctx(nullptr) {}

42

43 friend class Value;

44 friend class User;

49 friend class PHINode;

50

51public:

52 operator Value *() const { return get(); }

60 assert(Ctx == Other.Ctx && "Contexts differ!");

61 return LLVMUse == Other.LLVMUse && Usr == Other.Usr;

62 }

64#ifndef NDEBUG

66 void dump() const;

67#endif

68};

69

70}

71

72#endif

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

#define LLVM_ABI_FOR_TEST

This defines the Use class.

A Use represents the edge between a Value definition and its users.

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

Represents a Def-use/Use-def edge in SandboxIR.

Definition Use.h:33

friend class OperandUseIterator

Definition Use.h:45

friend class UserUseIterator

Definition Use.h:46

LLVM_ABI void set(Value *V)

friend class User

Definition Use.h:44

LLVM_ABI unsigned getOperandNo() const

LLVM_ABI_FOR_TEST void dumpOS(raw_ostream &OS) const

LLVM_ABI void swap(Use &OtherUse)

bool operator==(const Use &Other) const

Definition Use.h:59

friend class CallBase

Definition Use.h:47

bool operator!=(const Use &Other) const

Definition Use.h:63

Context * getContext() const

Definition Use.h:58

friend class PHINode

Definition Use.h:49

class User * getUser() const

Definition Use.h:55

friend class CallBrInst

Definition Use.h:48

LLVM_ABI Value * get() const

friend class Value

Definition Use.h:43

A sandboxir::User has operands.

A SandboxIR Value has users. This is the base class.