mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Remove and simplify some of the bewildering collection of isFOORegister
methods which have strangely different semantics in different backends, and noone knew what any did. Getting rid of these ALSO allows the dependence of MachineInstr.h on MRegisterInfo.h to be removed, which makes me much happier, and probably alkis too. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
2b38c0d94b
commit
376ad9fa9f
1 file changed
+8
-14
@@ -16,9 +16,9 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHINEINSTR_H
|
#ifndef LLVM_CODEGEN_MACHINEINSTR_H
|
||||||
#define LLVM_CODEGEN_MACHINEINSTR_H
|
#define LLVM_CODEGEN_MACHINEINSTR_H
|
||||||
|
|
||||||
#include "llvm/Target/MRegisterInfo.h"
|
|
||||||
#include "Support/Annotation.h"
|
#include "Support/Annotation.h"
|
||||||
#include "Support/iterator"
|
#include "Support/iterator"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@@ -220,19 +220,13 @@ public:
|
|||||||
bool isPCRelative() const { return (flags & PCRELATIVE) != 0; }
|
bool isPCRelative() const { return (flags & PCRELATIVE) != 0; }
|
||||||
|
|
||||||
|
|
||||||
// This is to finally stop caring whether we have a virtual or machine
|
/// isRegister - Return true if this operand is a register operand.
|
||||||
// register -- an easier interface is to simply call both virtual and machine
|
///
|
||||||
// registers essentially the same, yet be able to distinguish when
|
/// Note: In the sparc backend, this only returns true for "machine
|
||||||
// necessary. Thus the instruction selector can just add registers without
|
/// registers", not for "virtual registers".
|
||||||
// abandon, and the register allocator won't be confused.
|
///
|
||||||
bool isVirtualRegister() const {
|
bool isRegister() const { return opType == MO_MachineRegister; }
|
||||||
return (opType == MO_VirtualRegister || opType == MO_MachineRegister)
|
|
||||||
&& regNum >= MRegisterInfo::FirstVirtualRegister;
|
|
||||||
}
|
|
||||||
bool isRegister() const {
|
|
||||||
return opType == MO_VirtualRegister || opType == MO_MachineRegister;
|
|
||||||
}
|
|
||||||
bool isMachineRegister() const { return !isVirtualRegister(); }
|
|
||||||
bool isMachineBasicBlock() const { return opType == MO_MachineBasicBlock; }
|
bool isMachineBasicBlock() const { return opType == MO_MachineBasicBlock; }
|
||||||
bool isPCRelativeDisp() const { return opType == MO_PCRelativeDisp; }
|
bool isPCRelativeDisp() const { return opType == MO_PCRelativeDisp; }
|
||||||
bool isImmediate() const {
|
bool isImmediate() const {
|
||||||
|
|||||||
Reference in new issue
Block a user