op

package
v0.0.0-...-ecbd380 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpStrings

func OpStrings() []string

OpStrings returns a slice of all String values of the enum

Types

type Op

type Op uint8
const (
	Invalid Op = iota

	// Control flow
	Ret
	If
	Jump
	Switch
	IndirectBr
	Invoke
	Unreachable

	// Compares
	FCmp
	Equal
	NotEqual
	Less
	LessEqual
	Greater
	GreaterEqual
	ULess
	ULessEqual
	UGreater
	UGreaterEqual

	// Standard Binary Operators
	Add
	FAdd
	Sub
	FSub
	Mul
	FMul
	UDiv
	SDiv
	FDiv
	URem
	SRem
	FRem

	// Logical Operators
	Shl
	LShr
	AShr
	And
	Or
	Xor

	// Memory Operators
	Alloca
	Load
	Store
	GetElementPtr

	// Cast Operators
	Trunc
	ZExt
	SExt
	FPToUI
	FPToSI
	UIToFP
	SIToFP
	FPTrunc
	FPExt
	PtrToInt
	IntToPtr
	BitCast

	// Other Operators
	Call
	Select
	Copy

	// UserOp1
	// UserOp2
	VAArg
	ExtractElement
	InsertElement
	ShuffleVector
	ExtractValue
	InsertValue

	NumOps
)

func OpString

func OpString(s string) (Op, error)

OpString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OpValues

func OpValues() []Op

OpValues returns all values of the enum

func (Op) ClobbersArg

func (op Op) ClobbersArg() bool

func (Op) IsAOp

func (i Op) IsAOp() bool

IsAOp returns "true" if the value is listed in the enum definition. "false" otherwise

func (Op) IsBranch

func (op Op) IsBranch() bool

func (Op) IsCall

func (op Op) IsCall() bool

func (Op) IsCommutative

func (op Op) IsCommutative() bool

func (Op) IsCompare

func (op Op) IsCompare() bool

func (Op) IsConst

func (op Op) IsConst() bool

func (Op) IsCopy

func (op Op) IsCopy() bool

func (Op) IsReturn

func (op Op) IsReturn() bool

func (Op) IsSink

func (op Op) IsSink() bool

func (Op) Opposite

func (op Op) Opposite() Op

func (Op) String

func (i Op) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL