Revert "[PGO] Minor cleanup for count instruction in SelectInstVisitor."

Fails LLVMFuzzer.LLVMFuzzer.value-profile-strncmp.test

This reverts commit r297892.

llvm-svn: 297910
This commit is contained in:
Vitaly Buka 2017-03-15 23:06:22 +00:00
parent 8acf76b6b9
commit de85ad895d
1 changed files with 1 additions and 4 deletions

View File

@ -205,7 +205,6 @@ struct SelectInstVisitor : public InstVisitor<SelectInstVisitor> {
SelectInstVisitor(Function &Func) : F(Func) {}
void countSelects(Function &Func) {
NSIs = 0;
Mode = VM_counting;
visit(Func);
}
@ -235,8 +234,6 @@ struct SelectInstVisitor : public InstVisitor<SelectInstVisitor> {
void annotateOneSelectInst(SelectInst &SI);
// Visit \p SI instruction and perform tasks according to visit mode.
void visitSelectInst(SelectInst &SI);
// Return the number of select instructions. This needs be called after
// countSelects().
unsigned getNumOfSelectInsts() const { return NSIs; }
};
@ -1107,9 +1104,9 @@ void SelectInstVisitor::visitSelectInst(SelectInst &SI) {
if (SI.getCondition()->getType()->isVectorTy())
return;
NSIs++;
switch (Mode) {
case VM_counting:
NSIs++;
return;
case VM_instrument:
instrumentOneSelectInst(SI);