search for: hasavailableexternallylinkage

Displaying 20 results from an estimated 21 matches for "hasavailableexternallylinkage".

2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...johnson at google.com> >>> > wrote: >>> >> >>> >> Looking back through my GlobalDCE changes, it looks like one of the >>> >> places I had changed (where we mark defined globals in runOnModule) >>> >> already has a guard for !hasAvailableExternallyLinkage and >>> >> !isDiscardableIfUnused, so my additional guard against marking >>> >> imported functions is unnecessary. But the other place I had to change >>> >> was in GlobalIsNeeded where it walks through the function and >>> >> recursively...
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...t; > wrote: >> >>> >> >> >>> >> Looking back through my GlobalDCE changes, it looks like one of the >> >>> >> places I had changed (where we mark defined globals in runOnModule) >> >>> >> already has a guard for !hasAvailableExternallyLinkage and >> >>> >> !isDiscardableIfUnused, so my additional guard against marking >> >>> >> imported functions is unnecessary. But the other place I had to >> >>> >> change >> >>> >> was in GlobalIsNeeded where it walks...
2015 Jun 03
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...my GlobalDCE changes, it looks like one of >> >> >>> >> the >> >> >>> >> places I had changed (where we mark defined globals in >> >> >>> >> runOnModule) >> >> >>> >> already has a guard for !hasAvailableExternallyLinkage and >> >> >>> >> !isDiscardableIfUnused, so my additional guard against marking >> >> >>> >> imported functions is unnecessary. But the other place I had to >> >> >>> >> change >> >> >>> >> w...
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2010 Feb 16
2
[LLVMdev] Work in progress patch to bug 2606
...) was modified to search for a non-mapped function in all "other" modules. If found a stub is emitted, which will lazily emit the real function at runtime. One issue here is that functions that are external to all modules, have their mappings delayed by the above loop. I also kept the hasAvailableExternallyLinkage() the same as before, as I'm not sure if this should also go through the same module procedure. The stub emission will only take place for function definitions that are marked with external linkage. Should other cases be allowed? Should visibility also be considered? 3) JIT::getOrEmitGloba...
2015 May 15
3
[LLVMdev] RFC: ThinLTO Impementation Plan
...rloading the meaning of that linkage type. See the > next para for an example where I am unsure about doing this... > > Looking back through my GlobalDCE changes, it looks like one of the > places I had changed (where we mark defined globals in runOnModule) > already has a guard for !hasAvailableExternallyLinkage and > !isDiscardableIfUnused, so my additional guard against marking > imported functions is unnecessary. But the other place I had to change > was in GlobalIsNeeded where it walks through the function and > recursively marks any referenced global as needed. Here there was no > guard...
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...ass() { return new ElimAvailExtern(); } + +bool ElimAvailExtern::runOnModule(Module &M) { + bool Changed = false; + + // Drop initializers of available externally global variables. + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); + I != E; ++I) { + if (!I->hasAvailableExternallyLinkage()) + continue; + if (I->hasInitializer()) { + Constant *Init = I->getInitializer(); + I->setInitializer(nullptr); + if (isSafeToDestroyConstant(Init)) + Init->destroyConstant(); + } + I->removeDeadConstantUsers(); + NumVariables++; + } + + //...
2015 Jun 04
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
..., it looks like one of >>>>>>>>>>> the >>>>>>>>>>> places I had changed (where we mark defined globals in >>>>>>>>>>> runOnModule) >>>>>>>>>>> already has a guard for !hasAvailableExternallyLinkage and >>>>>>>>>>> !isDiscardableIfUnused, so my additional guard against marking >>>>>>>>>>> imported functions is unnecessary. But the other place I had to >>>>>>>>>>> change >>>>>>&g...
2010 Feb 19
3
[LLVMdev] 2nd attempt for a working patch for bug 2606
...;other" modules. If found a stub is emitted in the same manner as other in module functions found. This stub gets re-emitted, toward the end of the JIT cycle. One issue here is that functions that are external to all modules, have their mappings delayed by the above loop. I also kept the hasAvailableExternallyLinkage() the same as before, as I'm not sure if this should also go through the same module procedure. The stub emission will only take place for function definitions that are marked with external linkage. Should other cases be allowed? Should visibility also be considered? 3) JIT::getOrEmitGloba...
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 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Agreed. Although I assume you mean invoke the new pass under a >> ThinLTO-only option so that avail extern are not dropped in the >> compile pass before the LTO link? > > > No, this pass
2010 Feb 25
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
...found a stub is emitted in the same manner as other in module functions > found. This stub gets re-emitted, > toward the end of the JIT cycle. > > One issue here is that functions that are external to all modules, have > their mappings delayed by the > above loop. I also kept the hasAvailableExternallyLinkage() the same as > before, as I'm not sure if this > should also go through the same module procedure. The stub emission will > only take place for function > definitions that are marked with external linkage. Should other cases be > allowed? Should visibility also > be considere...
2017 Aug 29
5
Is the flow "llvm-extract -> llvm-link -> clang++ " supposed to be used in this way? To Extract and Re-insert functions?
Hi all, First post to the list, I hope you can help or guide me on this task. I am involved in a project that requires to re-link extracted and edited IR code Thus I want to know if these tools can be used in this way? clang++-4.0 code03.cpp -emit-llvm -S -o code03.ll llvm-extract-4.0 code03.ll -func main -S -o extracted_main.ll llvm-link-4.0 code03.ll -only-needed -override extracted_main.ll
2010 Feb 17
0
[LLVMdev] Work in progress patch to bug 2606
...non-mapped > function in all "other" modules. > If found a stub is emitted, which will lazily emit the real function at > runtime. > > One issue here is that functions that are external to all modules, have > their mappings delayed by the > above loop. I also kept the hasAvailableExternallyLinkage() the same as > before, as I'm not sure if this > should also go through the same module procedure. The stub emission will > only take place for function > definitions that are marked with external linkage. Should other cases be > allowed? Should visibility also > be considere...
2010 Feb 27
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
...ck into the JITEmitter. If you add a "Function*findDefiningFunction(Function*)" method to the JIT, which searches the Modules for the strongest definition of a same-named function, you can keep the logic for how to deal with compiling that function in the JITEmitter. > I also kept theĀ hasAvailableExternallyLinkage() the same as > before, as I'm not sure if this > should also go through the same module procedure. If something's available_externally in the current module and external in another module, I think we should compile the external definition. If it's available_externally in all mod...
2015 Jun 04
3
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...ser::op_iterator U = I->op_begin(), E = I->op_end(); U != E; ++U) >> - if (GlobalValue *GV = dyn_cast<GlobalValue>(*U)) >> - GlobalIsNeeded(GV); >> + if (GlobalValue *GV = dyn_cast<GlobalValue>(*U)) { >> + if (!GV->hasAvailableExternallyLinkage()) >> + GlobalIsNeeded(GV); >> + } >> else if (Constant *C = dyn_cast<Constant>(*U)) >> MarkUsedGlobalsAsNeeded(C); >> } > > > IIUC, this changes the logic from "if it's referenced, keep it" to...
2015 Jun 08
4
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...ill update the comment. > > + MPM.add(createElimAvailExternPass()); > + } > > + // Drop initializers of available externally global variables. > + for (Module::global_iterator I = M.global_begin(), E = M.global_end(); > + I != E; ++I) { > + if (!I->hasAvailableExternallyLinkage()) > + continue; > + if (I->hasInitializer()) { > + Constant *Init = I->getInitializer(); > + I->setInitializer(nullptr); > + if (isSafeToDestroyConstant(Init)) > + Init->destroyConstant(); > + } > + I->removeDeadConstantUse...
2010 Mar 01
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
...gt; "Function*findDefiningFunction(Function*)" method to the JIT, which > searches the Modules for the strongest definition of a same-named > function, you can keep the logic for how to deal with compiling that > function in the JITEmitter. Will do > >> I also kept the hasAvailableExternallyLinkage() the same as >> before, as I'm not sure if this >> should also go through the same module procedure. > > If something's available_externally in the current module and external > in another module, I think we should compile the external definition. > If it's ava...
2010 Feb 26
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
Hi Jeffrey, On Feb 26, 2010, at 16:02, Jeffrey Yasskin wrote: > [sidenote: Please try to avoid extraneous whitespace and line wrapping changes in your patches. It makes it harder to see what you're actually changing] Sorry just saw some preexisting code was not in 80 columns. > > On Fri, Feb 26, 2010 at 4:57 AM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote: > Hi
2010 Feb 26
1
[LLVMdev] 2nd attempt for a working patch for bug 2606
[sidenote: Please try to avoid extraneous whitespace and line wrapping changes in your patches. It makes it harder to see what you're actually changing] On Fri, Feb 26, 2010 at 4:57 AM, Garrison Venn <gvenn.cfe.dev at gmail.com>wrote: > Hi Olivier, > > On Feb 25, 2010, at 14:10, Olivier Meurant wrote: > > Hi Garrison, > > I finally come back from holidays and take