{ "version": "https://jsonfeed.org/version/1", "title": "LLVM", "description": "\u7f16\u8bd1\u5668\u57fa\u7840\u67b6\u6784", "home_page_url": "go/llvm", "feed_url": "feed/llvm.json", "icon": "https://cdn.v2ex.com/navatar/e46d/e7e1/397_large.png?m=1736182057", "favicon": "https://cdn.v2ex.com/navatar/e46d/e7e1/397_normal.png?m=1736182057", "items": [ { "author": { "url": "member/detached", "name": "detached", "avatar": "https://cdn.v2ex.com/avatar/4687/f4af/527789_large.png?m=1722415579" }, "url": "t/1094913", "date_modified": "2025-01-06T16:50:13+00:00", "content_html": "

\u5728\u77e5\u4e4e\u770b\u5230\u4e00\u4e2a\u5f88\u6709\u610f\u601d\u7684\u95ee\u9898\u3002Link

\n

\u95ee\u9898\u539f\u6587\u5982\u4e0b\uff1a

\n

LLVM \u5b9e\u73b0\u4e86\u6307\u4ee4\u8c03\u5ea6\uff0cCPU \u5b9e\u73b0\u4e71\u5e8f\u6267\u884c\uff0c\u5b83\u4eec\u529f\u80fd\u5b58\u5728\u90e8\u5206\u91cd\u590d\uff0c\u533a\u522b\u548c\u8054\u7cfb\u662f\u4ec0\u4e48\uff1f\u5982\u4f55\u534f\u540c\uff1f\nLLVM \u4e2d\u5b9e\u73b0\u7684\u6307\u4ee4\u8c03\u5ea6\u548c\u786c\u4ef6\u7684\u4e71\u5e8f\u6267\u884c\u90fd\u53ef\u4ee5\u89e3\u51b3\u6570\u636e\u4f9d\u8d56\u3001\u51b2\u7a81\u4f9d\u8d56\u3001\u63a7\u5236\u4f9d\u8d56\u7b49\u6307\u4ee4\u5e76\u884c\u95ee\u9898\u3002\u4e5f\u5c31\u662f\u8bf4\u5b83\u4eec\u7684\u529f\u80fd\u5e94\u8be5\u5b58\u5728\u4e00\u5b9a\u7684\u91cd\u590d\uff0c\u8bf7\u95ee\u5b83\u4eec\u533a\u522b\u548c\u8054\u7cfb\u662f\u4ec0\u4e48\uff1f

\n

\u6709\u6ca1\u6709\u597d\u5927\u54e5\u56de\u7b54\u4e00\u4e0b\uff1f

\n

OoO: Out of Order \uff0c\u4e71\u5e8f\u6267\u884c

\n", "date_published": "2024-12-04T04:18:58+00:00", "title": "\u6307\u4ee4\u8c03\u5ea6\u5728 LLVM \u4e0e OoO \u7684\u533a\u522b\u4e0e\u8054\u7cfb\uff1f", "id": "t/1094913" }, { "author": { "url": "member/iqoo", "name": "iqoo", "avatar": "https://cdn.v2ex.com/avatar/91b9/d36b/555363_large.png?m=1711959553" }, "url": "t/959999", "date_modified": "2025-01-06T16:49:34+00:00", "content_html": "

\u7f16\u8bd1 WebAssembly \u65f6\u53d1\u73b0 Mac \u81ea\u5e26\u7684 clang \u7f16\u8bd1\u5668\u65e0\u6cd5\u8bbe\u7f6e --target=wasm32 \u9009\u9879\uff0c\u800c\u6807\u51c6\u7684 clang \u53ef\u4ee5\u3002

\n

\u4e8e\u662f\u7f16\u8bd1\u4e86\u6700\u65b0\u7684 clang \u548c lld \u5e76\u5b89\u88c5\uff08\u4e4b\u524d\u5df2\u4e0b\u8f7d\u8fc7 LLVM \u7684 git \u4ed3\u5e93\uff0c\u56e0\u6b64\u76f4\u63a5\u7f16\u8bd1\uff09:

\n
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=\"clang;lld\" -DCMAKE_INSTALL_PREFIX=/usr/local ../llvm\n\nmake install\n
\n

\u5b89\u88c5\u4f4d\u7f6e\u4e3a /usr/local/bin/clang \uff0c\u7cfb\u7edf\u9ed8\u8ba4\u4f7f\u7528\u8be5\u7248\u672c\u3002\uff08\u539f\u5148\u7684 clang \u4f4d\u4e8e /usr/bin/clang \uff0c\u53ea\u6709 160KB \u3002 \u771f\u6b63\u7684 clang \u5e94\u8be5\u4f4d\u4e8e /Library/Developer/CommandLineTools/usr/bin/clang \uff0c\u6709 200MB+\uff09

\n

\u867d\u7136\u65b0\u7248\u672c\u7684 clang \u652f\u6301 wasm32 \u9009\u9879\uff0c\u4f46\u7f16\u8bd1\u51fa\u73b0\u4e00\u5927\u5806\u95ee\u9898\uff0c\u6240\u6709\u5934\u6587\u4ef6\u90fd\u627e\u4e0d\u5230\u4e86~

\n

\u5373\u4f7f\u7f16\u8bd1\u53c2\u6570\u91cc\u52a0\u4e0a\u7cfb\u7edf\u81ea\u5e26\u7684\u5934\u6587\u4ef6\u8def\u5f84 -I /Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/c++/v1 \u4ecd\u7136\u4e00\u5806\u9519\u8bef\uff0c\u4f8b\u5982 error: \"No thread API\"\u3001fatal error: 'string.h' file not found \u7b49\u7b49\u3002

\n

\u6216\u8005\u4f7f\u7528 LLVM \u63d0\u4f9b\u7684 C \u6587\u4ef6 -I llvm-project/libcxx/include \u4e5f\u51fa\u73b0\u4e00\u5806\u9519\u8bef\u3002

\n

\u8fd9\u662f\u8e29\u5230\u4ec0\u4e48\u5751\u4e86\u5417\uff1f

\n", "date_published": "2023-07-26T11:59:32+00:00", "title": "\u4f7f\u7528 LLVM \u7684 clang \u66ff\u6362\u82f9\u679c\u81ea\u5e26\u7684\u6709\u95ee\u9898\u5417", "id": "t/959999" }, { "author": { "url": "member/therlf", "name": "therlf", "avatar": "https://cdn.v2ex.com/avatar/bc62/6507/546714_large.png?m=1660530505" }, "url": "t/872906", "date_modified": "2025-01-06T16:49:41+00:00", "content_html": "

\u6700\u8fd1\u5728\u770b LLVM \u7684 toturial : Kaleidoscope: Code generation to LLVM IR\uff0c\u91cc\u9762\u7684\u4ee3\u7801\u628a\u6240\u6709\u4e1c\u897f\u90fd\u5199\u5230\u4e00\u4e2a\u6e90\u6587\u4ef6\u4e86\uff0c\u800c\u6211\u9009\u62e9\u5c06\u5b83\u4eec\u5206\u4e3a lexer \u3001parser \u3001ast \u5206\u522b\u5199\u5230\u4e0d\u540c\u7684\u4ee3\u7801\u91cc\uff0c\u7136\u540e\u5206\u522b\u7f16\u8bd1\u6700\u540e\u94fe\u63a5\u5230\u4e00\u5757\u3002

\n

\u8fd9\u662f\u6211\u7684\u7f16\u8bd1\u6307\u4ee4\uff1a

\n

c++ clang++ -g -O3 -I /home/therlf/LLVM/include -I ./ -I /home/therlf/LLVM_Temp/llvm/include `llvm-config --cxxflags --ldflags --system-libs --libs all` ast/CallExprAST.o ast/NumberExprAST.o ast/PrototypeAST.o ast/FunctionAST.o ast/BinaryExprAST.o ast/VariableExprAST.o lexer/lexer.o logger/logger.o parser/parser.o main.cpp -o main

\n

\u7136\u540e\u5c31\u51fa\u73b0\u4e86\u4e00\u7cfb\u5217\u7684undefined error\uff0c\u622a\u53d6\u4e00\u4e9b\u5982\u4e0b\uff1a

\n
\n

/usr/bin/ld: /tmp/main-2b71c8.o:(.data+0x0): undefined reference to llvm::DisableABIBreakingChecks /home/therlf/MyProject/tmp/ast/CallExprAST.cpp:6: undefined reference to llvm::Module::getFunction(llvm::StringRef) const'\n/home/therlf/LLVM/include/llvm/IR/InstrTypes.h:1112: undefined reference to llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::Use*, unsigned int, llvm::Instruction*)' /usr/bin/ld: /home/therlf/LLVM/include/llvm/IR/InstrTypes.h:977: undefined reference to llvm::VectorType::get(llvm::Type*, llvm::ElementCount)'

\n
\n

\u6211\u4e00\u5f00\u59cb\u4ee5\u4e3a\u662f Including path \u7684\u95ee\u9898\uff0c\u4f46\u662f\u6211\u7f16\u8bd1 tutorial \u90a3\u4e2a\u6240\u6709\u4e1c\u897f\u90fd\u5728\u4e00\u5757\u7684\u4ee3\u7801\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u81ea\u5df1\u7f16\u8bd1\u5404\u4e2a\u6a21\u5757\u4e5f\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u5c31\u662f\u5728\u4e00\u8d77\u7f16\u8bd1\u94fe\u63a5\u4e86\u624d\u4f1a\u6709\u95ee\u9898\uff0c\u663e\u793a\u5f88\u591a\u5f88\u591a\"undefined error\"\u3002

\n

\u6240\u4ee5\u6211\u8ba4\u4e3a\u662f\u94fe\u63a5\u7684\u95ee\u9898\uff0c\u5230\u7f51\u4e0a\u641c\u4e00\u4e9b\u535a\u4e3b\u8bf4\u4f60\u5fc5\u987b\u4f7f\u7528lld\u6765\u94fe\u63a5\uff0c\u800c\u4e0d\u662fld\uff0c\u4f46\u662f\u4e4b\u524d LLVM \u6ca1\u6709 lld \u7684\u65f6\u5019\u4e5f\u662f\u7528 ld \u6765\u94fe\u63a5\u7684\uff0c\u6240\u4ee5\u611f\u89c9\u4f7f\u7528 ld \u5e94\u8be5\u4e5f\u53ef\u4ee5\uff0c\u800c\u4e14\u6211\u7f16\u8bd1\u5b8c LLVM \u540e\u6ca1\u6709 lld \u8fd9\u4e2a\u5de5\u5177\u3002

\n

\u6211\u7684\u64cd\u4f5c\u7cfb\u7edf\u662fUbuntu 20.04\uff0cLLVM \u7248\u672c\u4e3a10.0.0svn\u3002\n\u6211\u7684 Makefile \u5982\u4e0b\uff1a

\n
HEADERS = $(shell find ast kaleidoscope lexer logger parser -name '*.h')\nOBJ = ${SOURCES:.cpp=.o}\n\nCC = clang++\nCFLAGS = -g -O3 -I /home/therlf/LLVM/include -I ./ -I /home/therlf/LLVM_Temp/llvm/include\nLLVMFLAGS = `llvm-config --cxxflags --ldflags --system-libs --libs all`\n\n.PHONY: main\n\nmain: main.cpp ${OBJ}\n ${CC} ${CFLAGS} ${LLVMFLAGS} ${OBJ} $< -o $@\n\nclean:\n rm -r ${OBJ}\n\n%.o: %.cpp ${HEADERS}\n ${CC} ${CFLAGS} ${LLVMFLAGS} -c $< -o $@ ```\n\n\n\u4e07\u5206\u611f\u8c22\u60a8\u7684\u5e2e\u52a9\uff01
\n", "date_published": "2022-08-15T02:44:08+00:00", "title": "\u8bf7\u95ee LLVM \u5982\u4f55\u94fe\u63a5\u591a\u4e2a\u76ee\u6807\u6587\u4ef6\u5462\uff1f", "id": "t/872906" }, { "author": { "url": "member/piqizhu8", "name": "piqizhu8", "avatar": "https://cdn.v2ex.com/gravatar/e12f6eeddbc2dbc43f2bc7659e5bcfbc?s=73&d=retro" }, "url": "t/753626", "date_modified": "2025-01-06T16:50:44+00:00", "content_html": "", "date_published": "2021-02-16T16:44:16+00:00", "title": "\u57fa\u4e8e llvm \u5f00\u53d1\u7f16\u7a0b\u8bed\u8a00\uff0c\u6709\u5fc5\u8981\u5b66\u6c47\u7f16\u5417\uff1f\u7406\u7531\u662f\u4ec0\u4e48\uff0c\u8c22\u8c22", "id": "t/753626" }, { "author": { "url": "member/piqizhu8", "name": "piqizhu8", "avatar": "https://cdn.v2ex.com/gravatar/e12f6eeddbc2dbc43f2bc7659e5bcfbc?s=73&d=retro" }, "url": "t/745642", "date_modified": "2025-01-06T16:49:25+00:00", "content_html": "

\u6211\u7684\u6700\u7ec8\u76ee\u6807\u662f\u521b\u9020\u4e00\u95e8\u7f16\u7a0b\u8bed\u8a00

\n
\n

\u56e0\u4e3a\u6211\u770b\u5230 wiki \u4e0a\u8bf4\uff0cllvm \u7528 c++\u5199\u7684\uff0c \u6240\u4ee5\u6211\u731c\u60f3\uff0c\u5982\u679c\u6211\u5b66\u4f1a\u4e86 c++\uff0c \u5c06\u6765\u7528 llvm \u505a\u4e1c\u897f\uff08\u5f00\u53d1\u7f16\u7a0b\u8bed\u8a00\uff09\uff0c \u5e94\u8be5\u4f1a\u5bb9\u6613\u5f88\u591a

\n

\u8bf7\u95ee\u6211\u7684\u89c2\u70b9\u5bf9\u5417\uff1f

\n

\u5404\u4f4d\u524d\u8f88\u80fd\u7ed9\u70b9\u610f\u89c1\u5417\uff1f

\n", "date_published": "2021-01-17T06:34:51+00:00", "title": "\u60f3\u66f4\u719f\u6089 LLVM\uff0c\u662f\u4e0d\u662f\u8981\u5b66\u4f1a c++\uff1f\u8fd8\u8981\u5b66\u5176\u4ed6\u7684\u5417\uff1f", "id": "t/745642" }, { "author": { "url": "member/find456789", "name": "find456789", "avatar": "https://cdn.v2ex.com/gravatar/d467f3b1603e9ceb12ff120c3a295919?s=73&d=retro" }, "url": "t/737666", "date_modified": "2025-01-06T16:50:09+00:00", "content_html": "

\u6211\u4e00\u5f00\u59cb\u9009\u62e9\u5b66 llvm\uff0c\u662f\u53d1\u73b0 llvm \u53ef\u4ee5\u628a\u4ee3\u7801\u7f16\u8bd1\u6210\u5404\u79cd\u5e73\u53f0\u4e0a\u7684\u4e8c\u8fdb\u5236\uff0cllvm ir \u53ef\u4ee5\u8de8\u5e73\u53f0\uff0c\u6211\u5c31\u60f3\u7740\uff0c\u628a\u81ea\u5df1\u7684\u4ee3\u7801 \u8f6c\u6362\u4e3a llvm ir \u5c31\u53ef\u4ee5\u4e86

\n
\n

llvm ir \u91cc\u9ed8\u8ba4\u6709 \u52a0\u6cd5\u548c\u51cf\u6cd5\u7684\u6307\u4ee4

\n

\u6bd4\u5982\u52a0\u6cd5\uff1a

\n
; ModuleID = \"ttt\"\ntarget triple = \"unknown-unknown-unknown\"\ntarget datalayout = \"\"\n\ndefine double @\"fpadd\"(double %\".1\", double %\".2\") \n{\nentry:\n %\"res\" = fadd double %\".1\", %\".2\"\n ret double %\"res\"\n}\n
\n

\u6253\u5370\u529f\u80fd\uff0c\u6211 \u95f4\u63a5\u8c03\u7528\u4e86 c \u8bed\u8a00\u7684 printf \uff08\u6211\u770b\u5230\u7f51\u4e0a\u5176\u4ed6\u4eba\u4e5f\u662f\u5982\u6b64\u7684\uff0c\u6211\u5c31\u6284\u6765\u4e86\uff09\uff1a

\n
; ModuleID = \"\"\ntarget triple = \"unknown-unknown-unknown\"\ntarget datalayout = \"\"\n\ndefine i32 @\"main\"() \n{\nmain.entry:\n %\".2\" = getelementptr inbounds [5 x i8], [5 x i8]* @\".str0\", i32 0, i32 0\n %\".3\" = call i32 (i8*, ...) @\"printf\"(i8* %\".2\")\n ret i32 0\n}\n\ndeclare i32 @\"printf\"(i8* %\".1\", ...) \n\n@\".str0\" = constant [5 x i8] c\"1111\\00\"\n
\n

\u5047\u5982\u6211\u8981\u8bfb\u53d6\u786c\u76d8\u91cc\u7684\u6587\u4ef6\uff0c\u8bf7\u6c42\u67d0\u4e2a\u7f51\u5740\uff0c \u662f\u4e0d\u662f\u65e0\u6cd5\u57fa\u4e8e llvm ir \u6765\u5b9e\u73b0\uff0c\u53ea\u80fd\u60f3\u529e\u6cd5 \u95f4\u63a5\u8c03\u7528 c \u8bed\u8a00\u7684\u63a5\u53e3\uff1f

\n

\u53ef\u662f\u8fd9\u6837\u7684\u8bdd\uff0c\u90a3 llvm ir \u5bf9\u4e8e\u6211\u5c31\u6ca1\u6709\u5b58\u5728\u7684\u4ef7\u503c\u4e86\uff0c \u90a3\u6211\u4e3a\u4ec0\u4e48\u4e0d\u76f4\u63a5\u7528 c \u8bed\u8a00\u5f00\u53d1\u4e00\u95e8\u8bed\u8a00\uff0c\u7c7b\u4f3c python \u57fa\u4e8e c \u8bed\u8a00\u90a3\u6837\uff1f \u4e0d\u662f\u66f4\u7b80\u5355\u5417

\n

\u6709\u5927\u54e5\u80fd\u89e3\u91ca\u4e00\u4e0b\u5417\uff1f

\n

\u8c22\u8c22

\n", "date_published": "2020-12-21T16:28:14+00:00", "title": "\u6211\u7528 llvm \u5b9e\u73b0\u4e86 bb \u8bed\u8a00\u7684\u52a0\u6cd5\u548c\u51cf\u6cd5\uff0c\u4e5f\u5957\u5a03\u7684\u5b9e\u73b0\u4e86\u6253\u5370\u529f\u80fd\uff0c\u90a3\u600e\u4e48\u5b9e\u73b0\u66f4\u9ad8\u7ea7\u7684\uff0c\u5982 http \u8bf7\u6c42\u529f\u80fd\u5462\uff0c\u8be5\u600e\u4e48\u5957\u5a03\u5462\uff1f\u5957 c \u8bed\u8a00\u5417", "id": "t/737666" }, { "author": { "url": "member/find456789", "name": "find456789", "avatar": "https://cdn.v2ex.com/gravatar/d467f3b1603e9ceb12ff120c3a295919?s=73&d=retro" }, "url": "t/737049", "date_modified": "2025-01-06T16:49:05+00:00", "content_html": "

\u6211\u7684\u7406\u89e3\u662f\uff0cllvm ir \u91cc\u7684\u8bed\u6cd5\uff0c\u5e94\u8be5\u4e5f\u7c7b\u4f3c\u4e00\u95e8\u7f16\u7a0b\u8bed\u8a00\uff0c\u4f46\u8fd9\u4e2a\u8bed\u8a00\u662f\u9488\u5bf9\u5927\u90e8\u5206\u786c\u4ef6\u5e73\u53f0\u901a\u7528\u7684

\n

\u6211\u53ea\u8981\u628a\u6211\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u7ffb\u8bd1\u6210 llvm ir \u91cc\u7684\u8bed\u8a00\uff0c \u5c31\u53ef\u4ee5\u5b9e\u73b0\u4e00\u95e8\u53ef\u4ee5\u5728\u5927\u591a\u6570\u5e73\u53f0\u7f16\u8bd1\u7684\u8bed\u8a00\u4e86

\n

\u6240\u4ee5\uff0c\u5728\u6211\u7684\u8bed\u8a00\u91cc\uff0c\u6211\u8981\u5b9e\u73b0 print(\"hello world\"), \u90a3\u6211\u5c31\u8981\u638c\u63e1 llvm ir \u91cc\uff0c\u600e\u4e48\u5b9e\u73b0 \u6253\u5370 hello word,

\n

\u5982\u679c\u6211\u8981\u5b9e\u73b0 \u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\u7684\u529f\u80fd\uff0c \u5c31\u8981\u638c\u63e1 \u7528 llvm ir \u8bed\u8a00\u5b9a\u4e49\u51fd\u6570\u7684\u65b9\u6cd5

\n

\u53ea\u6709\u638c\u63e1\u4e86 llvm ir \u8bed\u8a00\uff0c \u624d\u80fd\u5b9e\u73b0\u8fd9\u4e2a\u7ffb\u8bd1\u7684\u8fc7\u7a0b

\n

\u8bf7\u95ee\u6211\u7684\u7406\u89e3\u5bf9\u5417\uff1f \u6211\u5e94\u8be5\u600e\u4e48\u529e

\n
\n

\u4e0b\u56fe\u662f\u6211\u53d1\u73b0\u7684 llvm ir \u7684\u8bed\u8a00

\n

\u5982\u56fe

\n

\"image.png\"

\n", "date_published": "2020-12-19T07:15:47+00:00", "title": "\u6211\u60f3\u7528 llvm \u5236\u4f5c\u4e00\u95e8\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff0c\u662f\u4e0d\u662f\u8981\u5b66\u4f1a llvm ir \u91cc\u7684\u54ea\u4e2a\u5947\u602a\u7684\u8bed\u6cd5", "id": "t/737049" }, { "author": { "url": "member/dangyuluo", "name": "dangyuluo", "avatar": "https://cdn.v2ex.com/avatar/b251/eb66/70143_large.png?m=1674619921" }, "url": "t/704047", "title": "\u7528 Clang \u7f16\u8bd1\u65f6\u5982\u4f55\u5c06\u7f16\u8bd1\u53c2\u6570\u5b58\u8fdb ELF \u7684\u67d0\u4e2a section \u91cc\uff1f", "id": "t/704047", "date_published": "2020-09-03T16:59:06+00:00", "content_html": "

\u6700\u8fd1\u9047\u5230\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662f\u9700\u8981\u4ece\u7f16\u8bd1\u597d\u7684 ELF \u91cc\u63d0\u53d6\u51fa\u7f16\u8bd1\u65f6\u7684\u53c2\u6570\uff0c\u6bd4\u5982 Wall\uff0cWerror \u4e00\u7c7b\u7684\u3002GCC \u4e0b\u5f88\u5bb9\u6613\uff0c\u6709\u4e00\u4e2a section \u53eb.GCC.command.line\u3002\u4f46\u662f Clang \u7f16\u8bd1\u51fa\u7684 ELF \u91cc\u6ca1\u6709\u7c7b\u4f3c\u7684 section \u3002

\n

\u8bf7\u95ee\u54ea\u4f4d\u6709\u70b9\u601d\u8def\uff1f\u6211\u5e94\u8be5\u600e\u4e48\u53bb\u627e\u3002\u8c22\u8c22

\n" }, { "author": { "url": "member/gainsurier", "name": "gainsurier", "avatar": "https://cdn.v2ex.com/avatar/7f9d/d067/156062_large.png?m=1639980903" }, "url": "t/546919", "title": "LLVM 8.0 \u53d1\u5e03 WebAssembly target \u79fb\u9664\u5b9e\u9a8c\u6807\u7b7e", "id": "t/546919", "date_published": "2019-03-21T03:15:41+00:00", "content_html": "https://lists.llvm.org/pipermail/llvm-announce/2019-March/000082.html

- speculative load hardening
- concurrent compilation in the ORC JIT API,
- no longerexperimental WebAssembly target
- a Clang option to initialize automatic variables
- improved pre-compiled header support in clang-cl
- the /Zc:dllexportInlines- flag
- RISC-V support in lld." }, { "author": { "url": "member/ecnelises", "name": "ecnelises", "avatar": "https://cdn.v2ex.com/avatar/092f/49cd/89617_large.png?m=1673359987" }, "url": "t/540335", "date_modified": "2025-01-06T16:50:21+00:00", "content_html": "

\u80cc\u666f

\n

\u8981\u505a\u672c\u79d1\u6bd5\u8bbe\u4e86\uff0c\u73b0\u5728\u60f3\u7684\u4e3b\u9898\u662f\u57fa\u4e8e LLVM \u7684\uff08\u56e0\u4e3a\u5b9e\u4e60\u505a\u7684\u4e8b\u4e5f\u8ddf LLVM \u6709\u5173\uff09\uff0c\u4f46\u662f\u50cf\u8ba8\u8bba\u5bc4\u5b58\u5668\u5206\u914d\u8fd9\u6837\u7684\u4e1c\u897f\u5f04\u51fa\u6765\u597d\u50cf\u5230\u6700\u540e\u4e5f\u53ea\u80fd\u6210\u4e00\u7bc7\u6587\u732e\u7efc\u8ff0\uff0c\u4e0d\u8ba8\u8001\u5e08\u559c\u6b22\u5de5\u4f5c\u91cf\u4e5f\u4e0d\u5927\u3002

\n

\u7136\u540e\u60f3\u5230\uff0c\u65e2\u7136\u51e0\u4e4e\u6240\u6709\u8bed\u8a00\u90fd\u80fd\u7f16\u8bd1\u5230 LLVM IR\uff0c\u90a3\u4e48\u8981\u662f\u6709\u4e00\u4e2a\u57fa\u4e8e LLVM IR \u7684\u5305\u7ba1\u7406\u5668\uff0c\u4e0d\u662f\u4ef6\u5f88\u6709\u610f\u601d\u7684\u4e8b\u60c5\uff1f

\n

\u95ee\u9898

\n

\u7b2c\u4e00\u4e2a\u60f3\u5230\u7684\u95ee\u9898\u662f\uff0c\u50cf C++ \u6216\u8005\u5176\u4ed6\u7f16\u8bd1\u578b\u8bed\u8a00\uff0c\u90fd\u662f\u6709 Name Mangling \u673a\u5236\u7684\u3002\u5982\u679c\u8981\u6c42\u7f16\u8bd1\u51fa\u6765\u7684\u7b26\u53f7\u80fd\u76f8\u4e92\u94fe\u63a5\uff0c\u5199\u4ee3\u7801\u7684\u65f6\u5019\u8fd8\u5f97\u81ea\u5df1\u628a extern \u8fd9\u6837\u7684\u5173\u952e\u5b57\u52a0\u4e0a\u3002\u4e0d\u8fc7\u5728\u8fd9\u4e00\u5c42\uff0c\u53ef\u4ee5\u8981\u6c42\u7528\u6237\u5728\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u91cc\u6307\u5b9a\u5bfc\u51fa\u7b26\u53f7\u7684\u540d\u5b57\u548c\u7b7e\u540d\uff0c\u597d\u50cf\u8fd8\u662f\u4e2a\u597d\u4e8b\u3002

\n

\u7b2c\u4e8c\u4e2a\u95ee\u9898\u662f\uff0c\u8fd9\u4e9b\u4ee3\u7801\u4f1a\u4e0d\u4f1a\u5b58\u5728\u8de8\u5e73\u53f0\u4e0a\u7684\u969c\u788d\u3002\u867d\u7136 LLVM IR \u901a\u5e38\u6765\u8bf4\u7684\u786e\u53ef\u4ee5\u8de8\u5e73\u53f0\uff0c\u4f46\u662f\u4e0d\u540c\u5e73\u53f0\uff08\u67b6\u6784 /\u64cd\u4f5c\u7cfb\u7edf\uff09\u7684\u7f16\u8bd1\u5668\u524d\u7aef\u751f\u6210\u7684 IR \u4f1a\u4e0d\u4f1a\u4e0d\u4e00\u6837\uff0c\u4ee5\u53ca\u4f1a\u4e0d\u4f1a\u4ea7\u751f\u4e00\u4e9b\u5e73\u53f0\u76f8\u5173\u7684\u4ee3\u7801\u73b0\u5728\u90fd\u4e0d\u592a\u6e05\u695a\uff0c\u5f97\u518d\u53bb\u770b\u770b\u3002

\n

\u7b2c\u4e09\u4e2a\u95ee\u9898\u662f\uff0c\u591a\u6570\u8bed\u8a00\u7684\u53ef\u6267\u884c\u6587\u4ef6\u6700\u540e\u90fd\u9700\u8981\u4f9d\u8d56 Runtime \u6765\u8fd0\u884c\u3002\u6240\u4ee5\u5047\u8bbe\u8981\u505a\u5305\u7ba1\u7406\u5668\u7684\u8bdd\uff0c\u662f\u4e0d\u662f\u5f97\u8981\u6c42\u8fd9\u4e9b IR \u90fd\u4e0d\u80fd\u4f9d\u8d56\u5404\u81ea\u8bed\u8a00\u7684 Runtime \uff1f\u597d\u50cf\u5230\u8fd9\u6837\u7684\u8bdd\uff0c\u5c31\u8ddf\u666e\u901a\u7684 FFI \u5dee\u4e0d\u591a\u4e86\uff0c\u5c31\u5269\u4e0b LLVM IR \u6bd4\u6c47\u7f16\u5c42\u6b21\u9ad8\u70b9\u8fd9\u4e2a\u4f18\u52bf\u4e86\u2026\u2026

\n

\u6c42\u52a9

\n

\u5404\u4f4d\u719f\u6089 LLVM \u7684\u5927\u4f6c\u4eec\u5bf9\u8fd9\u4e2a Idea \u6709\u4ec0\u4e48\u5efa\u8bae\u5417\uff1f\u6216\u8005\u6709\u4ec0\u4e48\u6211\u6ca1\u60f3\u5230\u7684\u8ddf LLVM \u6709\u5173\u7684\u8bfe\u9898\u4e5f\u53ef\u4ee5\u544a\u8bc9\u6211\uff0c\u591a\u8c22\uff01

\n", "date_published": "2019-03-02T07:34:13+00:00", "title": "\u5047\u5982\u8981\u5b9e\u73b0\u4e00\u4e2a\u57fa\u4e8e LLVM IR \u7684\u5305\u7ba1\u7406\u5668\uff0c\u6709\u4ec0\u4e48\u5751\u6216\u8005\u786c\u4f24\u5417\uff1f", "id": "t/540335" }, { "author": { "url": "member/forcecharlie", "name": "forcecharlie", "avatar": "https://cdn.v2ex.com/avatar/109b/cf8d/115646_large.png?m=1757296481" }, "url": "t/389095", "date_modified": "2025-01-06T16:49:29+00:00", "content_html": "

\u65e9\u4e0a\u770b reddit \u8bf4 clang 5.0 \u53d1\u5e03\u4e86\u3002\u539f\u6765 clang 5.0 \u9884\u8ba1\u662f 8.23 \u53d1\u5e03\u7684\u3002\u5ef6\u540e\u4e86\u534a\u4e2a\u6708\uff0c\u671f\u95f4\u591a\u53d1\u5e03\u4e86 rc4 rc5

\n

\u90ae\u4ef6\u5217\u8868\uff1a

\n

http://lists.llvm.org/pipermail/llvm-announce/2017-September/000075.html

\n

\u4e0b\u8f7d\u5730\u5740\uff1a

\n

http://releases.llvm.org/download.html#5.0.0

\n

\u5982\u679c\u8981\u5728 Windows \u4e0a\u6784\u5efa LLVM/Clang \u53ef\u4ee5\u4f7f\u7528 clangbuilder.

\n

clangbuilder: https://github.com/fstudio/clangbuilder/

\n

\"\"

\n", "date_published": "2017-09-08T01:37:58+00:00", "title": "LLVM/Clang LLD LLDB 5.0 \u6b63\u5f0f\u53d1\u5e03", "id": "t/389095" }, { "author": { "url": "member/hukangha", "name": "hukangha", "avatar": "https://cdn.v2ex.com/avatar/9661/54d3/33400_large.png?m=1759672844" }, "url": "t/237147", "date_modified": "2025-01-06T16:49:10+00:00", "content_html": "\u5728 RHEL5 \u4e0b\u5b89\u88c5 Youcompleteme \u5404\u79cd\u4f9d\u8d56\u90fd\u9700\u8981\u88c5\uff0c llvm \u53c8\u9700\u8981\u53e6\u4e00\u4e2a gcc \u6765\u7f16\u8bd1\uff0c\u800c\u5de5\u4f5c\u7ad9\u7684\u73af\u5883\u53c8\u4e0d\u80fd\u968f\u4fbf\u6539\uff0c\u4e0d\u77e5\u6709\u6ca1\u6709\u4eba\u6709 RHEL5 \u4e0b\u7684 llvm \u4e8c\u8fdb\u5236\u6587\u4ef6\u53ef\u4ee5\u5171\u4eab\u4e00\u4e0b", "date_published": "2015-11-18T12:29:54+00:00", "title": "\u6709\u54ea\u4f4d\u5728 RHEL5 \u4e0b\u7f16\u8bd1\u8fc7 llvm\uff1f", "id": "t/237147" }, { "author": { "url": "member/randy123", "name": "randy123", "avatar": "https://cdn.v2ex.com/gravatar/ca19fc29e5a841d9c8f42f6dbb8086e8?s=73&d=retro" }, "url": "t/189480", "date_modified": "2025-01-06T16:49:21+00:00", "content_html": "

\u672c\u4eba\u5728\u8fdb\u884cklee\u7684\u4e8c\u6b21\u5f00\u53d1,\u4e3b\u8981\u662f\u5229\u7528\u7b26\u53f7\u6267\u884c\u6765\u8fdb\u884cc++\u7a0b\u5e8f\u8fed\u4ee3\u6df1\u5ea6\u7684\u8ba1\u7b97,\u8001\u5e08\u6307\u6d3e\u7684\u9879\u76ee,\u4e0d\u6e05\u695a\u6709\u6ca1\u6709\u670b\u53cb\u8fdb\u884c\u8fc7\u7c7b\u4f3c\u7684\u9879\u76ee,\u6216\u8005\u6bd4\u8f83\u4e86\u89e3Klee\u548cLLVM\u7684?\u5e0c\u671b\u5e2e\u5fd9\u8bb2\u8ff0\u4e00\u4e0b\u7b26\u53f7\u6267\u884c\u7684\u76f8\u5173\u6982\u5ff5.

\n", "date_published": "2015-05-08T06:07:10+00:00", "title": "\u6709\u6ca1\u6709\u670b\u53cb\u4e86\u89e3 klee \u548c llvm \u554a?", "id": "t/189480" }, { "author": { "url": "member/taotao95", "name": "taotao95", "avatar": "https://cdn.v2ex.com/avatar/cc52/c1b4/52622_large.png?m=1410924240" }, "url": "t/145355", "date_modified": "2025-01-06T16:50:50+00:00", "content_html": "\u81ea\u5e26\u68af\u5b50\u4e5f\u65e0\u6cd5\u8bbf\u95ee\uff0c\u6240\u4ee5\u5e94\u8be5\u662f\u6ca1\u6709\u88ab\u5899\u3002\u4e0d\u77e5\u9053\u6709\u4eba\u80fd\u6b63\u5e38\u8bbf\u95ee\u5417\uff1f", "date_published": "2014-11-10T06:32:07+00:00", "title": "\u5927\u5bb6\u80fd\u8bbf\u95ee LLVM\uff08llvm.org\uff09\u5417", "id": "t/145355" }, { "author": { "url": "member/ihacku", "name": "ihacku", "avatar": "https://cdn.v2ex.com/avatar/c8cd/63e1/3073_large.png?m=1675398764" }, "url": "t/96208", "title": "ClangFormat \u4ee3\u7801\u683c\u5f0f\u5316\u5de5\u5177", "id": "t/96208", "date_published": "2014-01-08T13:25:22+00:00", "content_html": "http://clang.llvm.org/docs/ClangFormat.html" }, { "author": { "url": "member/jiangplus", "name": "jiangplus", "avatar": "https://cdn.v2ex.com/avatar/a6e5/41f4/29919_large.png?m=1365666170" }, "url": "t/69873", "date_modified": "2025-01-06T16:50:17+00:00", "content_html": "", "date_published": "2013-05-23T02:30:52+00:00", "title": "llvm\u8db3\u591f\u6210\u719f\u4e86\u4e48\uff1f\u8ddfGCC\u76f8\u6bd4\u6709\u4ec0\u4e48\u4f18\u52a3\uff1f", "id": "t/69873" }, { "author": { "url": "member/hyh1048576", "name": "hyh1048576", "avatar": "https://cdn.v2ex.com/avatar/585a/c7b6/23476_large.png?m=1342652915" }, "url": "t/47706", "date_modified": "2025-01-06T16:49:14+00:00", "content_html": "http://blog.sina.com.cn/s/blog_5d90e82f0101b37r.html

\u201c\u6700\u8fd1\u4e3a\u4e86\u5728 LLVM \u4e0a\u505a\u4e00\u4e9b\u4e8b\u60c5\uff0c\u5f00\u59cb\u91cd\u65b0\u7406\u89e3 C++\uff0c\u53d1\u73b0\u5b83\u505a\u7684\u597d\u4e9b\u4e8b\u60c5\u5176\u5b9e\u662f\u633a\u4e0d\u9519\u7684\u3002\u5b83\u91cc\u9762\u5b58\u5728\u7684\u90a3\u4e9b\u95ee\u9898\uff0c\u6ce8\u610f\u907f\u514d\u4e00\u4e0b\uff0c\u6216\u8005\u628a\u90a3\u4e9b\u5730\u65b9\u6539\u4e00\u6539\uff0c\u6050\u6015\u4e5f\u5c31\u597d\u4e86\u3002\u201d

\u6211\u89c9\u5f97\u524d\u51e0\u5929 @virushuo \u548c @jjgod \u63d0\u53ca LLVM \u7684\u8ba8\u8bba\u582a\u79f0\u9884\u8a00\u5e1d\u554a~", "date_published": "2012-09-14T05:13:00+00:00", "title": "\u738b\u57a0\u679c\u7136\u5f00\u59cb\u5728 LLVM \u4e0a\u505a\u4e8b\u60c5\u4e86\u2026\u2026", "id": "t/47706" }, { "author": { "url": "member/prajnamas", "name": "prajnamas", "avatar": "https://cdn.v2ex.com/avatar/fe2b/421b/8265_large.png?m=1316841514" }, "url": "t/12323", "date_modified": "2012-04-22T09:38:29+00:00", "content_html": "\u5927\u5bb6\u7528clang\u8fd8\u662fllvm-gcc\u8fd8\u662fdragonegg >~<", "date_published": "2011-04-29T08:24:58+00:00", "title": "\u5c45\u7136\u770b\u5230LLVM\u4e86", "id": "t/12323" } ] } ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86