LLVM: include/llvm/MC/LaneBitmask.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29#ifndef LLVM_MC_LANEBITMASK_H

30#define LLVM_MC_LANEBITMASK_H

31

37

38namespace llvm {

39

41

44 constexpr static const char *const FormatStr = "%016llX";

45

48

52 constexpr bool none() const { return Mask == 0; }

53 constexpr bool any() const { return Mask != 0; }

54 constexpr bool all() const { return ~Mask == 0; }

55

66 Mask |= M.Mask;

67 return *this;

68 }

70 Mask &= M.Mask;

71 return *this;

72 }

73

75

80

86

87 private:

88 Type Mask = 0;

89 };

90

91

97

98}

99

100#endif

Simple wrapper around std::function<void(raw_ostream&)>.

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.

This is an optimization pass for GlobalISel generic memory operations.

Printable PrintLaneMask(LaneBitmask LaneMask)

Create Printable object to print LaneBitmasks on a raw_ostream.

Definition LaneBitmask.h:92

constexpr int popcount(T Value) noexcept

Count the number of set bits in a value.

unsigned Log2_64(uint64_t Value)

Return the floor log base 2 of the specified value, -1 if the value is zero.

format_object< Ts... > format(const char *Fmt, const Ts &... Vals)

These are helper functions used to produce formatted output.

Definition LaneBitmask.h:40

LaneBitmask & operator&=(LaneBitmask M)

Definition LaneBitmask.h:69

constexpr bool operator!=(LaneBitmask M) const

Definition LaneBitmask.h:50

constexpr LaneBitmask(Type V)

Definition LaneBitmask.h:47

constexpr LaneBitmask operator|(LaneBitmask M) const

Definition LaneBitmask.h:59

constexpr LaneBitmask()=default

@ BitWidth

Definition LaneBitmask.h:43

static constexpr LaneBitmask getLane(unsigned Lane)

Definition LaneBitmask.h:83

LaneBitmask & operator|=(LaneBitmask M)

Definition LaneBitmask.h:65

static constexpr LaneBitmask getAll()

Definition LaneBitmask.h:82

constexpr bool operator<(LaneBitmask M) const

Definition LaneBitmask.h:51

constexpr bool none() const

Definition LaneBitmask.h:52

constexpr bool any() const

Definition LaneBitmask.h:53

constexpr bool all() const

Definition LaneBitmask.h:54

static constexpr LaneBitmask getNone()

Definition LaneBitmask.h:81

constexpr LaneBitmask operator~() const

Definition LaneBitmask.h:56

unsigned getNumLanes() const

Definition LaneBitmask.h:76

constexpr LaneBitmask operator&(LaneBitmask M) const

Definition LaneBitmask.h:62

uint64_t Type

Definition LaneBitmask.h:42

static constexpr const char *const FormatStr

Definition LaneBitmask.h:44

constexpr bool operator==(LaneBitmask M) const

Definition LaneBitmask.h:49

constexpr Type getAsInteger() const

Definition LaneBitmask.h:74

unsigned getHighestLane() const

Definition LaneBitmask.h:77