[PATCH] D36707: [CodeGen]Refactor CpuSupports/CPUIs Builtin Code Gen to better work with "target" implementation
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 14 12:24:09 PDT 2017
erichkeane created this revision.
A small set of refactors that'll make it easier for me to implement 'target' support.
First, extract the CPUSupports functionality into its own function. THis has the advantage of not wasting time in this builtin to deal with arguments.
Second, pulls both CPUSupports and CPUIs implementation into a member-function, so that it can be called from the resolver generation that I'm working on.
Third, creates an overload that takes simply the feature/cpu name (rather than extracting it from a callexpr), since that info isn't available later.
Note that despite how the 'diff' looks, the EmitX86CPUSupports function simply takes the implementation out of the 'switch'.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10817 bytes
Desc: not available
More information about the cfe-commits