search for: destroyconst

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

Did you mean: destroycnt
2009 Jul 09
1
[LLVMdev] Build fails on linux.
llvm[1]: Compiling Globals.cpp for Release build /home/auto-tester/projects/c16/lib/VMCore/Globals.cpp: In member function ‘virtual void llvm::GlobalValue::destroyConstant()’: /home/auto-tester/projects/c16/lib/VMCore/Globals.cpp:81: error: ‘cerr’ was not declared in this scope /home/auto-tester/projects/c16/lib/VMCore/Globals.cpp: In member function ‘const llvm::GlobalValue* llvm::GlobalAlias::getAliasedGlobal() const’: /home/auto-tester/projects/c16...
2015 Oct 10
2
[RFC] Clean up the way we store optional Function data
...t the same IndirectUser (with a bumped refcount). This addresses all the points in the previous section. Implementation details ====================== When an IndirectUser is constructed, it adds itself to its Constant's users list. When the IndirectUser's refcount hits 0, we can invoke destroyConstant(). The only tricky part is handling ReplaceAllUsesWith. There are two RAUW cases. Case 1 is easy: <IndirectUser 1> = { Data = A, RefCount = X } RAUW(A, B) Result: <IndirectUser 1> = { Data = B, RefCount = X } Case 2 is a bit more involved: <IndirectUser 1>...
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...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++; + } + + // Drop the bodies of available externally functions. + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { + if (!I->hasAvailableExternallyLinkage()) +...
2015 Jun 08
4
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...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++; > + } > > Do you need to set the linkage of global variables to external? I noticed > that Function::deleteBody() does this but setInitializer(nullptr) d...
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
2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan, Yes, it is a ConstantExpr! Thank you! Now trying to find a clue in ConstantExpr's functions to get that string :-) Regards, Welson On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson Sun, > > > Hi, if I have some LLVM code like this: > > > > @.str = private unnamed_addr constant [7 x i8]
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