search for: removeunusedglobalvalu

Displaying 3 results from an estimated 3 matches for "removeunusedglobalvalu".

2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...================================ --- lib/Transforms/IPO/GlobalDCE.cpp (revision 237590) +++ lib/Transforms/IPO/GlobalDCE.cpp (working copy) @@ -162,7 +162,10 @@ bool GlobalDCE::runOnModule(Module &M) { // themselves. for (unsigned i = 0, e = DeadFunctions.size(); i != e; ++i) { RemoveUnusedGlobalValue(*DeadFunctions[i]); - M.getFunctionList().erase(DeadFunctions[i]); + // Might have deleted the body of an available externally function that + // is still referenced. Leave the declaration. + if (DeadFunctions[i]->use_empty()) + M.getFunctionList().erase(DeadFunctions...
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...sforms/IPO/GlobalDCE.cpp (revision 237590) >> +++ lib/Transforms/IPO/GlobalDCE.cpp (working copy) >> @@ -162,7 +162,10 @@ bool GlobalDCE::runOnModule(Module &M) { >> // themselves. >> for (unsigned i = 0, e = DeadFunctions.size(); i != e; ++i) { >> RemoveUnusedGlobalValue(*DeadFunctions[i]); >> - M.getFunctionList().erase(DeadFunctions[i]); >> + // Might have deleted the body of an available externally function >> that >> + // is still referenced. Leave the declaration. >> + if (DeadFunctions[i]->use_empty()) &gt...
2015 Jun 03
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...t;> >> +++ lib/Transforms/IPO/GlobalDCE.cpp (working copy) >> >> @@ -162,7 +162,10 @@ bool GlobalDCE::runOnModule(Module &M) { >> >> // themselves. >> >> for (unsigned i = 0, e = DeadFunctions.size(); i != e; ++i) { >> >> RemoveUnusedGlobalValue(*DeadFunctions[i]); >> >> - M.getFunctionList().erase(DeadFunctions[i]); >> >> + // Might have deleted the body of an available externally >> >> function >> >> that >> >> + // is still referenced. Leave the declaration. &gt...