[llvm-commits] [llvm] r47924 - /llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
Chris Lattner
clattner at apple.com
Tue Mar 4 16:43:01 PST 2008
On Mar 4, 2008, at 4:36 PM, Devang Patel wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=47924&view=rev
> Log:
> Skip functions that return multiple values.
Why not fix this to insert multiple phi nodes? Clients of this pass
only expect one return after it runs: you're breaking its invariant.
-Chris
>
>
> Modified:
> llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
>
> Modified: llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp?rev=47924&r1=47923&r2=47924&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
> (original)
> +++ llvm/trunk/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp Tue
> Mar 4 18:36:59 2008
> @@ -50,6 +50,11 @@
> // Loop over all of the blocks in a function, tracking all of the
> blocks that
> // return.
> //
> +
> + // PHINode can not handle aggregates returned by multiple value ret
> + // instructions. TODO: Handle each return value independently.
> + if (isa<StructType>(F.getReturnType()))
> + return false;
> std::vector<BasicBlock*> ReturningBlocks;
> std::vector<BasicBlock*> UnwindingBlocks;
> std::vector<BasicBlock*> UnreachableBlocks;
>
>
> _______________________________________________
> 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