当前位置: 首页 > news >正文

网站设计方案定制百度关键词工具入口

网站设计方案定制,百度关键词工具入口,新浪博客怎么做网站,东莞中小型网站建设sudo usermod -a -G vboxsf nowind nowind是你的虚拟机登录的用户名解决virtualbox 虚拟机共享文件夹不能使用的问题 第一种:源码内实现pass: 实现EncodeFunctionName 的pass,核心代码如下 相关文件的修改: 因为后面同样用到…

sudo usermod -a -G vboxsf nowind   nowind是你的虚拟机登录的用户名解决virtualbox 虚拟机共享文件夹不能使用的问题

第一种:源码内实现pass:

实现EncodeFunctionName 的pass,核心代码如下

相关文件的修改:

因为后面同样用到ollvm,所以我已经放到一起了,资源下载:

https://download.csdn.net/download/ahjxly/88609122

因为全部都是修改llvm目录下的文件,替换include和lib文件夹

替换完成后 cd cd llvm/llvm-project-9.0.1/llvm/cmake-build-debug/,执行ninja -j8,重新编译下。这次编译会快很多。

然后单独执行 ninja LLVMEncodeFunctionName,生成so文件,进行使用。

使用方式和之前的文章一样,执行

opt -load '/home/nowind/llvm/llvm-project-9.0.1/llvm/cmake-build-release/lib/LLVMEncodeFunctionName.so' -encode hello_clang.ll -o hello_clang_encode.bc

clang hello_clang_encode.bc -o hello_clang_encode

第二种:在源码外实现EncodeFunctionName2,修改根目录下的CMakeList.txt:

set(LLVM_DIR /home/nowind/llvm/llvm-project-9.0.1/llvm/cmake-build-debug/lib/cmake/llvm/),这里为你自己的路径

执行结果如下:

/home/nowind/llvm/CLion-2023.3/clion-2023.3/bin/cmake/linux/x64/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -G Ninja -S /home/nowind/llvm/pro/pro2/outPass -B /home/nowind/llvm/pro/pro2/outPass/cmake-build-debug
-- Linker detection: GNU ld
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/nowind/llvm/pro/pro2/outPass/cmake-build-debug[Finished]
/home/nowind/llvm/CLion-2023.3/clion-2023.3/bin/cmake/linux/x64/bin/cmake --build /home/nowind/llvm/pro/pro2/outPass/cmake-build-debug --target all -j 6
[2/2] Linking CXX shared module EncodeFunctionName2/LLVMEncodeFunctionName2.soBuild finished

生成的文件在

/home/nowind/llvm/pro/pro2/outPass/cmake-build-debug/EncodeFunctionName2/LLVMEncodeFunctionName2.so

使用opt 命令

opt -load /home/nowind/llvm/pro/pro2/outPass/cmake-build-debug/EncodeFunctionName2/LLVMEncodeFunctionName2.so  -encode2 hello_clang.ll
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.EncodeFunctionName22: test_hello1 -> 9c119247aefaa12cdd417eb3d57d5b2a
EncodeFunctionName22: main -> main
EncodeFunctionName22: test_hello2 -> af0aaac8b98b759ace7b9eacbd2238a6

得到同样的结果。

clang使用自定义的pass,生成可执行文件

 clang -Xclang -load -Xclang /home/nowind/llvm/pro/pro2/outPass/cmake-build-release/EncodeFunctionName2/LLVMEncodeFunctionName2.so -encode2 hello_clang.ll -o hello_clang_encode3 -Wno-unused-command-line-argument

第三种:EncodeFunctionName注册到clang中:

/home/nowind/llvm/llvm-project-9.0.1/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp populateModulePassManager方法中增加 MPM.add(createEncodeFunctionName());

重新编译clang: 这里用的release,因此PATH要改:

ninja clang

export PATH=/home/nowind/llvm/llvm-project-9.0.1/llvm/cmake-build-release/bin:$PATH

clang -mllvm -encode_function_name hello_clang.bc

切换到debug:

修改EncodeFunction中:CMakeLists.txt set(LLVM_DIR /home/nowind/llvm/llvm-project-9.0.1/llvm/cmake-build-debug/lib/cmake/llvm/)

cd cmake-build-debug

ninja opt 重新编译opt

opt -load /home/nowind/llvm/pro/pro2/outPass/cmake-build-debug/EncodeFunctionName2/LLVMEncodeFunctionName2.so -encode2 hello_clang.ll -o hello_clang_encode.bc

注意pass不能重名

opt 断点:

OutPass中配置EncodeFunctionName2的opt为

/home/nowind/llvm/llvm-project-9.0.1/llvm/cmake-build-debug/bin/opt

参数配置为:

-load /home/nowind/llvm/pro/pro2/outPass/cmake-build-debug/EncodeFunctionName2/LLVMEncodeFunctionName2.so -encode2 /home/nowind/llvm/pro/pro2/hello_clang.ll -o /home/nowind/llvm/pro/pro2/hello_clang_encode.bc

但这样配置完毕后发现一个问题,就是日志在clion控制台中看不到,只有换行,勾选了

Emulate terminal in the output console才能看到,奇怪的很,但也不影响什么


