Commits

Anonymous committed 7132102

[minor] restore code cleanup

  • Participants
  • Parent commits 258dc10
  • Branches clojurefe

Comments (0)

Files changed (2)

src/main/clojure/sketch/compiler/main/stages.clj

 
   ; passes
   '(sketch.compiler.main.passes
-     ParseProgramStage SubstituteSolution MetaStage RunPrintFunctions)
+     ParseProgramStage SubstituteSolution MetaStage RunPrintFunctions
+     CleanupFinalCode)
   '(sketch.compiler.passes.lowering
      ConstantReplacer SeparateInitializers BlockifyRewriteableStmts
      ExtractComplexLoopConditions EliminateRegens
   insulate-mutability
   (visitor DeleteInstrumentCalls)
   (vargen-visitor SubstituteSolution opts soln)
+  (parameterized-visitor 'CleanupFinalCode #(new CleanupFinalCode
+      opts (get-rctrl opts (:prog %)) (:varGen %)) )
   ))
 
 (defn run-tprint-stage [opts]

src/main/java/sketch/compiler/passes/cuda/GenerateAllOrSomeThreadsFunctions.java

                 } else if (stmt instanceof StmtWhile) {
                     StmtWhile ws = (StmtWhile) stmt;
                     Expression c = ws.getCond();
-                    String newVarName = varGen.nextVar("while_cond");
+                    String newVarName = varGen.nextVar("whileCond");
 
                     // save to a variable, and transform it so it becomes thread local
                     StmtVarDecl cond_decl =