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 "isl/isl-noexceptions.h"
21 
22 namespace llvm {
23 class PassRegistry;
24 class Pass;
25 class raw_ostream;
26 } // namespace llvm
27 
28 namespace polly {
29 /// Create a new DeLICM pass instance.
30 llvm::Pass *createDeLICMPass();
31 
32 /// Determine whether two lifetimes are conflicting.
33 ///
34 /// Used by unittesting.
35 bool isConflicting(isl::union_set ExistingOccupied,
36                    isl::union_set ExistingUnused, isl::union_map ExistingKnown,
37                    isl::union_map ExistingWrites,
38                    isl::union_set ProposedOccupied,
39                    isl::union_set ProposedUnused, isl::union_map ProposedKnown,
40                    isl::union_map ProposedWrites,
41                    llvm::raw_ostream *OS = nullptr, unsigned Indent = 0);
42 } // namespace polly
43 
44 namespace llvm {
45 void initializeDeLICMPass(llvm::PassRegistry &);
46 } // namespace llvm
47 
48 #endif /* POLLY_DELICM_H */
49