[LLVMbugs] [Bug 5135] New: int/double conversion problems in profile info
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Oct 5 15:41:07 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=5135
Summary: int/double conversion problems in profile info
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: NetBSD
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: eocallaghan at auroraux.org
CC: llvmbugs at cs.uiuc.edu
Good day,
When building on NetBSD/SPARC64 I noticed two worrying warnings:
[ 23%] Building CXX object
lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ProfileInfoLoaderPass.cpp.o
/home/edward/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp: In member function
'virtual void<unnamed>::LoaderPass::readEdgeOrRemember(std::pair<const
llvm::BasicBlock*, const llvm::BasicBlock*>, std::pair<const llvm::BasicBlock*,
const llvm::BasicBlock*>&, unsigned int&, unsigned int&)':
/home/edward/llvm/lib/Analysis/ProfileInfoLoaderPass.cpp:94: warning:
converting to 'unsigned int' from 'double'
[ 24%] Building CXX object
lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ProfileVerifierPass.cpp.o
/home/edward/llvm/lib/Analysis/ProfileVerifierPass.cpp: In member function
'void<unnamed>::ProfileVerifierPass::recurseBasicBlock(const
llvm::BasicBlock*)':
/home/edward/llvm/lib/Analysis/ProfileVerifierPass.cpp:232: warning: converting
to 'int' from 'double'
Looking at lib/Analysis/ProfileInfoLoaderPass.cpp at the function:
void LoaderPass::readEdgeOrRemember(Edge edge, Edge &tocalc,
unsigned &uncalc, unsigned &count) {
double w;
if ((w = getEdgeWeight(edge)) == MissingValue) {
tocalc = edge;
uncalc++;
} else {
count+=w; <----- w is a double, count is a unsigned int.
}
}
Could ddunbar or andreas please look at this code.
Thanks for your time,
Edward.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list