diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-16 22:00:33 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-16 22:00:33 +0000 |
commit | b47bb13331fe39aa7827f52397bbe366a158a128 (patch) | |
tree | e960a3cbcb4b776caf4ec1fa836a06c44885665e /lib/Target/X86/X86FloatingPoint.cpp | |
parent | 40f9be514ba450aa0c9fd94eb302a6ce30a307a7 (diff) |
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
Diffstat (limited to 'lib/Target/X86/X86FloatingPoint.cpp')
-rw-r--r-- | lib/Target/X86/X86FloatingPoint.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index 627510d87d..742dfbcaf5 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.cpp @@ -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(); |