[Mlir-commits] [mlir] 5ece211 - [MLIR] Work around an ICE in GCC 7.

Benjamin Kramer llvmlistbot at llvm.org
Mon Nov 2 13:48:23 PST 2020


Author: Benjamin Kramer
Date: 2020-11-02T22:46:19+01:00
New Revision: 5ece2115d85326e3b24336a7ccb4c191932ccb4a

URL: https://github.com/llvm/llvm-project/commit/5ece2115d85326e3b24336a7ccb4c191932ccb4a
DIFF: https://github.com/llvm/llvm-project/commit/5ece2115d85326e3b24336a7ccb4c191932ccb4a.diff

LOG: [MLIR] Work around an ICE in GCC 7.

Looks like we have a blind spot in the testing matrix.

AsyncRegionRewriter.cpp: In member function ‘virtual void {anonymous}::GpuAsyncRegionPass::runOnFunction()’:
AsyncRegionRewriter.cpp:113:16: internal compiler error: in replace_placeholders_r, at cp/tree.c:2804
   if (getFunction()
       ~~~~~~~~~~~~~
           .getRegion()
           ~~~~~~~~~~~~
           .walk(Callback{OpBuilder{&getContext()}})
           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Added: 
    

Modified: 
    mlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp b/mlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
index 74b695eec18e..917c27714b4a 100644
--- a/mlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
@@ -108,10 +108,8 @@ struct GpuAsyncRegionPass::Callback {
 // inserts the necessary synchronization (as gpu.wait ops). Assumes sequential
 // execution semantics and that no GPU ops are asynchronous yet.
 void GpuAsyncRegionPass::runOnFunction() {
-  if (getFunction()
-          .getRegion()
-          .walk(Callback{OpBuilder(&getContext())})
-          .wasInterrupted())
+  Callback callback{OpBuilder(&getContext())};
+  if (getFunction().getRegion().walk(callback).wasInterrupted())
     return signalPassFailure();
 }
 


        


More information about the Mlir-commits mailing list