mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The invariant is that this analysis should be able to stay in sync with the list of functions stored in SILModule's function list. If any functions are added/deleted then analyses can get out of sync with the state of the underlying SILModule. Some notes: 1. This is currently disabled by default since there are a bunch of violations of this in the compiler. I am in the process of fixing violations. Some examples: the linker and global opt. 2. This is a no-op in non-assert builds. 3. The full verification will only happen when -sil-verify-all is enabled. Otherwise, we only check that when we delete a function, we had state for the function. rdar://42301529
50 lines
1.6 KiB
C++
50 lines
1.6 KiB
C++
//===--- Analysis.def -------------------------------------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file allows for metaprogramming with Analyses. By adding an analysis
|
|
// name here, one is assured that all places in the compiler that the analysis
|
|
// will have a kind created for it and that the analysis will be registered in
|
|
// all locations where analyses are registered.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// ANALYSIS(NAME) This represents the name of an analysis. It is assumed that
|
|
/// the actual analysis is called `NAME ## ANALYSIS'.
|
|
#ifndef ANALYSIS
|
|
#define ANALYSIS(NAME)
|
|
#endif
|
|
|
|
ANALYSIS(AccessSummary)
|
|
ANALYSIS(AccessedStorage)
|
|
ANALYSIS(Alias)
|
|
ANALYSIS(BasicCallee)
|
|
ANALYSIS(Caller)
|
|
ANALYSIS(ClassHierarchy)
|
|
ANALYSIS(ClosureScope)
|
|
ANALYSIS(Destructor)
|
|
ANALYSIS(Dominance)
|
|
ANALYSIS(EpilogueARC)
|
|
ANALYSIS(Escape)
|
|
ANALYSIS(InductionVariable)
|
|
ANALYSIS(Loop)
|
|
ANALYSIS(LoopRegion)
|
|
ANALYSIS(OptimizerStats)
|
|
ANALYSIS(PostDominance)
|
|
ANALYSIS(PostOrder)
|
|
ANALYSIS(ProtocolConformance)
|
|
ANALYSIS(RCIdentity)
|
|
ANALYSIS(SideEffect)
|
|
ANALYSIS(TypeExpansion)
|
|
ANALYSIS(PassManagerVerifier)
|
|
|
|
#undef ANALYSIS
|