Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update xarch to track more instruction metadata as flags #83473

Merged
merged 11 commits into from
Mar 19, 2023
Merged
10 changes: 5 additions & 5 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2348,18 +2348,18 @@ void Compiler::compSetProcessor()
#ifdef TARGET_XARCH
if (!compIsForInlining())
{
if (canUseEvexEncoding())
{
codeGen->GetEmitter()->SetUseEvexEncoding(true);
// TODO-XArch-AVX512 : Revisit other flags to be set once avx512 instructions are added.
}
if (canUseVexEncoding())
{
codeGen->GetEmitter()->SetUseVEXEncoding(true);
// Assume each JITted method does not contain AVX instruction at first
codeGen->GetEmitter()->SetContainsAVX(false);
codeGen->GetEmitter()->SetContains256bitOrMoreAVX(false);
}
if (canUseEvexEncoding())
{
codeGen->GetEmitter()->SetUseEvexEncoding(true);
// TODO-XArch-AVX512 : Revisit other flags to be set once avx512 instructions are added.
}
}
#endif // TARGET_XARCH
}
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -9197,6 +9197,13 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#ifdef TARGET_XARCH
bool canUseVexEncoding() const
{
#ifdef DEBUG
if (JitConfig.JitForceEVEXEncoding())
{
return true;
}
#endif // DEBUG

return compOpportunisticallyDependsOn(InstructionSet_AVX);
}

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/emit.h
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ class emitter
}
#endif // TARGET_LOONGARCH64

emitAttr idOpSize()
emitAttr idOpSize() const
{
return emitDecodeSize(_idOpSize);
}
Expand Down
Loading