mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This commit adds the functionality, but does not change SILPassManager to use it. The reason why I am doing this is so I can implement sil-opt pass bisecting functionality in python using a tool that dumps the current pass pipelines out. This will ensure that even in the face of changes to the pass pipelines, everything should just work.
41 lines
1.6 KiB
Modula-2
41 lines
1.6 KiB
Modula-2
//===--- PassPipeline.def -------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// Metaprogramming for Pass Pipelines
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// PASSPIPELINE(NAME, DESCRIPTION)
|
|
///
|
|
/// A pipeline with Name NAME and description DESCRIPTION. PassPipelinePlan
|
|
/// constructor is assumed to not take a SILOptions value.
|
|
#ifndef PASSPIPELINE
|
|
#define PASSPIPELINE(NAME, DESCRIPTION)
|
|
#endif
|
|
|
|
/// PASSPIPELINE_WITH_OPTIONS(NAME, DESCRIPTION)
|
|
///
|
|
/// A pipeline with Name NAME and description DESCRIPTION. PassPipelinePlan
|
|
/// constructor is assumed to take a SILOptions value.
|
|
#ifndef PASSPIPELINE_WITH_OPTIONS
|
|
#define PASSPIPELINE_WITH_OPTIONS(NAME, DESCRIPTION) PASSPIPELINE(NAME, DESCRIPTION)
|
|
#endif
|
|
|
|
PASSPIPELINE_WITH_OPTIONS(Diagnostic, "Guaranteed Passes")
|
|
PASSPIPELINE(OwnershipEliminator, "Utility pass to just run the ownership eliminator pass")
|
|
PASSPIPELINE_WITH_OPTIONS(Performance, "Passes run at -O")
|
|
PASSPIPELINE(Onone, "Passes run at -Onone")
|
|
PASSPIPELINE(InstCount, "Utility pipeline to just run the inst count pass")
|
|
|
|
#undef PASSPIPELINE_WITH_OPTIONS
|
|
#undef PASSPIPELINE
|