This patch ports the PlaceSafepoints pass to the new pass manager as it is used by .NET/Mono. Compatibility with the legacy pass manager is maintained by adding PlaceSafepointsLegacyPass. This pass also depends on PlaceBackedgeSafepointsLegacyPass, which has been kept in the legacy-only variant, since it is apparently used only from PlaceSafepointsPass. It has been renamed, though, to indicate its legacy interface.
Details
Diff Detail
Event Timeline
looks fine, mostly just some nits
llvm/include/llvm/Transforms/Scalar/PlaceSafepoints.h | ||
---|---|---|
59 | is this necessary? | |
73 | nit: should have newline at end of file | |
llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | ||
101 | not sure what this is for, but it's not used elsewhere in LLVM so it probably shouldn't be added here | |
llvm/test/Transforms/PlaceSafepoints/split-backedge.ll | ||
2 | -passes=place-safepoints |
llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | ||
---|---|---|
101 | This is most likely something specific to Visual Studio editor. There is short comment about that in clang/lib/Lex/Pragma.cpp /// Handle "\#pragma region [...]" /// /// The syntax is /// \code /// #pragma region [optional name] /// #pragma endregion [optional comment] /// \endcode /// /// \note This is /// <a href="http://msdn.microsoft.com/en-us/library/b6xkz944(v=vs.80).aspx">editor-only</a> /// pragma, just skipped by compiler. struct PragmaRegionHandler : public PragmaHandler So it seems it's safe to drop those. |
do you need somebody to land this for you?
llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | ||
---|---|---|
342 | this should be updated to not use the legacy pm in a followup change |
is this necessary?