[llvm] 13922f3 - Fix warnings as errors that occur on sanitizer-x86_64-linux

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 19:13:06 PDT 2020


On Thu, Mar 26, 2020 at 7:04 PM Daniel Sanders <daniel_l_sanders at apple.com>
wrote:

>
>
> On 26 Mar 2020, at 18:48, David Blaikie <dblaikie at gmail.com> wrote:
>
> It's probably handy (to me at least) to describe in the commit message
> what the substance of the change is, rather than that it addresses some
> non-specific compiler warnings/errors.
>
>
> Sure, I can do that in future.
>

Thanks!


>
> (maybe including where this was diagnosed in the body of the commit
> message, if it's useful/doesn't fit as an addendum at the end of the main
> message line)
>
>
> I assume the 'where' there is in terms of source lines rather than the
> environment it was found in.
>

Oh, by "where" I meant the information you'd already provided, like I could
imagine a possible commit message might be:

"Use value rather than const ref for trivial types in range-for loops
(found by -Wwhatever on sanitizer-x86_64-linux buildbot)"

Other possible "wheres" would be "(post-commit review on <hash> by
<person>)" And if that bit doesn't fit in the first line, having it in the
body of the commit message for extra context for those who're curious.


>
> On Tue, Jan 7, 2020 at 4:03 PM Daniel Sanders via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>>
>> Author: Daniel Sanders
>> Date: 2020-01-07T16:02:31-08:00
>> New Revision: 13922f3e9d0c8a0f2612c5e43c922099bbf74a79
>>
>> URL:
>> https://github.com/llvm/llvm-project/commit/13922f3e9d0c8a0f2612c5e43c922099bbf74a79
>> DIFF:
>> https://github.com/llvm/llvm-project/commit/13922f3e9d0c8a0f2612c5e43c922099bbf74a79.diff
>>
>> LOG: Fix warnings as errors that occur on sanitizer-x86_64-linux
>>
>> Added:
>>
>>
>> Modified:
>>     llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
>>
>> Removed:
>>
>>
>>
>>
>> ################################################################################
>> diff  --git a/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
>> b/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
>> index b54a3e071ac0..4884bdadea91 100644
>> --- a/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
>> +++ b/llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
>> @@ -411,7 +411,7 @@ void GIMatchTreeOpcodePartitioner::repartition(
>>
>>      // If the opcode is available to test then any opcode predicates
>> will have
>>      // been enabled too.
>> -    for (const auto &PIdx : Leaf.value().TestablePredicates.set_bits()) {
>> +    for (unsigned PIdx : Leaf.value().TestablePredicates.set_bits()) {
>>        const auto &P = Leaf.value().getPredicate(PIdx);
>>        SmallVector<const CodeGenInstruction *, 1> OpcodesForThisPredicate;
>>        if (const auto *OpcodeP = dyn_cast<const
>> GIMatchDagOpcodePredicate>(P)) {
>> @@ -662,7 +662,7 @@ void GIMatchTreeVRegDefPartitioner::repartition(
>>      // If this node has an use -> def edge from this operand then this
>>      // instruction must be in partition 1 (isVRegDef()).
>>      bool WantsEdge = false;
>> -    for (const auto &EIdx : Leaf.value().TraversableEdges.set_bits()) {
>> +    for (unsigned EIdx : Leaf.value().TraversableEdges.set_bits()) {
>>        const auto &E = Leaf.value().getEdge(EIdx);
>>        if (E->getFromMI() != InstrInfo->getInstrNode() ||
>>            E->getFromMO()->getIdx() != OpIdx || E->isDefToUse())
>> @@ -725,14 +725,14 @@ void
>> GIMatchTreeVRegDefPartitioner::applyForPartition(
>>    NewInstrID = SubBuilder.allocInstrID();
>>
>>    GIMatchTreeBuilder::LeafVec &NewLeaves =
>> SubBuilder.getPossibleLeaves();
>> -  for (const auto &I : zip(NewLeaves, TraversedEdgesByNewLeaves)) {
>> +  for (const auto I : zip(NewLeaves, TraversedEdgesByNewLeaves)) {
>>      auto &Leaf = std::get<0>(I);
>>      auto &TraversedEdgesForLeaf = std::get<1>(I);
>>      GIMatchTreeInstrInfo *InstrInfo = Leaf.getInstrInfo(InstrID);
>>      // Skip any leaves that don't care about this instruction.
>>      if (!InstrInfo)
>>        continue;
>> -    for (const auto &EIdx : TraversedEdgesForLeaf.set_bits()) {
>> +    for (unsigned EIdx : TraversedEdgesForLeaf.set_bits()) {
>>        const GIMatchDagEdge *E = Leaf.getEdge(EIdx);
>>        Leaf.declareInstr(E->getToMI(), NewInstrID);
>>      }
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://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/20200326/f0692aec/attachment.html>


More information about the llvm-commits mailing list