[PATCH] [PlaceSafepoints] Reduce dominator tree recalculation
Sanjoy Das
sanjoy at playingwithpointers.com
Tue May 12 17:21:47 PDT 2015
LGTM with comments.
================
Comment at: lib/Transforms/Scalar/PlaceSafepoints.cpp:661
@@ +660,3 @@
+ for (Instruction *PollLocation : PollsNeeded) {
+ std::vector<CallSite> RuntimeCalls;
+ InsertSafepointPoll(PollLocation, RuntimeCalls);
----------------
I think a `SmallVector` is more appropriate here.
================
Comment at: lib/Transforms/Scalar/PlaceSafepoints.cpp:666
@@ +665,3 @@
+ }
+ PollsNeeded.clear(); // make sure we don't accidentally use
+ // The dominator tree has been invalidated by the inlining performed in the
----------------
I don't think this is the right way to avoid using `PollsNeeded`. As a later change, we should factor `PlaceSafepoints::runOnFunction` into smaller functions such that `PollsNeeded` is statically not in scope of the functions that should not be using it.
http://reviews.llvm.org/D9727
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list