Displaying 7 results from an estimated 7 matches for "getgloballist".
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...}
NumFunctions += DeadFunctions.size();
Changed = true;
@@ -171,7 +174,10 @@ bool GlobalDCE::runOnModule(Module &M) {
if (!DeadGlobalVars.empty()) {
for (unsigned i = 0, e = DeadGlobalVars.size(); i != e; ++i) {
RemoveUnusedGlobalValue(*DeadGlobalVars[i]);
- M.getGlobalList().erase(DeadGlobalVars[i]);
+ // Might have deleted the definition of an available externally function
+ // that is still referenced. Leave the declaration.
+ if (DeadGlobalVars[i]->use_empty())
+ M.getGlobalList().erase(DeadGlobalVars[i]);
}
NumVariables += DeadG...
2015 May 19
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...> Changed = true;
>> @@ -171,7 +174,10 @@ bool GlobalDCE::runOnModule(Module &M) {
>> if (!DeadGlobalVars.empty()) {
>> for (unsigned i = 0, e = DeadGlobalVars.size(); i != e; ++i) {
>> RemoveUnusedGlobalValue(*DeadGlobalVars[i]);
>> - M.getGlobalList().erase(DeadGlobalVars[i]);
>> + // Might have deleted the definition of an available externally
>> function
>> + // that is still referenced. Leave the declaration.
>> + if (DeadGlobalVars[i]->use_empty())
>> + M.getGlobalList().erase(DeadGlob...
2005 Oct 16
2
[LLVMdev] Help on LLVM Instrumentation
Hi ,
I am using LLVM for my Post Graduate course project on Optimization. I am trying to do some insrtumentation to the bytecode.I 've been going through your Instrumentation code for the past few days in /llvm/lib/Transforms/Instrumentation folder and finally found two ways of instrumentation :
1) injecting LLVM bytecode instructions
2) calling an external C function.
I am trying both and
2016 Jul 27
2
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
...bliged.
Regards,
Abe
struct GV_alignment_comparator {
bool operator()(const GlobalVariable& L, const GlobalVariable& R) {
return L.getAlignment() < R.getAlignment();
}
};
// 'M' is a "Module &"
/* this crashes BADLY... :-(
M.getGlobalList().sort( GV_alignment_comparator() );
Changed = true;
*/
2015 Sep 18
2
GlobalOPT and sections
...tInt::getFalse(GV->getContext()),
GV->getName()+".b",
GV->getThreadLocalMode(),
GV->getType()->getAddressSpace());
GV->getParent()->getGlobalList().insert(GV, NewGV);
...
// Retain the name of the old global variable. People who are debugging their
// programs may expect these variables to be named the same.
NewGV->takeName(GV);
GV->eraseFromParent();
What I do not see - the section information from the original GV is never...
2015 Jun 03
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...@ -171,7 +174,10 @@ bool GlobalDCE::runOnModule(Module &M) {
>> >> if (!DeadGlobalVars.empty()) {
>> >> for (unsigned i = 0, e = DeadGlobalVars.size(); i != e; ++i) {
>> >> RemoveUnusedGlobalValue(*DeadGlobalVars[i]);
>> >> - M.getGlobalList().erase(DeadGlobalVars[i]);
>> >> + // Might have deleted the definition of an available externally
>> >> function
>> >> + // that is still referenced. Leave the declaration.
>> >> + if (DeadGlobalVars[i]->use_empty())
>> >&...
2016 Aug 04
4
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
...lvm/lib/Transforms/IPO/GlobalOpt.cpp",
amongst many other things I added to that routine -----
struct GV_alignment_comparator {
bool operator()(const GlobalVariable& L, const GlobalVariable& R) {
return L.getAlignment() < R.getAlignment();
}
};
if (unsorted) {
M.getGlobalList().sort( GV_alignment_comparator() );
Changed = true;
}
----- added to "llvm/lib/IR/Globals.cpp" [and commented out the relevant deletion in
"llvm/include/llvm/IR/GlobalVariable.h"] -----
GlobalVariable::GlobalVariable(const GlobalVariable& GV) : GlobalVariable( GV.g...