diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-02 05:43:49 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-02 05:43:49 +0000 |
commit | 09e66675318dd69a1c823ef66377bb61f0f214b0 (patch) | |
tree | 53718dbf3c632b08287d39f5f664c79fe18e76d8 /llvm/lib/CodeGen/RegisterClassInfo.cpp | |
parent | aff10602072d77d974280f98fb6020c5ed70d4b0 (diff) | |
download | bcm5719-llvm-09e66675318dd69a1c823ef66377bb61f0f214b0.tar.gz bcm5719-llvm-09e66675318dd69a1c823ef66377bb61f0f214b0.zip |
Initialize members to fix problem found by valgrind.
llvm-svn: 132456
Diffstat (limited to 'llvm/lib/CodeGen/RegisterClassInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterClassInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegisterClassInfo.cpp b/llvm/lib/CodeGen/RegisterClassInfo.cpp index fb27213401c..9deeb15a3b5 100644 --- a/llvm/lib/CodeGen/RegisterClassInfo.cpp +++ b/llvm/lib/CodeGen/RegisterClassInfo.cpp @@ -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()]); |