[llvm] r288598 - [PM] Rename lookupPass to lookUpPass.

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 15:46:23 PST 2016


FWIW, while lookup is more common, we already have both spellings:

FastISel::lookUpRegForValue(const Value *V)
PPCAsmPrinter::lookUpOrCreateTOCEntry(MCSymbol *Sym)


And a couple more in the symbolizer.

</bikeshedding>

On Mon, Dec 12, 2016 at 3:29 PM, David Blaikie via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> This seems inconsistent with a fair amount of existing precedent in LLVM.
>
> we have loads of functions that use lookup as a verb (DenseMap::lookup,
> ScopedHashTable::lookup, IntervalMap::lookup, ImmutableMap::lookup,
> MapVector::lookup - just to name those in ADT, but they're littered across
> all parts of LLVM)
>
>
> On Sat, Dec 3, 2016 at 12:00 PM Justin Lebar via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: jlebar
>> Date: Sat Dec  3 13:49:35 2016
>> New Revision: 288598
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=288598&view=rev
>> Log:
>> [PM] Rename lookupPass to lookUpPass.
>>
>> Summary:
>> "Lookup" is a noun ("lookup table"), "look up" is a verb ("look up
>> 'table' in the dictionary").
>>
>> Reviewers: chandlerc
>>
>> Subscribers: silvas, llvm-commits, mehdi_amini
>>
>> Differential Revision: https://reviews.llvm.org/D27374
>>
>> Modified:
>>     llvm/trunk/include/llvm/IR/PassManager.h
>>
>> Modified: llvm/trunk/include/llvm/IR/PassManager.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/
>> llvm/IR/PassManager.h?rev=288598&r1=288597&r2=288598&view=diff
>> ============================================================
>> ==================
>> --- llvm/trunk/include/llvm/IR/PassManager.h (original)
>> +++ llvm/trunk/include/llvm/IR/PassManager.h Sat Dec  3 13:49:35 2016
>> @@ -638,16 +638,16 @@ public:
>>    }
>>
>>  private:
>> -  /// \brief Lookup a registered analysis pass.
>> -  PassConceptT &lookupPass(AnalysisKey *ID) {
>> +  /// \brief Look up a registered analysis pass.
>> +  PassConceptT &lookUpPass(AnalysisKey *ID) {
>>      typename AnalysisPassMapT::iterator PI = AnalysisPasses.find(ID);
>>      assert(PI != AnalysisPasses.end() &&
>>             "Analysis passes must be registered prior to being queried!");
>>      return *PI->second;
>>    }
>>
>> -  /// \brief Lookup a registered analysis pass.
>> -  const PassConceptT &lookupPass(AnalysisKey *ID) const {
>> +  /// \brief Look up a registered analysis pass.
>> +  const PassConceptT &lookUpPass(AnalysisKey *ID) const {
>>      typename AnalysisPassMapT::const_iterator PI =
>> AnalysisPasses.find(ID);
>>      assert(PI != AnalysisPasses.end() &&
>>             "Analysis passes must be registered prior to being queried!");
>> @@ -665,7 +665,7 @@ private:
>>      // If we don't have a cached result for this function, look up the
>> pass and
>>      // run it to produce a result, which we then add to the cache.
>>      if (Inserted) {
>> -      auto &P = this->lookupPass(ID);
>> +      auto &P = this->lookUpPass(ID);
>>        if (DebugLogging)
>>          dbgs() << "Running analysis: " << P.name() << "\n";
>>        AnalysisResultListT &ResultList = AnalysisResultLists[&IR];
>> @@ -697,7 +697,7 @@ private:
>>        return;
>>
>>      if (DebugLogging)
>> -      dbgs() << "Invalidating analysis: " << this->lookupPass(ID).name()
>> +      dbgs() << "Invalidating analysis: " << this->lookUpPass(ID).name()
>>               << "\n";
>>      AnalysisResultLists[&IR].erase(RI->second);
>>      AnalysisResults.erase(RI);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161212/164c9268/attachment.html>


More information about the llvm-commits mailing list