We’ve had Target
and TargetNode
for a while. When building a module, a Target
object is created from a string, and then it is passed all the way to codegen::Build
, but then it’s converted back to a string before the call to the target-specific build function:
runtime::Module Build(IRModule mod, const Target& target) {
[...]
return (*bf)(mod, target->str());
}
Some of that string parsing has already been done, and the TargetNode
's members have been populated—wouldn’t it make sense to pass Target
or TargetNode
to the build function instead?