[llvm-bugs] [Bug 30634] New: add _allow_cpu_features intrinsic (like the intel compiler)
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 7 06:44:34 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30634
Bug ID: 30634
Summary: add _allow_cpu_features intrinsic (like the intel
compiler)
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: alkis at evlogimenos.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
https://software.intel.com/en-us/articles/new-intrinsic-allow-cpu-features-support
This intrinsic, among other things, makes it possible to build composable
components that are optimal for all microarchitectures in a single binary
(something like function multi versioning but better).
Bonus points if all instructions dominated by a call to the intrinsic are also
scheduled as per the best matching CPU:
if (skylake) {
__allow_cpu_features(_FEATURE_BMI2);
// do stuff
// use bmi2 intrinsics here even if -march=X doesn't support them
}
Code in "// do stuff, etc" should be tuned as if the cpu was haswell even if
the rest of the code is tuned for westmere. The rationale is that haswell is
the earliest processor supporting FEATURE_BMI2 and it is not introduced earlier
than the per file processor.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161007/9619edb4/attachment.html>
More information about the llvm-bugs
mailing list