[PATCH] MergeFunc: Avoid invalid merge of functions using different range metadata
stpworld at narod.ru
Tue Jun 10 14:43:01 PDT 2014
Hi Bjorn (sorry I don't have o-umlaut on my keyboard :-) ),
Yes. This is proper way.
Only critical thing is: we have to avoid extra function body scanning. So in this context, try to introduce the way of noticing such loads on cmpOperation stage. So we could avoid rescan whole function again while merging. It possible by associating structure for each function, that would keep usefull information we collect while scanning. You can do that by introducing new field in ComparableFunction, and store anything suspicious you find about 'load' insts :-)
Then on merging stage you won't scan functions again, but just check ComparableFunction fields.
I hope, we will replace ComparableFunction soon with similar structure ( during O(N*log(N) optimization). So that's why I'd propose to commit it just as fix for now (so you had to fix your tests only in first patch version).
And then it would be really good, if you proceed to work on this subject, so we could create good optimization for 'ranges' metadata.
Thanks for working on it!
More information about the llvm-commits