mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Allow null interference cursors to be queried.
They always report 'no interference'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59a4f9af0a
commit
c7931fd725
@ -18,10 +18,13 @@
|
|||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
// Static member used for null interference cursors.
|
||||||
|
InterferenceCache::BlockInterference InterferenceCache::Cursor::NoInterference;
|
||||||
|
|
||||||
void InterferenceCache::init(MachineFunction *mf,
|
void InterferenceCache::init(MachineFunction *mf,
|
||||||
LiveIntervalUnion *liuarray,
|
LiveIntervalUnion *liuarray,
|
||||||
SlotIndexes *indexes,
|
SlotIndexes *indexes,
|
||||||
const TargetRegisterInfo *tri) {
|
const TargetRegisterInfo *tri) {
|
||||||
MF = mf;
|
MF = mf;
|
||||||
LIUArray = liuarray;
|
LIUArray = liuarray;
|
||||||
TRI = tri;
|
TRI = tri;
|
||||||
|
@ -138,6 +138,7 @@ public:
|
|||||||
class Cursor {
|
class Cursor {
|
||||||
Entry *CacheEntry;
|
Entry *CacheEntry;
|
||||||
BlockInterference *Current;
|
BlockInterference *Current;
|
||||||
|
static BlockInterference NoInterference;
|
||||||
|
|
||||||
void setEntry(Entry *E) {
|
void setEntry(Entry *E) {
|
||||||
Current = 0;
|
Current = 0;
|
||||||
@ -175,7 +176,7 @@ public:
|
|||||||
|
|
||||||
/// moveTo - Move cursor to basic block MBBNum.
|
/// moveTo - Move cursor to basic block MBBNum.
|
||||||
void moveToBlock(unsigned MBBNum) {
|
void moveToBlock(unsigned MBBNum) {
|
||||||
Current = CacheEntry->get(MBBNum);
|
Current = CacheEntry ? CacheEntry->get(MBBNum) : &NoInterference;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// hasInterference - Return true if the current block has any interference.
|
/// hasInterference - Return true if the current block has any interference.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user