[PATCH] D21076: [DSE] Ignore dbg value when instruction iterator is reset.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 20:01:06 PDT 2016


Thanks. I'm not sure why I didn't see that. Perhaps I went to the
definition instead of the declaration or vice versa.

-- Sean Silva

On Mon, Jun 13, 2016 at 4:39 PM, Daniel Berlin <dberlin at dberlin.org> wrote:

>
>
> On Mon, Jun 13, 2016 at 4:29 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>> silvas added a subscriber: silvas.
>> silvas added a comment.
>>
>> In http://reviews.llvm.org/D21076#456942, @dberlin wrote:
>>
>> > Note: bb->eraseFromParent now returns an iterator, so you can fix this
>> by returning and using that instead  :)
>>
>>
>> Sorry, this is sort of a side comment: what iterator does it return? I'm
>> having a hard time seeing based on the docs.
>>
>>
>>
> Yeah, sadly, \return gets put only in the details you have to expand to
> see:
>
> It says:
>
> "
> *...*
> *Returns:*an iterator pointing to the element after the erased one
>
> Definition at line 75
> <http://llvm.org/docs/doxygen/html/Instruction_8cpp_source.html#l00075> of
> file Instruction.cpp
> <http://llvm.org/docs/doxygen/html/Instruction_8cpp_source.html>.
> "
>
> It's just returning with ilist->erase returns, which is the element after
> the erased one.
> (or ->end() if there is no such element)
>
> You can convert this to either a forward or reverse iterator directly,
> because it's an ilist.
>
>
>
>> http://reviews.llvm.org/D21076
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160613/df994ef8/attachment.html>


More information about the llvm-commits mailing list