search for: mergefunc_sanity

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

2014 Jan 21
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...if (Res != 0) return Res; whereas, since you never use Res unless it's non-zero, I think the following is more clear and concise: if (int Res = cmpNumbers(I1->getNumOperands(), I2->getNumOperands())) return Res; - I'm not sure if your MERGEFUNC_SANITY should be included the way it is: +//#define MERGEFUNC_SANITY 900 +#ifdef MERGEFUNC_SANITY - I’m also unsure about the following: + // If we have some problematic functions, perhaps we would like + // to keep declarations only, and those definitions fires the pr...
2014 Jan 17
6
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi all, I propose simple improvement for MergeFunctions pass, that reduced its complexity from O(N^2) to O(log(N)), where N is number of functions in module. The idea, is to replace the result of comparison from "bool" to "-1,0,1". In another words: define order relation on functions set. To be sure, that functions could be comparable that way, we have to prove that order