Пример #1
0
 def define_pipelines(self):
     # define a new set of pipelines (just one in this case) and for ease
     # base it on an existing pipeline from the DefaultPassBuilder,
     # namely the "nopython" pipeline
     pm = DefaultPassBuilder.define_nopython_pipeline(self.state)
     # Add the new pass to run after IRProcessing
     pm.add_pass_after(ConstsAddOne, IRProcessing)
     # finalize
     pm.finalize()
     # return as an iterable, any number of pipelines may be defined!
     return [pm]
Пример #2
0
    def define_pipelines(self):
        pipeline = DefaultPassBuilder.define_nopython_pipeline(
            self.state, "inliner_custom_pipe")
        # mangle the default pipeline and inject DCE and IR preservation ahead
        # of legalisation

        # TODO: add a way to not do this! un-finalizing is not a good idea
        pipeline._finalized = False
        pipeline.add_pass_after(DeadCodeElimination, IRLegalization)
        pipeline.add_pass_after(PreserveIR, DeadCodeElimination)
        pipeline.finalize()
        return [pipeline]
Пример #3
0
    def define_pipelines(self):
        name = 'hpat_seq'
        pm = DefaultPassBuilder.define_nopython_pipeline(self.state)

        add_pass_before(pm, InlinePass, InlineClosureLikes)
        pm.add_pass_after(HiFramesPass, InlinePass)
        pm.add_pass_after(DataFramePass, AnnotateTypes)
        pm.add_pass_after(PostprocessorPass, AnnotateTypes)
        pm.add_pass_after(HiFramesTypedPass, DataFramePass)
        add_pass_before(pm, ParforSeqPass, IRLegalization)
        pm.finalize()

        return [pm]
Пример #4
0
    def define_pipelines(self):
        name = 'sdc_extention_pipeline_distributed'
        pm = DefaultPassBuilder.define_nopython_pipeline(self.state)

        add_pass_before(pm, InlinePass, InlineClosureLikes)
        pm.add_pass_after(HiFramesPass, InlinePass)
        pm.add_pass_after(DataFramePass, AnnotateTypes)
        pm.add_pass_after(PostprocessorPass, AnnotateTypes)
        pm.add_pass_after(HiFramesTypedPass, DataFramePass)
        pm.add_pass_after(DistributedPass, ParforPass)
        pm.finalize()

        return [pm]
 def define_pipelines(self):
     pm = DefaultPassBuilder.define_nopython_pipeline(self.state)
     pm.add_pass_after(ForceStaticGetitemLiteral,
                       NopythonTypeInference)
     pm.finalize()
     return [pm]