Initialize members to fix problem found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132456 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-06-02 05:43:49 +00:00
parent fa226bccaa
commit ab5ceacbc1

View File

@ -20,7 +20,8 @@
using namespace llvm;
RegisterClassInfo::RegisterClassInfo() : Tag(0), TRI(0) {}
RegisterClassInfo::RegisterClassInfo() : Tag(0), MF(0), TRI(0), CalleeSaved(0)
{}
void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
bool Update = false;
@ -35,7 +36,7 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
// Does this MF have different CSRs?
const unsigned *CSR = TRI->getCalleeSavedRegs(MF);
if (CSR != CalleeSaved) {
if (Update || CSR != CalleeSaved) {
// Build a CSRNum map. Every CSR alias gets an entry pointing to the last
// overlapping CSR.
CSRNum.reset(new uint8_t[TRI->getNumRegs()]);