[llvm-commits] [llvm] r108561 - /llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jul 16 15:00:33 PDT 2010
Author: stoklund
Date: Fri Jul 16 17:00:33 2010
New Revision: 108561
URL: http://llvm.org/viewvc/llvm-project?rev=108561&view=rev
Log:
Keep valgrind quiet.
The isLive() method can read uninitialized memory, but it still gives correct
results.
Modified:
llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=108561&r1=108560&r2=108561&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Fri Jul 16 17:00:33 2010
@@ -50,7 +50,12 @@
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();
More information about the llvm-commits
mailing list