Skip to content

Commit 6706c65

Browse files
committed
[lumen] Port PlaceSafepoints pass to new pass manager
1 parent 83d9900 commit 6706c65

File tree

5 files changed

+224
-117
lines changed

5 files changed

+224
-117
lines changed

llvm/include/llvm/InitializePasses.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ void initializePatchableFunctionPass(PassRegistry&);
333333
void initializePeepholeOptimizerPass(PassRegistry&);
334334
void initializePhiValuesWrapperPassPass(PassRegistry&);
335335
void initializePhysicalRegisterUsageInfoPass(PassRegistry&);
336-
void initializePlaceBackedgeSafepointsImplPass(PassRegistry&);
337-
void initializePlaceSafepointsPass(PassRegistry&);
336+
void initializePlaceBackedgeSafepointsWrapperPassPass(PassRegistry&);
337+
void initializePlaceSafepointsLegacyPassPass(PassRegistry&);
338338
void initializePostDomOnlyPrinterPass(PassRegistry&);
339339
void initializePostDomOnlyViewerPass(PassRegistry&);
340340
void initializePostDomPrinterPass(PassRegistry&);

llvm/include/llvm/Transforms/Scalar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ FunctionPass *createStraightLineStrengthReducePass();
455455
// RewriteStatepointsForGC which can be run at an arbitrary point in the pass
456456
// order following this pass.
457457
//
458-
FunctionPass *createPlaceSafepointsPass();
458+
FunctionPass *createPlaceSafepointsLegacyPass();
459459

460460
//===----------------------------------------------------------------------===//
461461
//
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//===- PlaceSafepoints.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+
// This file provides interface to "PlaceSafepoints" pass.
10+
//
11+
// Place garbage collection safepoints at appropriate locations in the IR. This
12+
// does not make relocation semantics or variable liveness explicit. That's
13+
// done by RewriteStatepointsForGC.
14+
//
15+
//===----------------------------------------------------------------------===//
16+
17+
#ifndef LLVM_TRANSFORMS_SCALAR_PLACE_SAFEPOINTS_H
18+
#define LLVM_TRANSFORMS_SCALAR_PLACE_SAFEPOINTS_H
19+
20+
#include "llvm/IR/PassManager.h"
21+
22+
namespace llvm {
23+
24+
class DominatorTree;
25+
class Function;
26+
class Instruction;
27+
class TargetLibraryInfo;
28+
29+
struct PlaceSafepoints : public PassInfoMixin<PlaceSafepoints> {
30+
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
31+
32+
bool runOnFunction(Function &F, DominatorTree &DT, const TargetLibraryInfo &, std::vector<Instruction *> &);
33+
};
34+
35+
} // namespace llvm
36+
37+
#endif // LLVM_TRANSFORMS_SCALAR_PLACE_SAFEPOINTS_H

0 commit comments

Comments
 (0)