This is an archive of the discontinued LLVM Phabricator instance.

[flang][MSVC] Use list<Message> rather than forward_list<> in Messages
ClosedPublic

Authored by klausler on Nov 10 2020, 2:58 PM.

Details

Summary

The implementation of Messages with forward_list<> makes some
nonstandard assumptions about the validity of iterators that don't
hold up with MSVC's implementation. Use list<> instead. The
measured performance is comparable.

This change obviated a distinction between two member functions
of Messages, and the uses of one have been replaced with calls
to the other.

Similar usage in CharBuffer was also replaced for consistency.

Diff Detail

Event Timeline

klausler created this revision.Nov 10 2020, 2:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2020, 2:58 PM
klausler requested review of this revision.Nov 10 2020, 2:58 PM
tskeith added inline comments.
flang/include/flang/Parser/message.h
23

Is this needed?

klausler added inline comments.Nov 11 2020, 10:38 AM
flang/include/flang/Parser/message.h
23

No, it's left over from a performance measurement experiment; will remove.

klausler updated this revision to Diff 304579.Nov 11 2020, 10:43 AM

Remove needless <deque>

This revision is now accepted and ready to land.Nov 11 2020, 2:44 PM