mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8151779: Some intrinsic flags could be replaced with one general flag
Add ControlIntrinsic switch Reviewed-by: neliasso, phh
This commit is contained in:
parent
6986ab256d
commit
4076ca82d2
14 changed files with 641 additions and 119 deletions
|
@ -1635,7 +1635,10 @@ private:
|
|||
vmSymbols::SID sig,
|
||||
jshort flags);
|
||||
|
||||
// check if the intrinsic is disabled by course-grained flags.
|
||||
static bool disabled_by_jvm_flags(vmIntrinsics::ID id);
|
||||
public:
|
||||
static ID find_id(const char* name);
|
||||
// Given a method's class, name, signature, and access flags, report its ID.
|
||||
static ID find_id(vmSymbols::SID holder,
|
||||
vmSymbols::SID name,
|
||||
|
@ -1685,12 +1688,25 @@ public:
|
|||
// 'method' requires predicated logic.
|
||||
static int predicates_needed(vmIntrinsics::ID id);
|
||||
|
||||
// Returns true if a compiler intrinsic is disabled by command-line flags
|
||||
// and false otherwise.
|
||||
static bool is_disabled_by_flags(const methodHandle& method);
|
||||
// There are 2 kinds of JVM options to control intrinsics.
|
||||
// 1. Disable/Control Intrinsic accepts a list of intrinsic IDs.
|
||||
// ControlIntrinsic is recommended. DisableIntrinic will be deprecated.
|
||||
// Currently, the DisableIntrinsic list prevails if an intrinsic appears on
|
||||
// both lists.
|
||||
//
|
||||
// 2. Explicit UseXXXIntrinsics options. eg. UseAESIntrinsics, UseCRC32Intrinsics etc.
|
||||
// Each option can control a group of intrinsics. The user can specify them but
|
||||
// their final values are subject to hardware inspection (VM_Version::initialize).
|
||||
// Stub generators are controlled by them.
|
||||
//
|
||||
// An intrinsic is enabled if and only if neither the fine-grained control(1) nor
|
||||
// the corresponding coarse-grained control(2) disables it.
|
||||
static bool is_disabled_by_flags(vmIntrinsics::ID id);
|
||||
static bool is_intrinsic_disabled(vmIntrinsics::ID id);
|
||||
static bool is_intrinsic_available(vmIntrinsics::ID id);
|
||||
|
||||
static bool is_disabled_by_flags(const methodHandle& method);
|
||||
static bool is_intrinsic_available(vmIntrinsics::ID id) {
|
||||
return !is_disabled_by_flags(id);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // SHARE_CLASSFILE_VMSYMBOLS_HPP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue