@@ -2147,6 +2147,8 @@ static constexpr std::array kExplicitAttributes{
2147
2147
StringLiteral (" denormal-fp-math-f32" ),
2148
2148
StringLiteral (" fp-contract" ),
2149
2149
StringLiteral (" frame-pointer" ),
2150
+ StringLiteral (" instrument-function-entry" ),
2151
+ StringLiteral (" instrument-function-exit" ),
2150
2152
StringLiteral (" no-infs-fp-math" ),
2151
2153
StringLiteral (" no-nans-fp-math" ),
2152
2154
StringLiteral (" no-signed-zeros-fp-math" ),
@@ -2302,6 +2304,16 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
2302
2304
attr.isStringAttribute ())
2303
2305
funcOp.setApproxFuncFpMath (attr.getValueAsBool ());
2304
2306
2307
+ if (llvm::Attribute attr = func->getFnAttribute (" instrument-function-entry" );
2308
+ attr.isStringAttribute ())
2309
+ funcOp.setInstrumentFunctionEntry (
2310
+ StringAttr::get (context, attr.getValueAsString ()));
2311
+
2312
+ if (llvm::Attribute attr = func->getFnAttribute (" instrument-function-exit" );
2313
+ attr.isStringAttribute ())
2314
+ funcOp.setInstrumentFunctionExit (
2315
+ StringAttr::get (context, attr.getValueAsString ()));
2316
+
2305
2317
if (llvm::Attribute attr = func->getFnAttribute (" no-signed-zeros-fp-math" );
2306
2318
attr.isStringAttribute ())
2307
2319
funcOp.setNoSignedZerosFpMath (attr.getValueAsBool ());
0 commit comments