mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01: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:
parent
97f373cf98
commit
b214a04a16
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user