On Thu, Jun 14, 2012 at 10:13 PM, Sriraman Tallam <tmsri...@google.com> wrote: > +cc c++ front-end maintainers > > Hi, > > C++ Frontend maintainers, Could you please take a look at the > front-end part when you find the time?
So you have (for now?) omitted the C frontend change(s)? > Honza, your thoughts on the callgraph part? > > Richard, any further comments/feedback? Overall I like it - the cgraph portions need comments from Honza and the C++ portions from a C++ maintainer though. I would appreciate a C version, too. As you are tackling the C++ frontend first you should add some C++ specific testcases - if only to verify you properly reject cases you do not or can not implement. Like eventually class Foo { virtual void bar() __attribute__((target("sse"))); virtual void bar() __attribute__((target("sse2"))); }; or template <class T> void bar (T t) __attribute__((target("sse"))); template <class T> void bar (T t) __attribute__((target("sse2"))); template <> void bar (int t); (how does regular C++ overload resolution / template specialization interfere with the target overloads?) Thanks, Richard. > Additionally, I am working on generating better mangled names for > function versions, along the lines of C++ thunks. > > Thanks, > -Sri. > > On Mon, Jun 4, 2012 at 11:59 AM, Sriraman Tallam <tmsri...@google.com> wrote: >> Hi, >> >> Attaching updated patch for function multiversioning which brings >> in plenty of changes. >> >> * As suggested by Richard earlier, I have made cgraph aware of >> function versions. All nodes of function versions are chained and the >> dispatcher bodies are created on demand while building cgraph edges. >> The dispatcher body will be created if and only if there is a call or >> reference to a versioned function. Previously, I was maintaining the >> list of versions separately in a hash map, all that is gone now. >> * Now, the file multiverison.c has some helper routines that are used >> in the context of function versioning. There are no new passes and no >> new globals. >> * More tests, updated existing tests. >> * Fixed lots of bugs. >> * Updated patch description. >> >> Patch attached. Patch also available for review at >> http://codereview.appspot.com/5752064 >> >> Please let me know what you think, >> >> Thanks, >> -Sri. >> >> >> On Mon, May 14, 2012 at 11:28 AM, Sriraman Tallam <tmsri...@google.com> >> wrote: >>> Hi H.J, >>> >>> Attaching new patch with 2 test cases, mv2.C checks ISAs only and >>> mv1.C checks ISAs and arches mixed. Right now, checking only arches is >>> not needed as they are mutually exclusive, any order should be fine. >>> >>> Patch also available for review here: http://codereview.appspot.com/5752064 >>> >>> Thanks, >>> -Sri. >>> >>> On Sat, May 12, 2012 at 6:37 AM, H.J. Lu <hjl.to...@gmail.com> wrote: >>>> On Fri, May 11, 2012 at 7:04 PM, Sriraman Tallam <tmsri...@google.com> >>>> wrote: >>>>> Hi H.J., >>>>> >>>>> I have updated the patch to improve the dispatching method like we >>>>> discussed. Each feature gets a priority now, and the dispatching is >>>>> done in priority order. Please see i386.c for the changes. >>>>> >>>>> Patch also available for review here: >>>>> http://codereview.appspot.com/5752064 >>>>> >>>> >>>> I think you need 3 tests: >>>> >>>> 1. Only with ISA. >>>> 2. Only with arch >>>> 3. Mixed with ISA and arch >>>> >>>> since test mixed ISA and arch may hide issues with ISA only or arch only. >>>> >>>> -- >>>> H.J.