File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -551,8 +551,7 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
551551 // Forcing subroutines/stack-call/indirect-call
552552 bool forceSubroutine = FCtrl == FLAG_FCALL_FORCE_SUBROUTINE;
553553 bool forceStackCall = FCtrl == FLAG_FCALL_FORCE_STACKCALL;
554- bool forceIndirectCall = F->hasFnAttribute (" IndirectlyCalled" ) &&
555- (FCtrl == FLAG_FCALL_FORCE_INDIRECTCALL || F->hasFnAttribute (" IFCALL_BUILTIN" ));
554+ bool forceIndirectCall = (FCtrl == FLAG_FCALL_FORCE_INDIRECTCALL || F->hasFnAttribute (" IFCALL_BUILTIN" ));
556555
557556 if (forceSubroutine || forceStackCall || forceIndirectCall)
558557 {
@@ -561,6 +560,12 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
561560 {
562561 F->addFnAttr (" visaStackCall" );
563562 }
563+ else if (forceIndirectCall)
564+ {
565+ pCtx->m_enableFunctionPointer = true ;
566+ F->addFnAttr (" IndirectlyCalled" );
567+ F->addFnAttr (" visaStackCall" );
568+ }
564569 }
565570 }
566571 }
You can’t perform that action at this time.
0 commit comments