fix half float type inference
MODIFY
ir/type.cpp
ir/type.cpp
@@ -334,12 +334,7 @@ expr FloatType::getDummyValue() const {
expr FloatType::getTypeConstraints() const {
if (defined)
return true;
-
- auto bw = sizeVar();
- // TODO: support more fp types
- auto isFloat = bw == expr::mkUInt(Float, var_bw_bits);
- auto isDouble = bw == expr::mkUInt(Double, var_bw_bits);
- return (isFloat || isDouble);
+ return sizeVar().ult(Unknown);
}
expr FloatType::operator==(const FloatType &rhs) const {

MODIFY
tools/alive_parser.cpp
tools/alive_parser.cpp
@@ -257,7 +257,7 @@ static Type& get_overflow_type(Type &type) {
return *st.get();
}
-Type& get_sym_type() {
+static Type& get_sym_type() {
return *sym_types.emplace_back(
make_unique<SymbolicType>("symty_" + to_string(sym_num++))).get();
}

fix half float type inference