This is an archive of the discontinued LLVM Phabricator instance.

[DomTree] Use a non-recursive DFS instead of a recursive one; NFC
ClosedPublic

Authored by sanjoy on Aug 7 2017, 9:51 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy created this revision.Aug 7 2017, 9:51 PM
kuhar accepted this revision.Aug 8 2017, 12:04 AM

LGTM.

Out of curiosity: what kind of IR triggers stack overflow here? I'd suspect it would be have to a very large and nested loop.

include/llvm/Support/GenericDomTreeConstruction.h
437 ↗(On Diff #110134)

Nitpick: in other places in the file, stack are initialized like this:
SmallVector<Ptr, 8> Stack = {FirstElem};

This revision is now accepted and ready to land.Aug 8 2017, 12:04 AM
This revision was automatically updated to reflect the committed changes.

LGTM.

Out of curiosity: what kind of IR triggers stack overflow here? I'd suspect it would be have to a very large and nested loop.

It is a large and nested loop. :)