@@ -610,23 +610,31 @@ runCompiler moduleName opts expr = do
610610 (opts ^. posPreserveLogging)
611611
612612 -- GHC.Core -> Pir translation.
613- pirT <- original <$> (PIR. runDefT annMayInline $ compileExprWithDefs expr)
613+ pirT <-
614+ {-# SCC "plinth-plugin-core -to-pir-step" #-}
615+ original <$> (PIR. runDefT annMayInline $ compileExprWithDefs expr)
616+
614617 let pirP = PIR. Program noProvenance plcVersion pirT
615618 when (opts ^. posDumpPir) . liftIO $
616619 dumpFlat (void pirP) " initial PIR program" (moduleName ++ " _initial.pir-flat" )
617620
618621 -- Pir -> (Simplified) Pir pass. We can then dump/store a more legible PIR program.
619622 spirP <-
623+ {-# SCC "plinth-plugin-pir-to-simp-step" #-}
620624 flip runReaderT pirCtx $
621625 modifyError (NoContext . PIRError ) $
622626 PIR. compileToReadable pirP
627+
623628 when (opts ^. posDumpPir) . liftIO $
624629 dumpFlat (void spirP) " simplified PIR program" (moduleName ++ " _simplified.pir-flat" )
625630
626631 -- (Simplified) Pir -> Plc translation.
627- plcP <- flip runReaderT pirCtx $
628- modifyError (NoContext . PIRError ) $
629- PIR. compileReadableToPlc spirP
632+ plcP <-
633+ {-# SCC "plinth-plugin-simp-to-plc-step" #-}
634+ flip runReaderT pirCtx $
635+ modifyError (NoContext . PIRError ) $
636+ PIR. compileReadableToPlc spirP
637+
630638 when (opts ^. posDumpPlc) . liftIO $
631639 dumpFlat (void plcP) " typed PLC program" (moduleName ++ " .tplc-flat" )
632640
@@ -636,7 +644,10 @@ runCompiler moduleName opts expr = do
636644 modifyError PLC. TypeErrorE $
637645 PLC. inferTypeOfProgram plcTcConfig (plcP $> annMayInline)
638646
639- (uplcP, _) <- flip runReaderT plcOpts $ PLC. compileProgramWithTrace plcP
647+ (uplcP, _) <-
648+ {-# SCC "plinth-plugin-plc-to-uplc-step" #-}
649+ flip runReaderT plcOpts $ PLC. compileProgramWithTrace plcP
650+
640651 dbP <- liftExcept $ modifyError PLC. FreeVariableErrorE $ traverseOf UPLC. progTerm UPLC. deBruijnTerm uplcP
641652 when (opts ^. posDumpUPlc) . liftIO $
642653 dumpFlat
0 commit comments