We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00897b8 commit 54b1e87Copy full SHA for 54b1e87
clang/lib/CodeGen/CGHLSLRuntime.cpp
@@ -345,6 +345,11 @@ void clang::CodeGen::CGHLSLRuntime::setHLSLEntryAttributes(
345
WaveSizeAttr->getPreferred());
346
Fn->addFnAttr(WaveSizeKindStr, WaveSizeStr);
347
}
348
+ // HLSL entry functions are materialized for module functions with
349
+ // HLSLShaderAttr attribute. SetLLVMFunctionAttributesForDefinition called
350
+ // later in the compiler-flow for such module functions is not aware of and
351
+ // hence not able to set attributes of the newly materialized entry functions.
352
+ // So, set attributes of entry function here, as appropriate.
353
if (CGM.getCodeGenOpts().OptimizationLevel == 0) {
354
Fn->addFnAttr(llvm::Attribute::OptimizeNone);
355
0 commit comments