[llvm] r253733 - Add some constantness to GetSuccessorNumber().
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 18:00:05 PST 2015
Thanks!
On Nov 20, 2015 3:04 PM, "Rong Xu via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:
> Author: xur
> Date: Fri Nov 20 17:02:06 2015
> New Revision: 253733
>
> URL: http://llvm.org/viewvc/llvm-project?rev=253733&view=rev
> Log:
> Add some constantness to GetSuccessorNumber().
>
> Modified:
> llvm/trunk/include/llvm/Analysis/CFG.h
> llvm/trunk/lib/Analysis/CFG.cpp
>
> Modified: llvm/trunk/include/llvm/Analysis/CFG.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CFG.h?rev=253733&r1=253732&r2=253733&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/CFG.h (original)
> +++ llvm/trunk/include/llvm/Analysis/CFG.h Fri Nov 20 17:02:06 2015
> @@ -40,7 +40,7 @@ void FindFunctionBackedges(
> /// Search for the specified successor of basic block BB and return its
> position
> /// in the terminator instruction's list of successors. It is an error
> to call
> /// this with a block that is not a successor.
> -unsigned GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ);
> +unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ);
>
> /// Return true if the specified edge is a critical edge. Critical edges
> are
> /// edges from a block with multiple successors to a block with multiple
>
> Modified: llvm/trunk/lib/Analysis/CFG.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFG.cpp?rev=253733&r1=253732&r2=253733&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Analysis/CFG.cpp (original)
> +++ llvm/trunk/lib/Analysis/CFG.cpp Fri Nov 20 17:02:06 2015
> @@ -69,8 +69,9 @@ void llvm::FindFunctionBackedges(const F
> /// and return its position in the terminator instruction's list of
> /// successors. It is an error to call this with a block that is not a
> /// successor.
> -unsigned llvm::GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ) {
> - TerminatorInst *Term = BB->getTerminator();
> +unsigned llvm::GetSuccessorNumber(const BasicBlock *BB,
> + const BasicBlock *Succ) {
> + const TerminatorInst *Term = BB->getTerminator();
> #ifndef NDEBUG
> unsigned e = Term->getNumSuccessors();
> #endif
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151120/c3e2185d/attachment-0001.html>
More information about the llvm-commits
mailing list