V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
sunxfancy

VSCode 中的 Compiler Explorer

  •  
  •   sunxfancy · Dec 4, 2023 · 1822 views
    This topic created in 875 days ago, the information mentioned may be changed or developed.

    最近写了一个VSCode 插件来查看 clang 编译器内部的工作流程,每一阶段的输出,以及追踪最终输出映射回源文件的哪里。目前功能上非常类似Compiler Explorer。最后输出结果也像 CE 一样可以对应查看哪行汇编对应哪行源码。

    做这个东西的目的是方便开发 clang 和下面的各个 pass ,这个工具可以支持比较两个 clang 命令,查看具体是哪个 pass 开始 IR 变得不一样了,这样就比较容易定位问题。本地版本也比较容易调试本地刚刚编译好的 clang 。

    如果获得了比较积极的反馈,可能接下来会添加更多功能,下一步打算支持 LTO 或者是编译 CUDA 的命令。如果觉得有用,请给个好评。如果有改进建议也请留言发 issue 。

    VSCode LLVM Compiler Explorer - Visual Studio Marketplace

    hhjuteman
        1
    hhjuteman  
       Dec 4, 2023
    牛!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   991 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 20:12 · PVG 04:12 · LAX 13:12 · JFK 16:12
    ♥ Do have faith in what you're doing.