RFR: 8263769: simplify PhaseMacroExpand::extract_call_projections()
Vladimir Ivanov
vlivanov at openjdk.java.net
Mon Mar 22 09:58:43 UTC 2021
On Sun, 21 Mar 2021 00:34:51 GMT, Xin Liu <xliu at openjdk.org> wrote:
> PhaseMacroExpand::extract_call_projections(macro.cpp) is almost identical to
> CallNode::extract_projections(callnode.cpp). The implementation can be replaced
> by CallNode::extract_projections.
Nice catch!
I suggest a more extensive refactoring: replace call projection-related fields in `PhaseMacroExpand` with a `CallProjections` embedded in `PhaseMacroExpand` and reroute all accesses through it:
diff --git a/src/hotspot/share/opto/macro.hpp b/src/hotspot/share/opto/macro.hpp
index 5df0fda43bc..9f205c07769 100644
--- a/src/hotspot/share/opto/macro.hpp
+++ b/src/hotspot/share/opto/macro.hpp
@@ -82,14 +82,7 @@ public:
private:
// projections extracted from a call node
- ProjNode *_fallthroughproj;
- ProjNode *_fallthroughcatchproj;
- ProjNode *_ioproj_fallthrough;
- ProjNode *_ioproj_catchall;
- ProjNode *_catchallcatchproj;
- ProjNode *_memproj_fallthrough;
- ProjNode *_memproj_catchall;
- ProjNode *_resproj;
+ CallProjections callprojs;
// Additional data collected during macro expansion
bool _has_locks;
-------------
PR: https://git.openjdk.java.net/jdk/pull/3105
More information about the hotspot-compiler-dev
mailing list