RFR: 8327283: RISC-V: Minimal build failed after JDK-8319716

Gui Cao gcao at openjdk.org
Wed Mar 6 14:50:47 UTC 2024


On Wed, 6 Mar 2024 12:20:43 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> The SHA intrinsic are only used in "LibraryCallKit::inline_digestBase_implCompress" and JVMCI.
>> So I think these (plus md5 and chacha) should be put into a ifdef COMPILER2_OR_JVMCI block. (I was going todo that but it slipped my mind)
>> 
>> The MaxVectorSize is defined if JVMCI and/or C2 is defined:
>> `NOT_COMPILER2(product(intx, MaxVectorSize, 64,`
>
>> I agree with @robehn ! We can put those functions definitions into a ifdef COMPILER2_OR_JVMCI block to avoid such a problem. I don't see other uses of them for now.
> 
> This also makes it clear that C1/interpreter don't use them, hence if someone needs a speed up there they could try to make use of them.

@robehn @RealFYang Thanks for your review, I've put those functions definitions into a #if COMPILER2_OR_JVMCI block to avoid such a problem. The reason why #ifdef COMPILER2_OR_JVMCI is not used is because it might be defined as `#define COMPILER2_OR_JVMCI 0`  Could you please look at it again?

// COMPILER2 or JVMCI
#if defined(COMPILER2) || INCLUDE_JVMCI
#define COMPILER2_OR_JVMCI 1
#define COMPILER2_OR_JVMCI_PRESENT(code) code
#define NOT_COMPILER2_OR_JVMCI(code)
#define NOT_COMPILER2_OR_JVMCI_RETURN        /* next token must be ; */
#define NOT_COMPILER2_OR_JVMCI_RETURN_(code) /* next token must be ; */
#else
#define COMPILER2_OR_JVMCI 0
#define COMPILER2_OR_JVMCI_PRESENT(code)
#define NOT_COMPILER2_OR_JVMCI(code) code
#define NOT_COMPILER2_OR_JVMCI_RETURN {}
#define NOT_COMPILER2_OR_JVMCI_RETURN_(code) { return code; }
#endif

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18114#issuecomment-1981034579


More information about the hotspot-compiler-dev mailing list