mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
Allow null interference cursors to be queried.
They always report 'no interference'. llvm-svn: 135843
This commit is contained in:
parent
40ed4c3e06
commit
4b2cc68d11
@ -18,10 +18,13 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
// Static member used for null interference cursors.
|
||||
InterferenceCache::BlockInterference InterferenceCache::Cursor::NoInterference;
|
||||
|
||||
void InterferenceCache::init(MachineFunction *mf,
|
||||
LiveIntervalUnion *liuarray,
|
||||
SlotIndexes *indexes,
|
||||
const TargetRegisterInfo *tri) {
|
||||
const TargetRegisterInfo *tri) {
|
||||
MF = mf;
|
||||
LIUArray = liuarray;
|
||||
TRI = tri;
|
||||
|
@ -138,6 +138,7 @@ public:
|
||||
class Cursor {
|
||||
Entry *CacheEntry;
|
||||
BlockInterference *Current;
|
||||
static BlockInterference NoInterference;
|
||||
|
||||
void setEntry(Entry *E) {
|
||||
Current = 0;
|
||||
@ -175,7 +176,7 @@ public:
|
||||
|
||||
/// moveTo - Move cursor to basic block 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.
|
||||
|
Loading…
Reference in New Issue
Block a user