This is an archive of the discontinued LLVM Phabricator instance.

DirectedGraph: Add a constructor that takes a list of Nodes.
Needs ReviewPublic

Authored by jreiffers on May 26 2023, 3:10 AM.

Details

Reviewers
bkramer
Summary

This makes it possible to efficiently build a graph without repeatedly iterating
over the list of nodes.

Diff Detail

Event Timeline

jreiffers created this revision.May 26 2023, 3:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 3:10 AM
jreiffers requested review of this revision.May 26 2023, 3:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 3:10 AM

Test case maybe?

llvm/include/llvm/ADT/DirectedGraph.h
186

Make it explicit

jreiffers updated this revision to Diff 526008.May 26 2023, 3:27 AM
jreiffers marked an inline comment as done.

Add test.

Thanks, PTAL!