RFR: 8241495: Make more compiler related flags available on a per method level

Nils Eliasson neliasso at openjdk.java.net
Thu Oct 22 09:20:13 UTC 2020


On Thu, 22 Oct 2020 07:28:01 GMT, Xin Liu <xliu at openjdk.org> wrote:

> 8241495: Make more compiler related flags available on a per method level

Changes requested by neliasso (Reviewer).

src/hotspot/share/compiler/compilerDirectives.hpp line 37:

> 35:   //      Directives flag name,    type, default value, compile command name
> 36:   #define compilerdirectives_common_flags(cflags) \
> 37:     cflags(Enable,                  bool, false, Enable) \

This flag only has a meaning when working with directives files. Doesn't it just add confusion to have a default from CompileCommand?

src/hotspot/share/compiler/compilerDirectives.hpp line 39:

> 37:     cflags(Enable,                  bool, false, Enable) \
> 38:     cflags(Exclude,                 bool, false, Exclude) \
> 39:     cflags(BreakAtExecute,          bool, false, BreakAtExecute) \

The BreakAtFlags are missing defaults since CompileCommand uses the "break" option. If we are going to add them to the directives - we should go through all uses and make sure that this is the only flag is uses.

src/hotspot/share/compiler/compilerDirectives.hpp line 38:

> 36:   #define compilerdirectives_common_flags(cflags) \
> 37:     cflags(Enable,                  bool, false, Enable) \
> 38:     cflags(Exclude,                 bool, false, Exclude) \

CompileCommand uses a different semantic than CompilerDirectives to exclude methods from compilation. Are you sure you will be preserving backwards compatibility?

See compilerDirectives.cpp lines 333-360 to see how the backwards compatibility is preserved.

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

PR: https://git.openjdk.java.net/jdk/pull/796


More information about the hotspot-compiler-dev mailing list