[PATCH] D54052: Support for inserting profile-directed cache prefetches
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 12:01:49 PST 2018
davidxl added inline comments.
================
Comment at: lib/Target/X86/X86DiscriminateMemOps.cpp:106
+ auto &Set = Seen[diToLocation(DI)];
+ if (!Set.insert(DI->getBaseDiscriminator()).second) {
+ DI = DI->setBaseDiscriminator(++MemOpDiscriminators[diToLocation(DI)]);
----------------
The return of the insert should be saved into a variable, so that it can be used later at line 110.
================
Comment at: lib/Target/X86/X86DiscriminateMemOps.cpp:110
+ Changed = true;
+ Set.insert(DI->getBaseDiscriminator());
+ }
----------------
no need to insert again, just update using the iterator returned from the first insert.
Repository:
rL LLVM
https://reviews.llvm.org/D54052
More information about the llvm-commits
mailing list