mailwal

[hellollvm] 学习编译libc++时的头文件处理 (41)

Zhouyi Zhou
还是从硬件断点
2 hw watchpoint keep y *(unsigned long *)0x555569fb71e0
stop only if *(unsigned long *)0x555569fb71e0==93825335973472
出发跟对forward.h的分析
我通过断点
10 hw watchpoint keep y *(unsigned long *)0x555569cee5e0
stop only if *(unsigned long *)0x555569cee5e0!=93825336425856&&*(unsigned long *)0x555569cee5e0!=0&&*(unsigned long *)0x555569cee5e0!=93825337842800
跟到了Lexer
(rr) p *(clang::Lexer *)93825336627104
$15 = {<clang::PreprocessorLexer> = {_vptr$PreprocessorLexer = 0x555569b25990 <vtable for clang::Lexer+16>, PP = 0x555569cee198, FID = {ID = 1242},
InitialNumSLocEntries = 1243, ParsingPreprocessorDirective = false, ParsingFilename = false, LexingRawMode = false, MIOpt = {ReadAnyTokens = true,
ImmediatelyAfterTopLevelIfndef = false, DidMacroExpansion = true, TheMacro = 0x555569dbd568, DefinedMacro = 0x555569dbd568, MacroLoc = {
ID = 324889}, DefinedLoc = {ID = 324936}},
ConditionalStack = {<llvm::SmallVectorImpl<clang::PPConditionalInfo>> = {<llvm::SmallVectorTemplateBase<clang::PPConditionalInfo, true>> = {<llvm::SmallVectorTemplateCommon<clang::PPConditionalInfo, void>> = {<llvm::SmallVectorBase<unsigned int>> = {BeginX = 0x555569dc4ff0, Size = 2,
Capacity = 4}, <No data fields>},
static TakesParamByValue = true}, <No data fields>}, <llvm::SmallVectorStorage<clang::PPConditionalInfo, 4u>> = {
InlineElts = "\022\365\004\000\000\001\000b\037\003\005\000\000\001\001h!\a\005\000\000\001\001h\000\000\000\000\000\000\000"}, <No data fields>}},
BufferStart = 0x555569def9b0 "//===", '-' <repeats 71 times>, "===//\n//\n// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n// See https://llvm.org/LICENSE.tx"..., BufferEnd = 0x555569df2c5c "", FileLoc = {ID = 324510}, LangOpts = @0x555569ca2f58, LineComment = true,
Is_PragmaLexer = false, ExtendedTokenMode = 0 '\000',
BufferPtr = 0x555569df0e2e "# include <ctype.h>\n# include <string.h>\n# include <time.h>\n# if _LIBCPP_HAS_WIDE_CHARACTERS\n# include <wctype.h>\n# endif\n_LIBCPP_BEGIN_NAMESPACE_STD\nnamespace __locale {\n//\n// Locale manageme"..., IsAtStartOfLine = true, IsAtPhysicalStartOfLine = true,
HasLeadingSpace = false, HasLeadingEmptyMacro = false, IsFirstTimeLexingFile = true,
NewLinePtr = 0x555569df0e2d "\n# include <ctype.h>\n# include <string.h>\n# include <time.h>\n# if _LIBCPP_HAS_WIDE_CHARACTERS\n# include <wctype.h>\n# endif\n_LIBCPP_BEGIN_NAMESPACE_STD\nnamespace __locale {\n//\n// Locale managem"..., CurrentConflictMarkerState = clang::CMK_None,
DepDirectives = {Data = 0x0, Length = 0}, NextDepDirectiveTokenIndex = 0}
听PyTorch Europe 2026。 来自 yasp.ai的Reza Rahimi和yasp的Stefan Krassin 探讨了将编码智能体应用于编译器构建领域的新方法。他们指出,尽管PyTorch提供了强大的基础设施,但针对多样化硬件优化GPU内核仍然极具挑战性,而市场对高效内核生成的需求随着定制芯片的普及而持续增长。报告展示了一种创新的编译器架构,它作为PyTorch的附加组件,能够接收PyTorch模型或FX图并通过智能体分析模型数学特性和硬件规格,自动生成针对特定目标优化的内核代码,从而弥合模型开发者与底层硬件能力之间的技术鸿沟。 https://www.youtube.com/watch?v=Kywoz4N5KQo