1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-24 01:30:50 +00:00

Renamed passes

This commit is contained in:
jespergravgaard 2020-03-07 19:44:37 +01:00
parent 9e505c4d6e
commit 4af6d88907
3 changed files with 8 additions and 25 deletions

View File

@ -261,28 +261,11 @@ public class Compiler {
getLog().append(program.getProcedureModifiedVars().toString(program));
}
//getLog().append("CONTROL FLOW GRAPH (CLEANED)");
//getLog().append(program.getGraph().toString(program));
// Handle calling convention stack
new PassNCallingConventionStack(program).execute();
new Pass1ProcedureCallParameters(program).generate();
//getLog().append("CONTROL FLOW GRAPH (BEFORE LIST UNWINDING)");
//getLog().append(program.getGraph().toString(program));
new Pass1CallingConventionStack(program).execute();
new Pass1CallingConventionPhiParameters(program).execute();
new PassNUnwindLValueLists(program).execute();
//getLog().append("CONTROL FLOW GRAPH (CALL PARAMETERS)");
//getLog().append(program.getGraph().toString(program));
new Pass1GenerateSingleStaticAssignmentForm(program).execute();
//getLog().append("CONTROL FLOW GRAPH (SSA)");
//getLog().append(program.getGraph().toString(program));
new Pass1CallingConventionPhiReturnValue(program).execute();
//getLog().append("CONTROL FLOW GRAPH (BEFORE LIST UNWINDING)");
//getLog().append(program.getGraph().toString(program));
new PassNUnwindLValueLists(program).execute();
getLog().append("\nCONTROL FLOW GRAPH SSA");

View File

@ -12,18 +12,18 @@ import dk.camelot64.kickc.model.values.*;
import java.util.*;
/** Pass that modifies a control flow graph to call {@link Procedure.CallingConvention#PHI_CALL} procedures by passing parameters through registers */
public class Pass1ProcedureCallParameters extends ControlFlowGraphCopyVisitor {
/** Handle calling convention {@link Procedure.CallingConvention#PHI_CALL} by passing parameters through variables */
public class Pass1CallingConventionPhiParameters extends ControlFlowGraphCopyVisitor {
private Program program;
public Pass1ProcedureCallParameters(Program program) {
public Pass1CallingConventionPhiParameters(Program program) {
this.program = program;
}
private Map<LabelRef, LabelRef> splitBlockMap = new LinkedHashMap<>();
public void generate() {
public void execute() {
ControlFlowGraph generated = visitGraph(program.getGraph());
// Fix phi predecessors for any blocks has a split block as predecessor

View File

@ -20,9 +20,9 @@ import dk.camelot64.kickc.passes.utils.SizeOfConstants;
import java.util.*;
/** Handle calling convention {@link Procedure.CallingConvention#STACK_CALL} by converting the making control flow graph and symbols calling convention specific. */
public class PassNCallingConventionStack extends Pass2SsaOptimization {
public class Pass1CallingConventionStack extends Pass2SsaOptimization {
public PassNCallingConventionStack(Program program) {
public Pass1CallingConventionStack(Program program) {
super(program);
}