mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00: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!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -62,6 +62,9 @@ bool IPCP::runOnModule(Module &M) {
|
|||||||
bool IPCP::processFunction(Function &F) {
|
bool IPCP::processFunction(Function &F) {
|
||||||
if (F.aempty() || F.use_empty()) return false; // No arguments? Early exit.
|
if (F.aempty() || F.use_empty()) return false; // No arguments? Early exit.
|
||||||
|
|
||||||
|
// Delete any klingons.
|
||||||
|
F.removeDeadConstantUsers();
|
||||||
|
|
||||||
std::vector<std::pair<Constant*, bool> > ArgumentConstants;
|
std::vector<std::pair<Constant*, bool> > ArgumentConstants;
|
||||||
ArgumentConstants.resize(F.asize());
|
ArgumentConstants.resize(F.asize());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user