[llvm] r359462 - [BlockExtractor] Change the basic block separator from ', ' to '; '

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 09:14:00 PDT 2019


Author: qcolombet
Date: Mon Apr 29 09:14:00 2019
New Revision: 359462

URL: http://llvm.org/viewvc/llvm-project?rev=359462&view=rev
Log:
[BlockExtractor] Change the basic block separator from ',' to ';'

This change aims at making the file format be compatible with the
way LLVM handles command line options.

Differential Revision: https://reviews.llvm.org/D60970

Modified:
    llvm/trunk/lib/Transforms/IPO/BlockExtractor.cpp
    llvm/trunk/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll

Modified: llvm/trunk/lib/Transforms/IPO/BlockExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/BlockExtractor.cpp?rev=359462&r1=359461&r2=359462&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/BlockExtractor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/BlockExtractor.cpp Mon Apr 29 09:14:00 2019
@@ -94,7 +94,7 @@ void BlockExtractor::loadFile() {
     if (LineSplit.empty())
       continue;
     SmallVector<StringRef, 4> BBNames;
-    LineSplit[1].split(BBNames, ',', /*MaxSplit=*/-1,
+    LineSplit[1].split(BBNames, ';', /*MaxSplit=*/-1,
                        /*KeepEmpty=*/false);
     if (BBNames.empty())
       report_fatal_error("Missing bbs name");

Modified: llvm/trunk/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll?rev=359462&r1=359461&r2=359462&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll (original)
+++ llvm/trunk/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll Mon Apr 29 09:14:00 2019
@@ -1,8 +1,8 @@
 ; Extract the 'if', 'then', and 'else' blocks into the same function.
-; RUN: echo 'foo if,then,else' > %t
+; RUN: echo 'foo if;then;else' > %t
 ; Make sure we can still extract a single basic block
 ; RUN: echo 'foo end' >> %t
-; RUN: echo 'bar bb14,bb20' >> %t
+; RUN: echo 'bar bb14;bb20' >> %t
 ; RUN: opt -S -extract-blocks -extract-blocks-file=%t %s | FileCheck %s
 
 ; CHECK-LABEL: foo




More information about the llvm-commits mailing list