================
@@ -2251,11 +2252,33 @@ void 
LoweringPreparePass::lowerStoreOfConstAggregate(cir::StoreOp op) {
     constOp.erase();
 }
 
+// Raised ops carry the original callee and its call attributes, so lowering
+// them back rebuilds an equivalent plain call.
+static void restoreCallAttrs(cir::CallOp call, mlir::Operation *raised) {
+  for (mlir::NamedAttribute attr : raised->getAttrs())
+    if (attr.getName() != "original_fn")
+      call->setAttr(attr.getName(), attr.getValue());
+}
+
+void LoweringPreparePass::lowerStdFindOp(cir::StdFindOp op) {
----------------
HendrikHuebner wrote:

Could all StdOps be lowered like this by default? Otherwise, I imagine this 
function will be duplicated quite often once more operations are added.

https://github.com/llvm/llvm-project/pull/208854
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to