Skip to content
Commit 64b95123 authored by Tobias Grosser's avatar Tobias Grosser
Browse files

Delete trivial PHI nodes (aka stack slot sharing)



During code preperation trivial PHI nodes (mainly introduced by lcssa) are
deleted to decrease the number of introduced allocas (==> dependences). However
simply replacing them by their only incoming value would cause the independent
block pass to introduce new allocas. To prevent this we try to share stack slots
during code preperarion, hence to reuse a already created alloca 'to demote' the
trivial PHI node. This works if we know that the value stored in this alloca
will be the incoming value of the trivial PHI at the end of the predecessor
block of this trivial PHI.

Contributed-by: default avatarJohannes Doerfert <doerfert@cs.uni-saarland.de>
llvm-svn: 205320
parent 48e24c73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment