From lattner at cs.uiuc.edu Sun Oct 26 23:10:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Oct 26 23:10:02 2003 Subject: [llvm-commits] CVS: llvm/utils/emacs/llvm-mode.el Message-ID: <200310270509.XAA13691@zion.cs.uiuc.edu> Changes in directory llvm/utils/emacs: llvm-mode.el updated: 1.10 -> 1.11 --- Log message: Make sure to syntax hilight the 'unwind' keyword! --- Diffs of the changes: (+1 -1) Index: llvm/utils/emacs/llvm-mode.el diff -u llvm/utils/emacs/llvm-mode.el:1.10 llvm/utils/emacs/llvm-mode.el:1.11 --- llvm/utils/emacs/llvm-mode.el:1.10 Tue Oct 21 10:37:07 2003 +++ llvm/utils/emacs/llvm-mode.el Sun Oct 26 23:09:11 2003 @@ -33,7 +33,7 @@ ;; Special instructions '("phi\\|call\\|cast\\|to\\|shl\\|shr\\|vaarg\\|vanext" . font-lock-keyword-face) ;; Control instructions - '("ret\\|br\\|switch\\|invoke" . font-lock-keyword-face) + '("ret\\|br\\|switch\\|invoke\\|unwind" . font-lock-keyword-face) ;; Memory operators '("malloc\\|alloca\\|free\\|load\\|store\\|getelementptr" . font-lock-keyword-face) ) From lattner at cs.uiuc.edu Sun Oct 26 23:10:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Oct 26 23:10:04 2003 Subject: [llvm-commits] CVS: llvm/utils/vim/llvm.vim Message-ID: <200310270509.XAA13700@zion.cs.uiuc.edu> Changes in directory llvm/utils/vim: llvm.vim updated: 1.8 -> 1.9 --- Log message: Make sure to syntax hilight the 'unwind' keyword! --- Diffs of the changes: (+1 -1) Index: llvm/utils/vim/llvm.vim diff -u llvm/utils/vim/llvm.vim:1.8 llvm/utils/vim/llvm.vim:1.9 --- llvm/utils/vim/llvm.vim:1.8 Tue Oct 21 10:37:09 2003 +++ llvm/utils/vim/llvm.vim Sun Oct 26 23:09:15 2003 @@ -21,7 +21,7 @@ syn keyword llvmStatement setne seteq setlt setgt setle setge syn keyword llvmStatement phi call cast to shl shr vaarg vanext -syn keyword llvmStatement ret br switch invoke +syn keyword llvmStatement ret br switch invoke unwind syn keyword llvmStatement malloc alloca free load store getelementptr syn keyword llvmStatement begin end true false From lattner at cs.uiuc.edu Sun Oct 26 23:14:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Oct 26 23:14:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll Message-ID: <200310270513.XAA13760@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Inline: 2003-10-26-InlineInvokeExceptionDestPhi.ll added (r1.1) --- Log message: New testcase. --- Diffs of the changes: (+19 -0) Index: llvm/test/Regression/Transforms/Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll diff -c /dev/null llvm/test/Regression/Transforms/Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll:1.1 *** /dev/null Sun Oct 26 23:13:57 2003 --- llvm/test/Regression/Transforms/Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll Sun Oct 26 23:13:47 2003 *************** *** 0 **** --- 1,19 ---- + ; The inliner is breaking inlining invoke instructions where there is a PHI + ; node in the exception destination, and the inlined function contains an + ; unwind instruction. + + ; RUN: llvm-as < %s | opt -inline -disable-output + + implementation + + linkonce void %foo() { + unwind + } + + int %test() { + BB1: + invoke void %foo() to label %Cont except label %Cont + Cont: + %A = phi int [ 0, %BB1], [0, %BB1] + ret int %A + } From lattner at cs.uiuc.edu Sun Oct 26 23:34:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Oct 26 23:34:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200310270533.XAA14997@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.14 -> 1.15 --- Log message: Get the list of PHI node values before the basic block is split. Also, add PHI node entries for unwind instructions just like for call instructions which became invokes! This fixes PR57, tested by Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll --- Diffs of the changes: (+16 -9) Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.14 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.15 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.14 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Sun Oct 26 23:33:09 2003 @@ -60,6 +60,15 @@ if (InvokeInst *II = dyn_cast(TheCall)) { InvokeDest = II->getExceptionalDest(); + // If there are PHI nodes in the exceptional destination block, we need to + // keep track of which values came into them from this invoke, then remove + // the entry for this block. + for (BasicBlock::iterator I = InvokeDest->begin(); + PHINode *PN = dyn_cast(I); ++I) { + // Save the value to use for this edge... + InvokeDestPHIValues.push_back(PN->getIncomingValueForBlock(OrigBB)); + } + // Add an unconditional branch to make this look like the CallInst case... BranchInst *NewBr = new BranchInst(II->getNormalDest(), TheCall); @@ -69,15 +78,6 @@ AfterCallBB = OrigBB->splitBasicBlock(NewBr, CalledFunc->getName()+".entry"); - // If there are PHI nodes in the exceptional destination block, we need to - // keep track of which values came into them from this invoke, then remove - // the entry for this block. - for (BasicBlock::iterator I = InvokeDest->begin(); - PHINode *PN = dyn_cast(I); ++I) { - // Save the value to use for this edge... - InvokeDestPHIValues.push_back(PN->getIncomingValueForBlock(AfterCallBB)); - } - // Remove (unlink) the InvokeInst from the function... OrigBB->getInstList().remove(TheCall); @@ -240,6 +240,13 @@ // Delete the unwind instruction! UI->getParent()->getInstList().pop_back(); + + // Update any PHI nodes in the exceptional block to indicate that + // there is now a new entry in them. + unsigned i = 0; + for (BasicBlock::iterator I = InvokeDest->begin(); + PHINode *PN = dyn_cast(I); ++I, ++i) + PN->addIncoming(InvokeDestPHIValues[i], BB); } } From lattner at cs.uiuc.edu Sun Oct 26 23:42:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Oct 26 23:42:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200310270541.XAA18392@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.13 -> 1.14 --- Log message: Update release notes --- Diffs of the changes: (+3 -3) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.13 llvm/docs/ReleaseNotes.html:1.14 --- llvm/docs/ReleaseNotes.html:1.13 Sun Oct 26 19:31:14 2003 +++ llvm/docs/ReleaseNotes.html Sun Oct 26 23:41:39 2003 @@ -70,10 +70,10 @@
  • temp
  • -In this release, the following bugs were fixed:

    +In this release, the following bugs in the previous release were fixed:

      -
    1. temp
    2. +
    3. [inliner] Inlining invoke with PHI in unwind target is broken
    4. temp
    5. temp

    @@ -364,6 +364,6 @@ Maintained By: The LLVM Team
    -Last modified: Sun Oct 26 19:30:33 CST 2003 +Last modified: Sun Oct 26 23:41:10 CST 2003