Keep valgrind quiet.

The isLive() method can read uninitialized memory, but it still gives correct
results.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2010-07-16 22:00:33 +00:00
parent 40f9be514b
commit b47bb13331

View File

@ -50,7 +50,12 @@ STATISTIC(NumFP , "Number of floating point instructions");
namespace {
struct FPS : public MachineFunctionPass {
static char ID;
FPS() : MachineFunctionPass(&ID) {}
FPS() : MachineFunctionPass(&ID) {
// This is really only to keep valgrind quiet.
// The logic in isLive() is too much for it.
memset(Stack, 0, sizeof(Stack));
memset(RegMap, 0, sizeof(RegMap));
}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();