1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Do not let dead constant expressions hanging off of functions prevent IPCP.

This allows to elimination of a bunch of global pool descriptor args from
programs being pool allocated (and is also generally useful!)

llvm-svn: 17657
This commit is contained in:
Chris Lattner 2004-11-09 20:47:30 +00:00
parent 97f373cf98
commit b214a04a16

View File

@ -62,6 +62,9 @@ bool IPCP::runOnModule(Module &M) {
bool IPCP::processFunction(Function &F) {
if (F.aempty() || F.use_empty()) return false; // No arguments? Early exit.
// Delete any klingons.
F.removeDeadConstantUsers();
std::vector<std::pair<Constant*, bool> > ArgumentConstants;
ArgumentConstants.resize(F.asize());