Lab4: Implement basic scalar optimizations and lower Phi nodes to assembly
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "frontend/SyntaxTreePrinter.h"
|
||||
#if !COMPILER_PARSE_ONLY
|
||||
#include "ir/IR.h"
|
||||
#include "ir/PassManager.h"
|
||||
#include "irgen/IRGen.h"
|
||||
#include "mir/MIR.h"
|
||||
#include "sem/Sema.h"
|
||||
@@ -36,6 +37,7 @@ int main(int argc, char** argv) {
|
||||
auto sema = RunSema(*comp_unit);
|
||||
|
||||
auto module = GenerateIR(*comp_unit, sema);
|
||||
ir::RunOptimizationPasses(*module);
|
||||
if (opts.emit_ir) {
|
||||
ir::IRPrinter printer;
|
||||
if (need_blank_line) {
|
||||
|
||||
Reference in New Issue
Block a user