Skip to content

Commit

Permalink
Use pristine register info in machine code verifier.
Browse files Browse the repository at this point in the history
So far these registers are simply tracked as if they were live-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78912 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
stoklund committed Aug 13, 2009
1 parent 4a0f08c commit a6b677d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/CodeGen/MachineVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit a6b677d

Please sign in to comment.