@@ -82,15 +82,9 @@ static cl::opt<bool>
8282 ForceRetMemPassing (" vc-stack-force-ret-mem" ,
8383 cl::desc (" Pass all stackcall retval via stackmem" ),
8484 cl::init(false ));
85- static cl::opt<bool >
86- DefaultMaskArgsProcessingPolicy (" vc-stack-handle-mask-args" ,
85+ static cl::opt<bool > HandleMaskArgs (" vc-stack-handle-mask-args" ,
8786 cl::desc (" Pass i1 arguments of stackcalls" ),
8887 cl::init(true ));
89- static cl::opt<bool >
90- AbortOnSIMDCF (" vc-prologue-insertion-aborts-on-simdcf" ,
91- cl::desc (" fatal error is reported on simdcf detection by "
92- " prologue insertion pass" ),
93- cl::init(false ));
9488
9589namespace {
9690
@@ -132,7 +126,6 @@ class GenXPrologEpilogInsertion
132126 unsigned ArgRegSize = 0 ;
133127 unsigned RetRegSize = 0 ;
134128
135- bool HandleMaskArgs = true ;
136129 bool UseGlobalMem = true ;
137130
138131 void generateKernelProlog (Function &F);
@@ -256,7 +249,6 @@ bool GenXPrologEpilogInsertion::runOnFunction(Function &F) {
256249 NumCalls = CallsCalculator ().getNumCalls (F);
257250 UseGlobalMem =
258251 F.getParent ()->getModuleFlag (ModuleMD::UseSVMStack) != nullptr ;
259- HandleMaskArgs = DefaultMaskArgsProcessingPolicy;
260252 LLVM_DEBUG (dbgs () << " Visiting all calls in " << F.getName () << " \n " );
261253 visit (F);
262254 LLVM_DEBUG (dbgs () << " Visiting finished\n " );
@@ -281,21 +273,13 @@ void GenXPrologEpilogInsertion::visitCallInst(CallInst &I) {
281273 generateStackCall (&I);
282274 if (!IsIndirectCall) {
283275 auto IID = GenXIntrinsic::getAnyIntrinsicID (I.getCalledFunction ());
284- if (IID == GenXIntrinsic::genx_alloca) {
276+ if (IID == GenXIntrinsic::genx_alloca)
285277 generateAlloca (&I);
286- return ;
287- }
288278 // TODO: conformance fails when we pass i1 args in presence of SIMDCF. Funny
289279 // thing is that ISPC doesn't use goto/join in its recursion tests so
290280 // they're fine (i.e. they're not affected by this option) unlike CM
291- if (IID == GenXIntrinsic::genx_simdcf_goto) {
281+ else if (IID == GenXIntrinsic::genx_simdcf_goto)
292282 HandleMaskArgs = false ;
293- DiagnosticInfoPrologEpilogInsertion DiagErr (
294- I.getFunction ()->getName () + " : simdcf may not be properly supported" ,
295- AbortOnSIMDCF ? DS_Error : DS_Warning);
296- I.getContext ().diagnose (DiagErr);
297- return ;
298- }
299283 }
300284}
301285
0 commit comments