23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "ci/bcEscapeAnalyzer.hpp" |
26 #include "ci/bcEscapeAnalyzer.hpp" |
27 #include "compiler/oopMap.hpp" |
27 #include "compiler/oopMap.hpp" |
|
28 #include "opto/callGenerator.hpp" |
28 #include "opto/callnode.hpp" |
29 #include "opto/callnode.hpp" |
29 #include "opto/escape.hpp" |
30 #include "opto/escape.hpp" |
30 #include "opto/locknode.hpp" |
31 #include "opto/locknode.hpp" |
31 #include "opto/machnode.hpp" |
32 #include "opto/machnode.hpp" |
32 #include "opto/matcher.hpp" |
33 #include "opto/matcher.hpp" |
773 |
774 |
774 // The resproj may not exist because the result couuld be ignored |
775 // The resproj may not exist because the result couuld be ignored |
775 // and the exception object may not exist if an exception handler |
776 // and the exception object may not exist if an exception handler |
776 // swallows the exception but all the other must exist and be found. |
777 // swallows the exception but all the other must exist and be found. |
777 assert(projs->fallthrough_proj != NULL, "must be found"); |
778 assert(projs->fallthrough_proj != NULL, "must be found"); |
778 assert(projs->fallthrough_catchproj != NULL, "must be found"); |
779 assert(Compile::current()->inlining_incrementally() || projs->fallthrough_catchproj != NULL, "must be found"); |
779 assert(projs->fallthrough_memproj != NULL, "must be found"); |
780 assert(Compile::current()->inlining_incrementally() || projs->fallthrough_memproj != NULL, "must be found"); |
780 assert(projs->fallthrough_ioproj != NULL, "must be found"); |
781 assert(Compile::current()->inlining_incrementally() || projs->fallthrough_ioproj != NULL, "must be found"); |
781 assert(projs->catchall_catchproj != NULL, "must be found"); |
782 assert(Compile::current()->inlining_incrementally() || projs->catchall_catchproj != NULL, "must be found"); |
782 if (separate_io_proj) { |
783 if (separate_io_proj) { |
783 assert(projs->catchall_memproj != NULL, "must be found"); |
784 assert(Compile::current()->inlining_incrementally() || projs->catchall_memproj != NULL, "must be found"); |
784 assert(projs->catchall_ioproj != NULL, "must be found"); |
785 assert(Compile::current()->inlining_incrementally() || projs->catchall_ioproj != NULL, "must be found"); |
785 } |
786 } |
|
787 } |
|
788 |
|
789 Node *CallNode::Ideal(PhaseGVN *phase, bool can_reshape) { |
|
790 CallGenerator* cg = generator(); |
|
791 if (can_reshape && cg != NULL && cg->is_mh_late_inline() && !cg->already_attempted()) { |
|
792 // Check whether this MH handle call becomes a candidate for inlining |
|
793 ciMethod* callee = cg->method(); |
|
794 vmIntrinsics::ID iid = callee->intrinsic_id(); |
|
795 if (iid == vmIntrinsics::_invokeBasic) { |
|
796 if (in(TypeFunc::Parms)->Opcode() == Op_ConP) { |
|
797 phase->C->prepend_late_inline(cg); |
|
798 set_generator(NULL); |
|
799 } |
|
800 } else { |
|
801 assert(callee->has_member_arg(), "wrong type of call?"); |
|
802 if (in(TypeFunc::Parms + callee->arg_size() - 1)->Opcode() == Op_ConP) { |
|
803 phase->C->prepend_late_inline(cg); |
|
804 set_generator(NULL); |
|
805 } |
|
806 } |
|
807 } |
|
808 return SafePointNode::Ideal(phase, can_reshape); |
786 } |
809 } |
787 |
810 |
788 |
811 |
789 //============================================================================= |
812 //============================================================================= |
790 uint CallJavaNode::size_of() const { return sizeof(*this); } |
813 uint CallJavaNode::size_of() const { return sizeof(*this); } |