area-CodeGen-coreclrhelp wanted
仓库指标
- Star
- (17,886 star)
- PR 合并指标
- (平均合并 12天 11小时) (30 天内合并 661 个 PR)
描述
The following code in Compiler::WtdRefCntCmp() (and also in the currently-unused Compiler::RefCntCmp) is only for non-ARM targets. This seems strange and unexplained. Should the #ifndef be removed to make it all platform? This causes exactly one diff in ARM altjit asm diffs over the frameworks, a case with a huge function where a float variable ends up on the stack instead of in registers, causing loads and stores where they didn't exist previously.
Or, should the code be removed entirely, because it is not applicable or desirable with the current system?
#ifndef _TARGET_ARM_
// ARM-TODO: this was disabled for ARM under !FEATURE_FP_REGALLOC; it was probably a left-over from
// legacy backend. It should be enabled and verified.
/* Force integer candidates to sort above float candidates */
bool isFloat1 = isFloatRegType(dsc1->lvType);
bool isFloat2 = isFloatRegType(dsc2->lvType);
if (isFloat1 != isFloat2)
{
if (weight2 && isFloat1)
{
return +1;
}
if (weight1 && isFloat2)
{
return -1;
}
}
category:cq theme:basic-cq skill-level:intermediate cost:small impact:small