function multi-versioning in GCC
https://lwn.net/Articles/691932/
https://gcc.gnu.org/wiki/FunctionMultiVersioning
why multi-versioning
This aim of this project is to make it really easy for the developer to specify multiple versions of a function, each catered to a specific target ISA feature. GCC then takes care of creating the dispatching code necessary to execute the right function version.
how this is implemented
When the front-end sees a call (pointer) to a function version, it generates a new dispatcher function decl and replaces the existing call (pointer) to be a call (pointer) to the dispatcher function. The body of the dispatcher function is later generated when building the call graph. The dispatcher function has the logic to determine the right function version at runtime. At run-time, calling the function version, either directly or indirectly, will invoke the dispatcher logic which will execute the right function version.
dispatcher function body
- at runtime, use CPU check built-ins to check CPU capability;
- IFUNC mechanism so the look up is only needed once.
IFUNC mechanism reuses existing support from compiler/linker as well as the dynamic linker at runtime. Although we can create a custom version of such indirection, like a function pointer initialized at runtime by checking CPU capabilities.
function multi-versioning in GCC的更多相关文章
- GCC的编译和安装 很好的资料
http://blog.csdn.net/yrj/article/details/492404 1.GCC的编译和安装2.预处理 #define 可以支持不定数量的参数. 例子如下: ...
- DiscuzX /source/function/function_core.php通用核心函数库文件分析
... <?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to l ...
- C++ Standards Support in GCC - GCC 对 C++ 标准的支持
C++ Standards Support in GCC - 2019-2-20 GCC supports different dialects of C++, corresponding to th ...
- gcc __attribute__关键字举例之visibility【转】
转自:https://blog.csdn.net/starstarstone/article/details/7493144?utm_source=tuicool&utm_medium=ref ...
- GCC生成动态库
main.c #include <stdio.h> void hello(void); int main(int argc, char ** argv) { printf("Th ...
- GCC提供的几个內建函数
参考 https://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Other-Builtins.html#Other-Builtins https://en.wikipe ...
- 〖C语言〗C语言一个函数传递无限制多参数(不确定参数函数)的方法
/* * ===================================================================================== * * Filen ...
- kbuild-(directory)
-INDEX - this file: info on the kernel build process kbuild.txt - developer information on kbuild kc ...
- 玩转JavaScript OOP[4]——实现继承的12种套路
概述 在之前的文章中,我们借助构造函数实现了"类",然后结合原型对象实现了"继承",并了解了JavaScript中原型链的概念. 理解这些内容,有助于我们更深入 ...
- Laravel 数据库读写分离
config/database.php ... 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localho ...
随机推荐
- linux 改动rootpassword以及忘记rootpassword
改动rootpassword: $ passwd root 或者sudo passwd root $password: (要求输入旧的密码) $new password:(输入两遍新密码) 忘记r ...
- HDOJ 题目3564 Another LIS(线段树单点更新,LIS)
Another LIS Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ios中实现对UItextField,UITextView等输入框的字数限制
本文转载至 http://blog.sina.com.cn/s/blog_9bf272cf01013lsd.html 2011-10-05 16:48 533人阅读 评论(0) 收藏 举报 1. ...
- SSL:Ubuntu证书配置
CA证书的配置 Ubuntu上CA证书的配置可以通过工具ca-certificates来方便的进行.该工具默认是随Ubuntu安装的,如果没有可以通过下面的命令来安装: sudo apt-get in ...
- HDU - 1241 Oil Deposits 【DFS】
题目链接 https://cn.vjudge.net/contest/65959#problem/L 题意 @表示油田 如果 @@是连在一起的 可以八个方向相连 那么它们就是 一块油田 要找出 一共有 ...
- Carthage的使用
1.安装Carthage https://github.com/Carthage/Carthage/releases 2.进入Cartfile文件所在的目录地址 cd 拖入文件Cartfile,把最后 ...
- php下载并安装pear脚本
下载并安装pear脚本cd /usr/local/php/bin/curl -o go-pear.php http://pear.php.net/go-pear.phar ./php go-pear. ...
- P1856 [USACO5.5]矩形周长Picture
P1856 [USACO5.5]矩形周长Picture $len$ $sum$ $num$ $flag\_l$ $flage\_ ...
- 微信公众号支付 redirect_uri 参数错误
登录微信公众平台 1.配置 公众号设置-功能设置 JS接口安全域名 网页授权域名 2.配置 微信支付-开发配置 支付授权目录 测试授权目录 测试白名单
- 郝健: Linux内存管理学习笔记-第2节课【转】
本文转载自:https://blog.csdn.net/juS3Ve/article/details/80035753 摘要 slab./proc/slabinfo和slabtop 用户空间mallo ...