< prev index next > src/hotspot/share/opto/doCall.cpp
Print this page
#endif // not PRODUCT
assert(jvms == this->jvms(), "still operating on the right JVMS");
assert(jvms_in_sync(), "jvms must carry full info into CG");
+ PEAState* caller_state = nullptr;
+ if (DoPartialEscapeAnalysis) {
+ // Besides outlined methods, we scan all intrinsics because C2 skips parsing bytecodes of them.
+ // Some intrinsics have side-effect of Java heap such as Unsafe.compareAndSetReference().
+ // We treat PredicatedIntrinsicGenerator as an ordinary intrinsic as well.
+ if (!cg->is_inline() || cg->is_intrinsic()) {
+ PEAState& state = jvms->alloc_state();
+ // Materialize all inputs to non-inline and late inline calls.
+ // TODO: we can support late inline calls if we can pass the right JVM
+ // state to the late inline call.
+ //
+ // TODO: Should we query BCEA to make an enger inlining decision here?
+ // Because callee require a concrete object pointer as an argument,
+ // we have nothing to do but matertialize it.
+ //
+ // BCEscapeAnalyzer* bcea = cg->method()->get_bcea();
+ uint nargs = cg->method()->arg_size();
+ for (uint i=0; i < nargs; ++i) {
+ Node* arg = argument(i);
+
+ if (state.as_virtual(PEA(), arg)) {
+ Node* objx = state.materialize(this, arg);
+ set_argument(i, objx);
+ }
+ }
+ }
+ }
+
// save across call, for a subsequent cast_not_null.
Node* receiver = has_receiver ? argument(0) : nullptr;
// The extra CheckCastPPs for speculative types mess with PhaseStringOpts
if (receiver != nullptr && !call_does_dispatch && !cg->is_string_late_inline()) {
< prev index next >