transform: remove switched func lowering

The switched func lowering was mainly necessary for coroutines.
With coroutines removed, this is no longer necessary.
This commit is contained in:
Nia Waldvogel
2021-12-31 13:51:47 -05:00
committed by Nia
parent ea2a6b70b2
commit 0c2fefa09b
14 changed files with 57 additions and 617 deletions
-7
View File
@@ -78,10 +78,6 @@ func Optimize(mod llvm.Module, config *compileopts.Config, optLevel, sizeLevel i
return errs
}
if config.FuncImplementation() == "switch" {
LowerFuncValues(mod)
}
// After interfaces are lowered, there are many more opportunities for
// interprocedural optimizations. To get them to work, function
// attributes have to be updated first.
@@ -102,9 +98,6 @@ func Optimize(mod llvm.Module, config *compileopts.Config, optLevel, sizeLevel i
return []error{err}
}
LowerReflect(mod)
if config.FuncImplementation() == "switch" {
LowerFuncValues(mod)
}
errs := LowerInterrupts(mod)
if len(errs) > 0 {
return errs