@@ -555,26 +555,30 @@ runCompiler moduleName opts expr = do
555
555
(opts ^. posInlineConstants)
556
556
557
557
-- GHC.Core -> Pir translation.
558
- pirT <- original <$> (PIR. runDefT annMayInline $ compileExprWithDefs expr)
558
+ pirT <- {-# SCC "plinth-plugin-core -to-pir-step" #-}
559
+ original <$> (PIR. runDefT annMayInline $ compileExprWithDefs expr)
559
560
let pirP = PIR. Program noProvenance plcVersion pirT
560
561
when (opts ^. posDumpPir) . liftIO $
561
562
dumpFlat (void pirP) " initial PIR program" (moduleName ++ " _initial.pir-flat" )
562
563
563
564
-- Pir -> (Simplified) Pir pass. We can then dump/store a more legible PIR program.
564
- spirP <- flip runReaderT pirCtx $ PIR. compileToReadable pirP
565
+ spirP <- {-# SCC "plinth-plugin-pir-to-simp-step" #-}
566
+ flip runReaderT pirCtx $ PIR. compileToReadable pirP
565
567
when (opts ^. posDumpPir) . liftIO $
566
568
dumpFlat (void spirP) " simplified PIR program" (moduleName ++ " _simplified.pir-flat" )
567
569
568
570
-- (Simplified) Pir -> Plc translation.
569
- plcP <- flip runReaderT pirCtx $ PIR. compileReadableToPlc spirP
571
+ plcP <- {-# SCC "plinth-plugin-simp-to-plc-step" #-}
572
+ flip runReaderT pirCtx $ PIR. compileReadableToPlc spirP
570
573
when (opts ^. posDumpPlc) . liftIO $
571
574
dumpFlat (void plcP) " typed PLC program" (moduleName ++ " .tplc-flat" )
572
575
573
576
-- We do this after dumping the programs so that if we fail typechecking we still get the dump.
574
577
when (opts ^. posDoTypecheck) . void $
575
578
liftExcept $ PLC. inferTypeOfProgram plcTcConfig (plcP $> annMayInline)
576
579
577
- uplcP <- flip runReaderT plcOpts $ PLC. compileProgram plcP
580
+ uplcP <- {-# SCC "plinth-plugin-plc-to-uplc-step" #-}
581
+ flip runReaderT plcOpts $ PLC. compileProgram plcP
578
582
dbP <- liftExcept $ traverseOf UPLC. progTerm UPLC. deBruijnTerm uplcP
579
583
when (opts ^. posDumpUPlc) . liftIO $
580
584
dumpFlat
0 commit comments