AlwaysInlineIntrinsics and AbstractInliningPolicy.isIntrinsic
Doug Simon
doug.simon at oracle.com
Thu Aug 10 10:11:17 UTC 2017
> On 10 Aug 2017, at 10:08, Christian Thalinger <cthalinger at twitter.com> wrote:
>
> Currently looking at some inlining stuff and I noticed that AlwaysInlineIntrinsics in AbstractInliningPolicy.isIntrinsic doesn’t do anything since the two methods called (onlyIntrinsics and onlyForcedIntrinsics) have exactly the same implementation:
>
> protected boolean isIntrinsic(Replacements replacements, InlineInfo info) {
> if (AlwaysInlineIntrinsics.getValue(info.graph().getOptions())) {
> return onlyIntrinsics(replacements, info);
> } else {
> return onlyForcedIntrinsics(replacements, info);
> }
> }
>
> private static boolean onlyIntrinsics(Replacements replacements, InlineInfo info) {
> for (int i = 0; i < info.numberOfMethods(); i++) {
> if (!InliningUtil.canIntrinsify(replacements, info.methodAt(i), info.invoke().bci())) {
> return false;
> }
> }
> return true;
> }
>
> private static boolean onlyForcedIntrinsics(Replacements replacements, InlineInfo info) {
> for (int i = 0; i < info.numberOfMethods(); i++) {
> if (!InliningUtil.canIntrinsify(replacements, info.methodAt(i), info.invoke().bci())) {
> return false;
> }
> }
> return true;
> }
>
> Am I missing something?
I don't think so - that code just looks wrong. I don't even know what a "force intrinsic" means.
-Doug
More information about the graal-dev
mailing list