[Mlir-commits] [mlir] 539437e - [mlir] split type conversion to two lines for GCC's sake

Tres Popp llvmlistbot at llvm.org
Mon Jul 26 05:15:58 PDT 2021


Author: Tres Popp
Date: 2021-07-26T14:15:47+02:00
New Revision: 539437e288f2395288a46a550c4c3070c4b16101

URL: https://github.com/llvm/llvm-project/commit/539437e288f2395288a46a550c4c3070c4b16101
DIFF: https://github.com/llvm/llvm-project/commit/539437e288f2395288a46a550c4c3070c4b16101.diff

LOG: [mlir] split type conversion to two lines for GCC's sake

Added: 
    

Modified: 
    mlir/lib/Transforms/BufferDeallocation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Transforms/BufferDeallocation.cpp b/mlir/lib/Transforms/BufferDeallocation.cpp
index 43d654e2d989..65a54931460d 100644
--- a/mlir/lib/Transforms/BufferDeallocation.cpp
+++ b/mlir/lib/Transforms/BufferDeallocation.cpp
@@ -394,7 +394,10 @@ class BufferDeallocation : BufferPlacementTransformationBase {
         auto terminatorOperands = *getMutableRegionBranchSuccessorOperands(
             terminator, region.getRegionNumber());
         // Extract the source value from the current terminator.
-        Value sourceValue = ((OperandRange)terminatorOperands)[operandIndex];
+        // This conversion needs to exist on a separate line due to a bug in
+        // GCC conversion analysis.
+        OperandRange immutableTerminatorOperands = terminatorOperands;
+        Value sourceValue = immutableTerminatorOperands[operandIndex];
         // Create a new clone at the current location of the terminator.
         Value clone = introduceCloneBuffers(sourceValue, terminator);
         // Wire clone and terminator operand.


        


More information about the Mlir-commits mailing list