[PATCH] [PlaceSafepoints] Switch to being a FunctionPass
Philip Reames
listmail at philipreames.com
Tue May 12 14:24:50 PDT 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9590
Files:
llvm/trunk/include/llvm/Transforms/Scalar.h
llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
Index: llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
+++ llvm/trunk/lib/Transforms/Scalar/PlaceSafepoints.cpp
@@ -166,20 +166,13 @@
static cl::opt<bool> NoBackedge("spp-no-backedge", cl::Hidden, cl::init(false));
namespace {
-struct PlaceSafepoints : public ModulePass {
+struct PlaceSafepoints : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
- PlaceSafepoints() : ModulePass(ID) {
+ PlaceSafepoints() : FunctionPass(ID) {
initializePlaceSafepointsPass(*PassRegistry::getPassRegistry());
}
- bool runOnModule(Module &M) override {
- bool modified = false;
- for (Function &F : M) {
- modified |= runOnFunction(F);
- }
- return modified;
- }
- bool runOnFunction(Function &F);
+ bool runOnFunction(Function &F) override;
void getAnalysisUsage(AnalysisUsage &AU) const override {
// We modify the graph wholesale (inlining, block insertion, etc). We
@@ -755,7 +748,9 @@
char PlaceBackedgeSafepointsImpl::ID = 0;
char PlaceSafepoints::ID = 0;
-ModulePass *llvm::createPlaceSafepointsPass() { return new PlaceSafepoints(); }
+FunctionPass *llvm::createPlaceSafepointsPass() {
+ return new PlaceSafepoints();
+}
INITIALIZE_PASS_BEGIN(PlaceBackedgeSafepointsImpl,
"place-backedge-safepoints-impl",
Index: llvm/trunk/include/llvm/Transforms/Scalar.h
===================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar.h
+++ llvm/trunk/include/llvm/Transforms/Scalar.h
@@ -442,7 +442,7 @@
// RewriteStatepointsForGC which can be run at an arbitrary point in the pass
// order following this pass.
//
-ModulePass *createPlaceSafepointsPass();
+FunctionPass *createPlaceSafepointsPass();
//===----------------------------------------------------------------------===//
//
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9590.25630.patch
Type: text/x-patch
Size: 1968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150512/16cdc5b8/attachment.bin>
More information about the llvm-commits
mailing list