Polly 19.0.0git
DeLICM.h
Go to the documentation of this file.
1//===------ DeLICM.h --------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Undo the effect of Loop Invariant Code Motion (LICM) and
10// GVN Partial Redundancy Elimination (PRE) on SCoP-level.
11//
12// Namely, remove register/scalar dependencies by mapping them back to array
13// elements.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef POLLY_DELICM_H
18#define POLLY_DELICM_H
19
20#include "polly/ScopPass.h"
22
23namespace llvm {
24class PassRegistry;
25class Pass;
26class raw_ostream;
27} // namespace llvm
28
29namespace polly {
30/// Create a new DeLICM pass instance.
31llvm::Pass *createDeLICMWrapperPass();
32llvm::Pass *createDeLICMPrinterLegacyPass(llvm::raw_ostream &OS);
33
34struct DeLICMPass final : llvm::PassInfoMixin<DeLICMPass> {
36
37 llvm::PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM,
39};
40
41struct DeLICMPrinterPass final : llvm::PassInfoMixin<DeLICMPrinterPass> {
42 DeLICMPrinterPass(raw_ostream &OS) : OS(OS) {}
43
44 PreservedAnalyses run(Scop &S, ScopAnalysisManager &,
46
47private:
48 llvm::raw_ostream &OS;
49};
50
51/// Determine whether two lifetimes are conflicting.
52///
53/// Used by unittesting.
54bool isConflicting(isl::union_set ExistingOccupied,
55 isl::union_set ExistingUnused, isl::union_map ExistingKnown,
56 isl::union_map ExistingWrites,
57 isl::union_set ProposedOccupied,
58 isl::union_set ProposedUnused, isl::union_map ProposedKnown,
59 isl::union_map ProposedWrites,
60 llvm::raw_ostream *OS = nullptr, unsigned Indent = 0);
61
62} // namespace polly
63
64namespace llvm {
65void initializeDeLICMWrapperPassPass(llvm::PassRegistry &);
66void initializeDeLICMPrinterLegacyPassPass(llvm::PassRegistry &);
67} // namespace llvm
68
69#endif /* POLLY_DELICM_H */
Static Control Part.
Definition: ScopInfo.h:1628
This file contains the declaration of the PolyhedralInfo class, which will provide an interface to ex...
void initializeDeLICMPrinterLegacyPassPass(llvm::PassRegistry &)
void initializeDeLICMWrapperPassPass(llvm::PassRegistry &)
llvm::Pass * createDeLICMPrinterLegacyPass(llvm::raw_ostream &OS)
Definition: DeLICM.cpp:1497
llvm::Pass * createDeLICMWrapperPass()
Create a new DeLICM pass instance.
Definition: DeLICM.cpp:1495
bool isConflicting(isl::union_set ExistingOccupied, isl::union_set ExistingUnused, isl::union_map ExistingKnown, isl::union_map ExistingWrites, isl::union_set ProposedOccupied, isl::union_set ProposedUnused, isl::union_map ProposedKnown, isl::union_map ProposedWrites, llvm::raw_ostream *OS=nullptr, unsigned Indent=0)
Determine whether two lifetimes are conflicting.
Definition: DeLICM.cpp:1515
AnalysisManager< Scop, ScopStandardAnalysisResults & > ScopAnalysisManager
Definition: ScopPass.h:46
llvm::PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM, ScopStandardAnalysisResults &SAR, SPMUpdater &U)
Definition: DeLICM.cpp:1501
llvm::raw_ostream & OS
Definition: DeLICM.h:48
DeLICMPrinterPass(raw_ostream &OS)
Definition: DeLICM.h:42
PreservedAnalyses run(Scop &S, ScopAnalysisManager &, ScopStandardAnalysisResults &SAR, SPMUpdater &)
Definition: DeLICM.cpp:1508