mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 06:27:16 +00:00
Remove undefined behavior when loading optimal edge profile info.
llvm-svn: 80907
This commit is contained in:
parent
6ea9973a0b
commit
51ec7bb5aa
@ -159,7 +159,7 @@ void LoaderPass::recurseBasicBlock(const BasicBlock *BB) {
|
||||
void LoaderPass::readOrRememberEdge(ProfileInfo::Edge e,
|
||||
unsigned weight, unsigned ei,
|
||||
Function *F) {
|
||||
if (weight != (unsigned)MissingValue) {
|
||||
if (weight != ~0U) {
|
||||
EdgeInformation[F][e] += weight;
|
||||
DEBUG(errs()<<"--Read Edge Counter for " << e
|
||||
<<" (# "<<ei<<"): "<<(unsigned)getEdgeWeight(e)<<"\n");
|
||||
|
Loading…
Reference in New Issue
Block a user