[llvm-commits] [llvm] r48123 - in /llvm/trunk: lib/AsmParser/LLLexer.cpp lib/AsmParser/llvmAsmParser.y lib/Transforms/IPO/PruneEH.cpp lib/Transforms/Utils/CloneFunction.cpp lib/Transforms/Utils/CloneTrace.cpp lib/Transforms/Utils/SimplifyCFG.cpp lib/VMCore/AsmWriter.cpp test/Feature/unwindto.ll test/Transforms/Inline/unwindto.ll test/Transforms/PruneEH/unwindto.ll test/Transforms/SimplifyCFG/unwindto.ll
Nick Lewycky
nicholas at mxc.ca
Sun Mar 9 19:20:00 PDT 2008
Author: nicholas
Date: Sun Mar 9 21:20:00 2008
New Revision: 48123
URL: http://llvm.org/viewvc/llvm-project?rev=48123&view=rev
Log:
Turn unwind_to into "unwinds to".
Modified:
llvm/trunk/lib/AsmParser/LLLexer.cpp
llvm/trunk/lib/AsmParser/llvmAsmParser.y
llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
llvm/trunk/lib/Transforms/Utils/CloneTrace.cpp
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/trunk/lib/VMCore/AsmWriter.cpp
llvm/trunk/test/Feature/unwindto.ll
llvm/trunk/test/Transforms/Inline/unwindto.ll
llvm/trunk/test/Transforms/PruneEH/unwindto.ll
llvm/trunk/test/Transforms/SimplifyCFG/unwindto.ll
Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLLexer.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLLexer.cpp Sun Mar 9 21:20:00 2008
@@ -474,7 +474,7 @@
KEYWORD("asm", ASM_TOK);
KEYWORD("sideeffect", SIDEEFFECT);
KEYWORD("gc", GC);
- KEYWORD("unwind_to", UNWIND_TO);
+ KEYWORD("unwinds", UNWINDS);
KEYWORD("cc", CC_TOK);
KEYWORD("ccc", CCC_TOK);
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Sun Mar 9 21:20:00 2008
@@ -1064,7 +1064,7 @@
%token OPAQUE EXTERNAL TARGET TRIPLE ALIGN ADDRSPACE
%token DEPLIBS CALL TAIL ASM_TOK MODULE SIDEEFFECT
%token CC_TOK CCC_TOK FASTCC_TOK COLDCC_TOK X86_STDCALLCC_TOK X86_FASTCALLCC_TOK
-%token DATALAYOUT UNWIND_TO
+%token DATALAYOUT UNWINDS
%type <UIntVal> OptCallingConv
%type <ParamAttrs> OptParamAttrs ParamAttr
%type <ParamAttrs> OptFuncAttrs FuncAttr
@@ -2569,8 +2569,8 @@
$$ = defineBBVal(ValID::createLocalID(CurFun.NextValNum), 0);
CHECK_FOR_ERROR
}
- | UNWIND_TO ValueRef { // Only the unwind to block
- $$ = defineBBVal(ValID::createLocalID(CurFun.NextValNum), getBBVal($2));
+ | UNWINDS TO ValueRef { // Only the unwind to block
+ $$ = defineBBVal(ValID::createLocalID(CurFun.NextValNum), getBBVal($3));
CHECK_FOR_ERROR
}
| LABELSTR { // Labelled (named) basic block
@@ -2578,8 +2578,8 @@
delete $1;
CHECK_FOR_ERROR
}
- | LABELSTR UNWIND_TO ValueRef {
- $$ = defineBBVal(ValID::createLocalName(*$1), getBBVal($3));
+ | LABELSTR UNWINDS TO ValueRef {
+ $$ = defineBBVal(ValID::createLocalName(*$1), getBBVal($4));
delete $1;
CHECK_FOR_ERROR
};
Modified: llvm/trunk/lib/Transforms/IPO/PruneEH.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PruneEH.cpp?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PruneEH.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PruneEH.cpp Sun Mar 9 21:20:00 2008
@@ -32,7 +32,7 @@
STATISTIC(NumRemoved, "Number of invokes removed");
STATISTIC(NumUnreach, "Number of noreturn calls optimized");
-STATISTIC(NumBBUnwind, "Number of unwind_to removed from blocks");
+STATISTIC(NumBBUnwind, "Number of unwind dest removed from blocks");
namespace {
struct VISIBILITY_HIDDEN PruneEH : public CallGraphSCCPass {
Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Sun Mar 9 21:20:00 2008
@@ -105,7 +105,7 @@
//
for (Function::iterator BB = cast<BasicBlock>(ValueMap[OldFunc->begin()]),
BE = NewFunc->end(); BB != BE; ++BB) {
- // Fix up the unwind_to label.
+ // Fix up the unwind destination.
if (BasicBlock *UnwindDest = BB->getUnwindDest())
BB->setUnwindDest(cast<BasicBlock>(ValueMap[UnwindDest]));
Modified: llvm/trunk/lib/Transforms/Utils/CloneTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneTrace.cpp?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CloneTrace.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/CloneTrace.cpp Sun Mar 9 21:20:00 2008
@@ -69,7 +69,7 @@
for (std::vector<BasicBlock *>::const_iterator BB = clonedTrace.begin(),
BE = clonedTrace.end(); BB != BE; ++BB) {
- //Remap the unwind_to label
+ //Remap the unwind destination
if (BasicBlock *UnwindDest = (*BB)->getUnwindDest())
(*BB)->setUnwindDest(cast<BasicBlock>(ValueMap[UnwindDest]));
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Sun Mar 9 21:20:00 2008
@@ -1829,7 +1829,7 @@
// Move all definitions in the successor to the predecessor.
OnlyPred->getInstList().splice(OnlyPred->end(), BB->getInstList());
- // Move the unwind_to block
+ // Move the unwind destination block
if (!OnlyPred->getUnwindDest() && BB->getUnwindDest())
OnlyPred->setUnwindDest(BB->getUnwindDest());
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Sun Mar 9 21:20:00 2008
@@ -1169,7 +1169,7 @@
if (BB->hasName())
Out << ' ';
- Out << "unwind_to";
+ Out << "unwinds to";
writeOperand(unwindDest, false);
}
Modified: llvm/trunk/test/Feature/unwindto.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/unwindto.ll?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/test/Feature/unwindto.ll (original)
+++ llvm/trunk/test/Feature/unwindto.ll Sun Mar 9 21:20:00 2008
@@ -4,7 +4,7 @@
; http://nondot.org/sabre/LLVMNotes/ExceptionHandlingChanges.txt
define i1 @test1(i8 %i, i8 %j) {
-entry: unwind_to %target
+entry: unwinds to %target
%tmp = sub i8 %i, %j ; <i8> [#uses=1]
%b = icmp eq i8 %tmp, 0 ; <i1> [#uses=1]
ret i1 %b
@@ -15,7 +15,7 @@
define i1 @test2(i8 %i, i8 %j) {
entry:
br label %0
-unwind_to %1
+unwinds to %1
%tmp = sub i8 %i, %j ; <i8> [#uses=1]
%b = icmp eq i8 %tmp, 0 ; <i1> [#uses=1]
ret i1 %b
@@ -26,11 +26,11 @@
define i1 @test3(i8 %i, i8 %j) {
entry:
br label %0
-unwind_to %1
+unwinds to %1
%tmp = sub i8 %i, %j ; <i8> [#uses=1]
%b = icmp eq i8 %tmp, 0 ; <i1> [#uses=1]
ret i1 %b
-unwind_to %0
+unwinds to %0
ret i1 false
}
@@ -38,7 +38,7 @@
%tmp = sub i8 %i, %j ; <i8> [#uses=1]
%b = icmp eq i8 %tmp, 0 ; <i1> [#uses=1]
br label %1
-unwind_to %1
+unwinds to %1
ret i1 false
}
@@ -49,16 +49,16 @@
define void @test6() {
entry:
br label %unwind
-unwind: unwind_to %unwind
+unwind: unwinds to %unwind
unwind
}
define i8 @test7(i1 %b) {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
br i1 %b, label %cond_true, label %cond_false
-cond_true: unwind_to %cleanup
+cond_true: unwinds to %cleanup
br label %cleanup
-cond_false: unwind_to %cleanup
+cond_false: unwinds to %cleanup
br label %cleanup
cleanup:
%x = phi i8 [0, %entry], [1, %cond_true], [1, %cond_true],
Modified: llvm/trunk/test/Transforms/Inline/unwindto.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/unwindto.ll?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Inline/unwindto.ll (original)
+++ llvm/trunk/test/Transforms/Inline/unwindto.ll Sun Mar 9 21:20:00 2008
@@ -5,7 +5,7 @@
}
define i32 @f1() {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
call void @g()
ret i32 0
cleanup:
Modified: llvm/trunk/test/Transforms/PruneEH/unwindto.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PruneEH/unwindto.ll?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/PruneEH/unwindto.ll (original)
+++ llvm/trunk/test/Transforms/PruneEH/unwindto.ll Sun Mar 9 21:20:00 2008
@@ -1,11 +1,11 @@
-; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep unwind_to
+; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep {unwinds to}
define i8 @test7(i1 %b) {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
br i1 %b, label %cond_true, label %cond_false
-cond_true: unwind_to %cleanup
+cond_true: unwinds to %cleanup
br label %cleanup
-cond_false: unwind_to %cleanup
+cond_false: unwinds to %cleanup
br label %cleanup
cleanup:
%x = phi i8 [0, %entry], [1, %cond_true], [1, %cond_true],
Modified: llvm/trunk/test/Transforms/SimplifyCFG/unwindto.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/unwindto.ll?rev=48123&r1=48122&r2=48123&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/unwindto.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/unwindto.ll Sun Mar 9 21:20:00 2008
@@ -1,14 +1,14 @@
-; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep unwind_to | count 3
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep {unwinds to} | count 3
declare void @g(i32)
define i32 @f1() {
entry:
br label %bb1
-bb1: unwind_to %cleanup1
+bb1: unwinds to %cleanup1
call void @g(i32 0)
br label %bb2
-bb2: unwind_to %cleanup2
+bb2: unwinds to %cleanup2
call void @g(i32 1)
br label %exit
exit:
@@ -20,22 +20,22 @@
}
define i32 @f2() {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
br label %bb1
-bb1: unwind_to %cleanup
+bb1: unwinds to %cleanup
br label %bb2
-bb2: unwind_to %cleanup
+bb2: unwinds to %cleanup
br label %bb3
bb3:
br label %bb4
-bb4: unwind_to %cleanup
+bb4: unwinds to %cleanup
ret i32 0
cleanup:
ret i32 1
}
define i32 @f3() {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
call void @g(i32 0)
ret i32 0
cleanup:
@@ -43,7 +43,7 @@
}
define i32 @f4() {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
call void @g(i32 0)
br label %cleanup
cleanup:
@@ -51,7 +51,7 @@
}
define i32 @f5() {
-entry: unwind_to %cleanup
+entry: unwinds to %cleanup
call void @g(i32 0)
br label %other
other:
More information about the llvm-commits
mailing list