search for: deadfunct

Displaying 7 results from an estimated 7 matches for "deadfunct".

Did you mean: readfunct
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...lDCE.cpp =================================================================== --- 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_...
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 decl...
2015 Jun 03
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...
2015 May 15
2
[LLVMdev] RFC: ThinLTO Impementation Plan
On Fri, May 15, 2015 at 9:18 AM, David Blaikie <dblaikie at gmail.com> wrote: > >> >> - Marking of imported functions (for use in ThinLTO-specific symbol >> >> linking and global DCE, for example). >> > >> > Marking how? Do you mean giving them internal linkage, or something >> > else? >> >> Mentioned just after this: either
2015 May 15
3
[LLVMdev] RFC: ThinLTO Impementation Plan
...d be demonstrated without ThinLTO and with a normal module with an available_externally function & would be worth discussing what the right behavior is in that context, regardless of ThinLTO. > > There was one other change to GlobalDCE that I had to make, where we > erase the list of DeadFunctions from the module. In my case we may > have a function body that was eliminated, but still have references to > it (i.e. in the case I am talking about above). In that case it is now > just a declaration and we don't erase it from the function list on the > module. If the GlobalsI...
2017 Oct 26
2
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
...d nsw i32 %2, 1 >>   store i32 %inc, i32* %i, align 4 >>   br label %for.cond >> >> for.end:                                          ; preds = %for.cond >>   ret i32 0 >> } >> >> declare i32 @printf(i8*, ...) >> >> >> Succeeded drop DeadFunction foo. >> >> Maybe I wrongly use the Internalize and GlobalDCE PASS together? >> please give me some hints, thanks a lot! >> >> >> PS: LLVM 6.0 Internalize PASS is able to work, internal foo: >> >> $ /opt/llvm-svn/bin/opt -S -internalize hello2.ll -...
2017 Oct 25
3
LLVM v6.0 Internalize and GlobalDCE PASS can not work together?
...                              ; preds = %for.body   %2 = load i32* %i, align 4   %inc = add nsw i32 %2, 1   store i32 %inc, i32* %i, align 4   br label %for.cond for.end:                                          ; preds = %for.cond   ret i32 0 } declare i32 @printf(i8*, ...) Succeeded drop DeadFunction foo. Maybe I wrongly use the Internalize and GlobalDCE PASS together? please give me some hints, thanks a lot! PS: LLVM 6.0 Internalize PASS is able to work, internal foo: $ /opt/llvm-svn/bin/opt -S -internalize hello2.ll -o hello2.internal.ll $ cat hello2.internal.ll ; ModuleID = 'hel...