LLVM: include/llvm/MC/MachineLocation.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
14#ifndef LLVM_MC_MACHINELOCATION_H
15#define LLVM_MC_MACHINELOCATION_H
16
17#include
18#include
19
20namespace llvm {
21
23private:
24 bool IsRegister = false;
25 unsigned Register = 0;
26
27public:
29
30
32 };
33
35
37 : IsRegister(!Indirect), Register(R) {}
38
40 return IsRegister == Other.IsRegister && Register == Other.Register;
41 }
42
43
44
45 bool isIndirect() const { return !IsRegister; }
46 bool isReg() const { return IsRegister; }
47 unsigned getReg() const { return Register; }
50};
51
55
56}
57
58#endif
Definition MachineLocation.h:22
unsigned getReg() const
Definition MachineLocation.h:47
bool isIndirect() const
Definition MachineLocation.h:45
bool isReg() const
Definition MachineLocation.h:46
MachineLocation()=default
void setRegister(unsigned R)
Definition MachineLocation.h:49
@ VirtualFP
Definition MachineLocation.h:31
bool operator==(const MachineLocation &Other) const
Definition MachineLocation.h:39
MachineLocation(unsigned R, bool Indirect=false)
Create a direct register location.
Definition MachineLocation.h:36
void setIsRegister(bool Is)
Definition MachineLocation.h:48
This is an optimization pass for GlobalISel generic memory operations.
bool operator!=(uint64_t V1, const APInt &V2)