[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'.
https://reviews.llvm.org/D36707
Files:
lib/CodeGen/CGBuiltin.cpp
lib/CodeGen/CodeGenFunction.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36707.111049.patch
Type: text/x-patch
Size: 10817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170814/3aa6b9da/attachment.bin>
More information about the cfe-commits
mailing list