[PATCH] D149344: [SCEV] Replace IsAvailableOnEntry with block disposition
Manoj Gupta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 09:40:36 PDT 2023
manojgupta added a comment.
This patch is causing a clang crash in ChromeOS builds.
Reproducer:
clang -cc1 -O2 -x c++ -emit-llvm crash.cc
typedef int a;
namespace b {
class c;
}
namespace e {
namespace {
template <bool, class d = void> struct g { typedef d f; };
template <bool i, class d> using h = g<i, d>::f;
template <class d, d k> struct j { static const d m = k; };
typedef j<bool, false> l;
template <bool, class q, class> struct aa { using f = q; };
} // namespace
inline namespace n {
template <class d> struct ab : j<bool, __is_assignable(d, d)> {};
template <class d> using o = g<ab<d>::m>::f;
template <class d> o<d> ac(d &p, d x) { p = x; }
struct r;
template <class s, class ad> struct ae {
s af;
struct ag {
template <class, class> static bool ah();
template <class, class ai> static constexpr bool aj() { return ah<a, ai>; }
};
template <bool ak> using al = aa<ak, ag, r>::f;
template <bool am = true, g<al<am>::template aj<s, ad>()> * = nullptr>
ae(s, ad);
};
template <class an, class ao> void ap(an aq, ao ar) { ac(*aq, *ar); }
struct as {};
template <class> struct at { typedef as au; };
template <class> struct av;
struct aw;
template <> struct av<aw> { template <class ax> using ay = at<ax>::au; };
template <class, class an, class az, class ao, class ba>
ae<an, ao> bb(an bc, az, ao bd, ba be) {
while (bd != be) {
ap(bc, bd);
++bc;
++bd;
}
return ae(bc, bd);
}
template <class t, typename bf> bf bh(bf bj, bf bk, bf bi) {
bb<t>(bj, bk, bk, bi);
return bk;
}
template <class t, class bf> bf bl(bf bj, bf bk, bf bi, as) {
return bh<t>(bj, bk, bi);
}
template <class t, class bg, class bm> ae<bg, bg> bn(bg bj, bg bk, bm bi) {
using bo = ae<bg, bg>;
bg bp(bi);
using bq = av<t>::template ay<bg>;
auto br = bl<t>(bj, bk, bp, bq());
return bo(br, bp);
}
template <class bs> bs bt(bs bj, bs bk, bs bi) { return bn<aw>(bj, bk, bi).af; }
} // namespace n
} // namespace e
void bu(void *, void *, a);
namespace e {
namespace {
template <class d, a bv> d *ci(d (&bw)[bv]) { return bw + bv; }
} // namespace
} // namespace e
namespace b {
template <typename, typename> struct bx;
class by {};
namespace bz {
namespace ca {
template <typename> struct cb : e::j<bool, 0> {};
template <typename cc> e::h<cb<c>::m, a> cd(cc);
template <typename cc> bool ce(char *&cf, char *cg, cc m) {
a ch = sizeof(m);
if (cf > cg)
return false;
char *cj = reinterpret_cast<char *>(&m);
bu(cf, cj, ch);
cf += ch;
return true;
}
template <typename ck> by cl(ck af, ck cw) {
char buffer[64], *cf;
char *cg = e::ci(buffer);
while (af != cw) {
cf = buffer;
while (af != cw && ce(cf, cg, cd(af)))
++af;
e::bt(buffer, cf, cg);
}
}
} // namespace ca
} // namespace bz
template <typename ck> by cm(ck af, ck cw) { bz::ca::cl(af, cw); }
template <typename> class cn;
template <typename> class co;
} // namespace b
namespace {
using b::c;
using b::cn;
template <typename cc, typename da = void> using bx = b::bx<cc, da>;
template <typename cp> using co = b::co<cp>;
} // namespace
namespace b {
template <typename, typename = void> struct bx;
template <typename cc, typename cq> struct bx<e::ae<cc, cq>> {
using cr = e::ae<cc, cq>;
using cs = bx<cc>;
static unsigned ct(cr cu) { cs::ct(cu.af); }
};
template <typename cc> class cn {
public:
using cv = cc;
using di = cv *;
using cx = di;
cx begin();
cx ci();
};
template <typename cc> by cy(cc cz) { cm(cz.begin(), cz.ci()); }
template <typename cc> struct bx<cn<cc>> {
static unsigned ct(cn<cc> de) { cy(de); }
};
template <typename db, typename... u> class co<db(u...)> {};
namespace ca {
template <class, template <class> class> struct dc { using dd = e::l; };
} // namespace ca
template <template <class> class v> using w = ca::dc<void, v>::dd;
} // namespace b
namespace mlir {
namespace ca {
template <typename df> using y = decltype(df::z);
template <typename df> using dg = decltype(df::dh);
} // namespace ca
class dm {
public:
template <typename dj> dj dk(co<void(dj *)>) {
auto dl = getKey<dj>();
dn<dj>(dl);
}
template <typename df> e::h<b::w<ca::y>::m, typename df::KeyTy> getKey();
template <typename, typename DerivedKey>
e::h<b::w<ca::dg>::m, b::by> dn(DerivedKey dl) {
bx<DerivedKey>::ct(dl);
}
};
namespace pdll {
namespace ast {
class Context;
namespace ca {
struct TupleTypeStorage;
}
class Type {
public:
struct dj;
template <typename ImplT> class TypeBase {
public:
using df = ImplT;
};
dj *impl;
};
class TupleType : Type::TypeBase<ca::TupleTypeStorage> {
TupleType dk(Context &, cn<Type>, cn<c>);
};
namespace ca {
template <typename, typename KeyT> struct TypeStorageBase {
using KeyTy = KeyT;
};
struct TupleTypeStorage
: TypeStorageBase<TupleTypeStorage, e::ae<cn<Type>, c>> {};
} // namespace ca
class Context {
public:
dm getTypeUniquer();
};
} // namespace ast
} // namespace pdll
} // namespace mlir
using namespace mlir::pdll::ast;
TupleType TupleType::dk(Context &context, cn<Type>, cn<c>) {
context.getTypeUniquer().dk(co<void(df *)>());
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149344/new/
https://reviews.llvm.org/D149344
More information about the llvm-commits
mailing list