[llvm-commits] [llvm] r98490 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Nick Lewycky
nicholas at mxc.ca
Sun Mar 14 09:41:06 PDT 2010
Bill Wendling wrote:
> Author: void
> Date: Sun Mar 14 05:40:28 2010
> New Revision: 98490
>
> URL: http://llvm.org/viewvc/llvm-project?rev=98490&view=rev
> Log:
> Make returns more consistent with others.
>
> Modified:
> llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
>
> Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=98490&r1=98489&r2=98490&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Sun Mar 14 05:40:28 2010
> @@ -1826,7 +1826,7 @@
> // switch.
> if (BasicBlock *OnlyPred = BB->getSinglePredecessor())
> if (SimplifyEqualityComparisonWithOnlyPredecessor(BI, OnlyPred))
> - return SimplifyCFG(BB) || 1;
> + return SimplifyCFG(BB) | true;
Isn't this still awkward wording? How about one line to call
SimplifyCFG(BB) and one to return true?
Nick
>
> // This block must be empty, except for the setcond inst, if it exists.
> // Ignore dbg intrinsics.
> @@ -1860,7 +1860,7 @@
> // branches to us and one of our successors, fold the setcc into the
> // predecessor and use logical operations to pick the right destination.
> if (FoldBranchToCommonDest(BI))
> - return SimplifyCFG(BB) | 1;
> + return SimplifyCFG(BB) | true;
>
>
> // Scan predecessor blocks for conditional branches.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list