[PATCH] D15776: [RFC] Selectively print functions for print-after-all/print-before-all

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 25 11:16:57 PST 2015


PrintFuncNames is a set, so "count" and "find" should be equal for
membership test.

>> @@ -109,6 +118,11 @@
>>    return PrintAfterAll || ShouldPrintBeforeOrAfterPass(PI, PrintAfter);
>>  }
>>
>> +bool llvm::isFunctionInPrintList(StringRef FunctionName) {
>> +  if (PrintFuncNames.empty())
>> +    return true;
>> +  return PrintFuncNames.count(FunctionName);
>
> Wouldn't .find() here be faster?
>
> Roman
>




More information about the llvm-commits mailing list