LLVM: include/llvm/Frontend/Atomic/Atomic.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_FRONTEND_ATOMIC_ATOMIC_H

10#define LLVM_FRONTEND_ATOMIC_ATOMIC_H

11

15

16namespace llvm {

18protected:

27

28public:

35

37

43

47

48

49

50

51

52

53

54

56

58

60

62 bool CmpXchg = false);

63

66

69

70

71 constexpr uint16_t SizeTBits = 64;

72 constexpr uint16_t BitsPerByte = 8;

75 }

76

77 LLVM_ABI std::pair<Value *, Value *>

81

85

89

90 LLVM_ABI std::pair<Value *, Value *>

93 bool IsVolatile = false, bool IsWeak = false);

94

95 LLVM_ABI std::pair<Value *, Value *>

98 bool IsVolatile, bool IsWeak);

99

100 LLVM_ABI std::pair<LoadInst *, AllocaInst *>

102

104};

105}

106

107#endif

Module.h This file contains the declarations for the Module class.

an instruction to allocate memory on the stack

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Align AtomicAlign

Definition Atomic.h:23

uint64_t getValueSizeInBits() const

Definition Atomic.h:40

bool UseLibcall

Definition Atomic.h:25

virtual ~AtomicInfo()=default

IRBuilderBase * Builder

Definition Atomic.h:19

AtomicInfo(IRBuilderBase *Builder, Type *Ty, uint64_t AtomicSizeInBits, uint64_t ValueSizeInBits, Align AtomicAlign, Align ValueAlign, bool UseLibcall, IRBuilderBase::InsertPoint AllocaIP)

Definition Atomic.h:29

LLVM_ABI std::pair< Value *, Value * > EmitAtomicCompareExchange(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure, bool IsVolatile, bool IsWeak)

virtual AllocaInst * CreateAlloca(Type *Ty, const Twine &Name) const =0

LLVM_ABI std::pair< LoadInst *, AllocaInst * > EmitAtomicLoadLibcall(AtomicOrdering AO)

LLVM_ABI std::pair< Value *, Value * > EmitAtomicCompareExchangeOp(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure, bool IsVolatile=false, bool IsWeak=false)

Type * getAtomicTy() const

Definition Atomic.h:42

uint64_t getAtomicSizeInBits() const

Definition Atomic.h:39

LLVM_ABI Value * EmitAtomicLoadOp(AtomicOrdering AO, bool IsVolatile, bool CmpXchg=false)

virtual Value * getAtomicPointer() const =0

Value * castToAtomicIntPointer(Value *addr) const

Definition Atomic.h:82

LLVM_ABI std::pair< Value *, Value * > EmitAtomicCompareExchangeLibcall(Value *ExpectedVal, Value *DesiredVal, AtomicOrdering Success, AtomicOrdering Failure)

LLVM_ABI bool shouldCastToInt(Type *ValTy, bool CmpXchg)

bool hasPadding() const

Definition Atomic.h:55

uint64_t AtomicSizeInBits

Definition Atomic.h:21

uint64_t ValueSizeInBits

Definition Atomic.h:22

LLVM_ABI void EmitAtomicStoreLibcall(AtomicOrdering AO, Value *Source)

IRBuilderBase::InsertPoint AllocaIP

Definition Atomic.h:26

LLVMContext & getLLVMContext() const

Definition Atomic.h:57

Value * getAtomicAddressAsAtomicIntPointer() const

Definition Atomic.h:86

Align ValueAlign

Definition Atomic.h:24

virtual void decorateWithTBAA(Instruction *I)=0

LLVM_ABI CallInst * EmitAtomicLibcall(StringRef fnName, Type *ResultType, ArrayRef< Value * > Args)

Value * getAtomicSizeValue() const

Definition Atomic.h:67

bool shouldUseLibcall() const

Definition Atomic.h:41

Type * Ty

Definition Atomic.h:20

Align getAtomicAlignment() const

Definition Atomic.h:38

This class represents a function call, abstracting a target machine's calling convention.

InsertPoint - A saved insertion point.

Common base class shared among various IRBuilders.

static LLVM_ABI IntegerType * get(LLVMContext &C, unsigned NumBits)

This static method is the primary way of constructing an IntegerType.

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

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

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

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

LLVM Value Representation.

This is an optimization pass for GlobalISel generic memory operations.

@ Success

The lock was released successfully.

AtomicOrdering

Atomic ordering for LLVM's memory model.

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