This function is used at least in 2 places, to it makes sense to make it separate.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm concerned that as-implemented this is could cause non-determinism in edge cases. SmallPtrSet has non-deterministic order, and I think the code in getDefiningScopeBound can be order dependent for cases where scopes with no dominance relation are involved (i.e. neither dominates the other). Do we need the "unique" aspect here? Ideally I'd just return an ArrayRef.
Comment Actions
Well, uniqueness is to reduce overhead for the users. If that concerns you, I'll rewrite it into returning vector of unique elements in deterministic order.
We loose the exit-early with huge operand behavior here.