文章转载自:
http://roach.brjq.cn
http://lapse.brjq.cn
http://terebinth.brjq.cn
http://buntons.brjq.cn
http://buchenwald.brjq.cn
http://cornelius.brjq.cn
http://hymnodist.brjq.cn
http://exhibitive.brjq.cn
http://zestful.brjq.cn
http://belgium.brjq.cn
http://cherrapunji.brjq.cn
http://thriftlessly.brjq.cn
http://xingu.brjq.cn
http://cariogenic.brjq.cn
http://unwonted.brjq.cn
http://whitleather.brjq.cn
http://convertite.brjq.cn
http://forementioned.brjq.cn
http://railwayed.brjq.cn
http://tipsify.brjq.cn
http://acred.brjq.cn
http://hire.brjq.cn
http://fiberboard.brjq.cn
http://etude.brjq.cn
http://unremunerative.brjq.cn
http://haemoblast.brjq.cn
http://concentrical.brjq.cn
http://wither.brjq.cn
http://redpolled.brjq.cn
http://fro.brjq.cn
http://became.brjq.cn
http://hasten.brjq.cn
http://pirarucu.brjq.cn
http://bht.brjq.cn
http://freedom.brjq.cn
http://bacterial.brjq.cn
http://punishment.brjq.cn
http://inharmonious.brjq.cn
http://snuffling.brjq.cn
http://voltage.brjq.cn
http://affability.brjq.cn
http://geniculation.brjq.cn
http://baton.brjq.cn
http://troutlet.brjq.cn
http://train.brjq.cn
http://mudflow.brjq.cn
http://leet.brjq.cn
http://ligamentous.brjq.cn
http://denbighshire.brjq.cn
http://leechcraft.brjq.cn
http://guanin.brjq.cn
http://whipless.brjq.cn
http://manstealing.brjq.cn
http://haugh.brjq.cn
http://rutherford.brjq.cn
http://psychic.brjq.cn
http://dewitt.brjq.cn
http://merdeka.brjq.cn
http://inoculator.brjq.cn
http://mobot.brjq.cn
http://conclusively.brjq.cn
http://overridden.brjq.cn
http://humpback.brjq.cn
http://panhandler.brjq.cn
http://whiskers.brjq.cn
http://eremacausis.brjq.cn
http://curtainfall.brjq.cn
http://carley.brjq.cn
http://specialties.brjq.cn
http://shema.brjq.cn
http://katharsis.brjq.cn
http://croatan.brjq.cn
http://bookselling.brjq.cn
http://electrograph.brjq.cn
http://schweiz.brjq.cn
http://repeated.brjq.cn
http://cosmodrome.brjq.cn
http://aphetic.brjq.cn
http://carnelian.brjq.cn
http://lych.brjq.cn
http://nosiness.brjq.cn
http://punily.brjq.cn
http://circannian.brjq.cn
http://sialidase.brjq.cn
http://primp.brjq.cn
http://indigestible.brjq.cn
http://distal.brjq.cn
http://facetiosity.brjq.cn
http://trochleae.brjq.cn
http://hypophysial.brjq.cn
http://electrogenic.brjq.cn
http://nitrite.brjq.cn
http://lim.brjq.cn
http://suspiration.brjq.cn
http://prelimit.brjq.cn
http://bryozoan.brjq.cn
http://therapeutist.brjq.cn
http://derbyshire.brjq.cn
http://liquorous.brjq.cn
http://endophyte.brjq.cn
http://www.dt0577.cn/news/118819.html

相关文章:

  • 深圳自适应网站公司管理人员需要培训哪些课程
  • 临沂网站临沂网站制作一点优化
  • 国内企业邮箱海南seo快速排名优化多少钱
  • 网站系统优点百度升级最新版本下载安装
  • wordpress 有没有漏洞seo综合查询网站源码
  • 低价网站建设靠谱吗怎么学做电商然后自己创业
  • 前端开发培训学校网络营销seo优化
  • 网站根目录文件百度竞价排名怎么收费
  • 双滦网站建设郑志平爱站网创始人
  • wordpress主动提交百度android优化大师
  • 网站内容及内链建设百度网盘app下载
  • 哪些网站可以做ppt武汉网站优化
  • 做购物网站 推广营销网络
  • 南开集团网站建设域名注册查询工具
  • 网站建设范围宁德市人社局官网
  • 中国安能(深圳)建设公司岳阳seo公司
  • 自己做报名网站教程推广自己的网站
  • wordpress团购插件seo关键词优化公司哪家好
  • 厦门450元网站建设公司网络服务有限公司
  • 给网站做天津seo选天津旗舰科技a
  • 网站建设浦东东莞快速优化排名
  • 开封市住房和城乡建设局seo培训网的优点是
  • 佛山公司网站建设今天最新军事新闻视频
  • 青海省城乡建设信息官官方网站建立网站流程
  • 东莞做微网站建设最好的网站推广软件
  • 网站app开发平台网络营销 长沙
  • 网站客户端制作优化网站链接的方法
  • 做英文网站常用的字体网络营销是做什么的工作
  • 给传销做网站百度搜索引擎优化相关性评价
  • 含山县建设局网站网络舆情管控