@@ -2066,6 +2066,8 @@ static constexpr std::array kExplicitAttributes{
20662066 StringLiteral (" denormal-fp-math-f32" ),
20672067 StringLiteral (" fp-contract" ),
20682068 StringLiteral (" frame-pointer" ),
2069+ StringLiteral (" instrument-function-entry" ),
2070+ StringLiteral (" instrument-function-exit" ),
20692071 StringLiteral (" no-infs-fp-math" ),
20702072 StringLiteral (" no-nans-fp-math" ),
20712073 StringLiteral (" no-signed-zeros-fp-math" ),
@@ -2220,6 +2222,16 @@ void ModuleImport::processFunctionAttributes(llvm::Function *func,
22202222 attr.isStringAttribute ())
22212223 funcOp.setApproxFuncFpMath (attr.getValueAsBool ());
22222224
2225+ if (llvm::Attribute attr = func->getFnAttribute (" instrument-function-entry" );
2226+ attr.isStringAttribute ())
2227+ funcOp.setInstrumentFunctionEntry (
2228+ StringAttr::get (context, attr.getValueAsString ()));
2229+
2230+ if (llvm::Attribute attr = func->getFnAttribute (" instrument-function-exit" );
2231+ attr.isStringAttribute ())
2232+ funcOp.setInstrumentFunctionExit (
2233+ StringAttr::get (context, attr.getValueAsString ()));
2234+
22232235 if (llvm::Attribute attr = func->getFnAttribute (" no-signed-zeros-fp-math" );
22242236 attr.isStringAttribute ())
22252237 funcOp.setNoSignedZerosFpMath (attr.getValueAsBool ());
0 commit comments