mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-29 06:53:53 +00:00
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:
parent
96890fb0cf
commit
e6a3eb8852
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user