File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
llvm/include/llvm/Support Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,19 @@ struct SemiNCAInfo {
107
107
static SmallVector<NodePtr, 8 > getChildren (NodePtr N, BatchUpdatePtr BUI) {
108
108
if (BUI)
109
109
return BUI->PreViewCFG .template getChildren <Inversed>(N);
110
- GraphDiffT GD;
111
- return GD.template getChildren <Inversed>(N);
110
+ return getChildren<Inversed>(N);
111
+ }
112
+
113
+ template <bool Inversed>
114
+ static SmallVector<NodePtr, 8 > getChildren (NodePtr N) {
115
+ using DirectedNodeT =
116
+ std::conditional_t <Inversed, Inverse<NodePtr>, NodePtr>;
117
+ auto R = children<DirectedNodeT>(N);
118
+ SmallVector<NodePtr, 8 > Res (detail::reverse_if<!Inversed>(R));
119
+
120
+ // Remove nullptr children for clang.
121
+ llvm::erase_value (Res, nullptr );
122
+ return Res;
112
123
}
113
124
114
125
NodePtr getIDom (NodePtr BB) const {
You can’t perform that action at this time.
0 commit comments