vast
vast copied to clipboard
Refactor function generation
At the moment the logic is on three places:
-
CodeGenDriver
,CodeGen
andCodeGenDeclVisitor
- driver and visitor also duplicates some logic --
emit_function_prologue
andVisitFunctionDecl
-
emit_function_prologue
should not really exist
Ideally we want to have separated responsibility:
-
CodeGenDriver
to parse frontend options -
CodeGen
orchestrate scoping - probably best option would be to extract separate component to handle funciton codegen -- move
emit_function_prologue
andstart_function
fromCodeGen
? -
CodeGenDeclVisitor
orchestrate mlir generation