[Arm64] Set Instruction set flags#15798
Conversation
|
test Tizen armel Cross Checked Innerloop Build and Test |
| if (jitFlags.IsSet(JitFlags::flag)) \ | ||
| opts.setSupportedISA(InstructionSet_##isa); | ||
| #include "hwintrinsiclistArm64.h" | ||
|
|
There was a problem hiding this comment.
This sequence is quite confusing. Wouldn't it be clearer just to start with InstructionSet_Base as the default?
e.g.:
// There is no JitFlag to specify the base instruction set; we start with that as the default.
opts.SetSupportedISA(InstructionSet_Base);
define HARDWARE_INTRINSIC_CLASS(flag, isa) \
if (jitFlags.IsSet(JitFlags::flag)) \
opts.setSupportedISA(InstructionSet_##isa);
#include "hwintrinsiclistArm64.h"
There was a problem hiding this comment.
👍 Changing the order of lines would make it clearer.
@CarolEidt Are you also objecting to use of HARDWARE_INTRINSIC_CLASS_WITH_FLAG to remove InstructionSet_Base from the include list.
There was a problem hiding this comment.
OK, I think I get it now - you can't omit InstructionSet_Base from hwintrinsiclistarm64.h because it's included elsewhere where it will be required. So, you need a way to handle that without the flag. I can't think of a better way to do this off the top of my head, but I definitely think that setting InstructionSet_Base first would help in understanding, and then perhaps if you changed HARDWARE_INTRINSIC_CLASS_WITH_FLAG to HARDWARE_INTRINSIC_CLASS_WITH_FLAG_ONLY it would make it clear that it's a boolean control that ignores the one without a flag.
There was a problem hiding this comment.
I removed the HARDWARE_INTRINSIC_CLASS_WITH_FLAG and always handle base manually.
It is simpler and easier to understand.
ff74cd3 to
9874683
Compare
9874683 to
54b5fd0
Compare
CarolEidt
left a comment
There was a problem hiding this comment.
LGTM - thanks for making it clearer!
@CarolEidt @RussKeldorph @dotnet/jit-contrib @dotnet/arm64-contrib PTAL