[PATCH] D102131: [polly] In IslNodeBuilder::createMark() use isl::noexception bindings [NFC]

Saheed Bolarinwa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 9 10:01:15 PDT 2021


refactormyself updated this revision to Diff 343916.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102131/new/

https://reviews.llvm.org/D102131

Files:
  polly/include/polly/CodeGen/IslNodeBuilder.h
  polly/lib/CodeGen/IslNodeBuilder.cpp


Index: polly/lib/CodeGen/IslNodeBuilder.cpp
===================================================================
--- polly/lib/CodeGen/IslNodeBuilder.cpp
+++ polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -404,10 +404,10 @@
   isl_ast_node_free(User);
 }
 
-void IslNodeBuilder::createMark(__isl_take isl_ast_node *Node) {
-  auto *Id = isl_ast_node_mark_get_id(Node);
-  auto Child = isl_ast_node_mark_get_node(Node);
-  isl_ast_node_free(Node);
+void IslNodeBuilder::createMark(isl::ast_node Node) {
+  auto *Id = isl_ast_node_mark_get_id(Node.get());
+  auto *Child = isl_ast_node_mark_get_node(Node.get());
+
   // If a child node of a 'SIMD mark' is a loop that has a single iteration,
   // it will be optimized away and we should skip it.
   if (strcmp(isl_id_get_name(Id), "SIMD") == 0 &&
@@ -1031,7 +1031,7 @@
   case isl_ast_node_error:
     llvm_unreachable("code generation error");
   case isl_ast_node_mark:
-    createMark(Node);
+    createMark(isl::manage(Node));
     return;
   case isl_ast_node_for:
     createFor(Node);
Index: polly/include/polly/CodeGen/IslNodeBuilder.h
===================================================================
--- polly/include/polly/CodeGen/IslNodeBuilder.h
+++ polly/include/polly/CodeGen/IslNodeBuilder.h
@@ -279,7 +279,7 @@
   /// currently not special handling for marker nodes implemented.
   ///
   /// @param Mark The node we generate code for.
-  virtual void createMark(__isl_take isl_ast_node *Marker);
+  virtual void createMark(isl::ast_node Marker);
 
   virtual void createFor(__isl_take isl_ast_node *For);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102131.343916.patch
Type: text/x-patch
Size: 1569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210509/833926e3/attachment.bin>


More information about the llvm-commits mailing list