//===- PhiValues.cpp - Phi Value Analysis ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
using namespace llvm;
void
void
bool
// The goal here is to find all of the non-phi values reachable from this phi,
// and to do the same for all of the phis reachable from this phi, as doing so
// is necessary anyway in order to get the values for this phi. We do this using
// Tarjan's algorithm with Nuutila's improvements to find the strongly connected
// components of the phi graph rooted in this phi:
// * All phis in a strongly connected component will have the same reachable
// non-phi values. The SCC may not be the maximal subgraph for that set of
// reachable values, but finding out that isn't really necessary (it would
// only reduce the amount of memory needed to store the values).
// * Tarjan's algorithm completes components in a bottom-up manner, i.e. it
// never completes a component before the components reachable from it have
// been completed. This means that when we complete a component we have
// everything we need to collect the values reachable from that component.
// * We collect both the non-phi values reachable from each SCC, as that's what
// we're ultimately interested in, and all of the reachable values, i.e.
// including phis, as that makes invalidateValue easier.
void
const PhiValues::ValueSet &
void
void
void
AnalysisKey PhiValuesAnalysis::Key;
PhiValues
PreservedAnalyses
:
bool
void
void
char PhiValuesWrapperPass::ID = 0;