Skip to content

Commit ba37b07

Browse files
committed
Aggressively transfer values of bytecode constants in loop prepass
1 parent fdf6f4a commit ba37b07

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Backend/GlobOpt.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5497,6 +5497,18 @@ GlobOpt::IsPrepassSrcValueInfoPrecise(IR::Opnd *const src, Value *const srcValue
54975497
*isSafeToTransferInPrepass = false;
54985498
}
54995499

5500+
if (src->IsAddrOpnd() &&
5501+
srcValue->GetValueInfo()->GetSymStore() &&
5502+
srcValue->GetValueInfo()->GetSymStore()->IsStackSym() &&
5503+
srcValue->GetValueInfo()->GetSymStore()->AsStackSym()->IsFromByteCodeConstantTable())
5504+
{
5505+
if (isSafeToTransferInPrepass)
5506+
{
5507+
*isSafeToTransferInPrepass = false;
5508+
}
5509+
return true;
5510+
}
5511+
55005512
if (!src->IsRegOpnd() || !srcValue)
55015513
{
55025514
return false;

0 commit comments

Comments
 (0)