[PATCH] D51642: [LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 09:48:44 PDT 2018


aykevl created this revision.
aykevl added a reviewer: whitequark.
Herald added subscribers: llvm-commits, modocache, mehdi_amini.
Herald added a reviewer: deadalnix.

This patch adds bindings to C and Go for addCoroutinePassesToExtensionPoints, which is used to add coroutine passes to the correct locations in PassManagerBuilder.


Repository:
  rL LLVM

https://reviews.llvm.org/D51642

Files:
  bindings/go/llvm/transforms_pmbuilder.go
  include/llvm-c/Transforms/PassManagerBuilder.h
  lib/Transforms/IPO/PassManagerBuilder.cpp


Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp
+++ lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -30,6 +30,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"
+#include "llvm/Transforms/Coroutines.h"
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Transforms/IPO/ForceFunctionAttrs.h"
 #include "llvm/Transforms/IPO/FunctionAttrs.h"
@@ -1053,3 +1054,9 @@
 
   Builder->populateLTOPassManager(*LPM);
 }
+
+void
+LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB) {
+  PassManagerBuilder *Builder = unwrap(PMB);
+  addCoroutinePassesToExtensionPoints(*Builder);
+}
Index: include/llvm-c/Transforms/PassManagerBuilder.h
===================================================================
--- include/llvm-c/Transforms/PassManagerBuilder.h
+++ include/llvm-c/Transforms/PassManagerBuilder.h
@@ -79,6 +79,9 @@
                                                   LLVMBool Internalize,
                                                   LLVMBool RunInliner);
 
+/** See llvm::addCoroutinePassesToExtensionPoints. */
+void LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(LLVMPassManagerBuilderRef PMB);
+
 /**
  * @}
  */
Index: bindings/go/llvm/transforms_pmbuilder.go
===================================================================
--- bindings/go/llvm/transforms_pmbuilder.go
+++ bindings/go/llvm/transforms_pmbuilder.go
@@ -66,3 +66,7 @@
 func (pmb PassManagerBuilder) UseInlinerWithThreshold(threshold uint) {
 	C.LLVMPassManagerBuilderUseInlinerWithThreshold(pmb.C, C.uint(threshold))
 }
+
+func (pmb PassManagerBuilder) AddCoroutinePassesToExtensionPoints() {
+	C.LLVMPassManagerBuilderAddCoroutinePassesToExtensionPoints(pmb.C);
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51642.163854.patch
Type: text/x-patch
Size: 1907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/117e5ad6/attachment.bin>


More information about the llvm-commits mailing list