search for: optimizeglobalvars

Displaying 2 results from an estimated 2 matches for "optimizeglobalvars".

2016 Jul 27
2
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
...ld compile and crash at run-time. The ones that wouldn`t compile wouldn`t compile because GlobalVariable has an explicitly-deleted copy constructor and no move constructor [so "std::move(...)" was not usable to solve the problem]. BTW: I am [and was] doing this in the context of "OptimizeGlobalVars" which is in "llvm/lib/Transforms/IPO/GlobalOpt.cpp". If anybody reading this can provide some assistance, I`d be much obliged. Regards, Abe struct GV_alignment_comparator { bool operator()(const GlobalVariable& L, const GlobalVariable& R) { return...
2016 Aug 04
4
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
...e been wrong. I hope the one _I_ wrote is _right_. ;-) > I assume you can reproduce this in a unit test? Well, it doesn`t take a long program-under-compilation to make this fail. As before, I will paste something in after my sign-off. Regards, Abe ----- added near the end of "OptimizeGlobalVars" in "llvm/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 (u...