RE: A small C compiler generating Eigen IR ยป convert.diff
cdemitter.cpp | ||
---|---|---|
Context::SmartOperand Context::Convert (const Type& type, const Operand& value, const Hint hint)
|
||
{
|
||
if (type == value.type) return {current->uses, value};
|
||
if (IsImmediate (value)) return Evaluate (value, type);
|
||
auto result = ReuseRegister (value, type, hint); Convert (result, value); return result;
|
||
}
|