Use pristine register info in machine code verifier.

So far these registers are simply tracked as if they were live-in.

llvm-svn: 78912
This commit is contained in:
Jakob Stoklund Olesen 2009-08-13 16:19:51 +00:00
parent 3de4a60e1e
commit 0e73fdff6c
1 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include "llvm/Function.h"
#include "llvm/CodeGen/LiveVariables.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Target/TargetMachine.h"
@ -316,6 +317,16 @@ MachineVerifier::visitMachineBasicBlockBefore(const MachineBasicBlock *MBB)
regsLive.insert(*R);
}
regsLiveInButUnused = regsLive;
const MachineFrameInfo *MFI = MF->getFrameInfo();
assert(MFI && "Function has no frame info");
BitVector PR = MFI->getPristineRegs(MBB);
for (int I = PR.find_first(); I>0; I = PR.find_next(I)) {
regsLive.insert(I);
for (const unsigned *R = TRI->getSubRegisters(I); *R; R++)
regsLive.insert(*R);
}
regsKilled.clear();
regsDefined.clear();
}