[PATCH] D108433: [CSSPGO] split context string - compiler changes
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 24 22:09:41 PDT 2021
wenlei added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/SampleProf.h:26
#include "llvm/Support/Allocator.h"
+#include "llvm/Support/DJB.h"
#include "llvm/Support/Debug.h"
----------------
I don't see DJB hash used anywhere, remove as well?
================
Comment at: llvm/lib/Transforms/IPO/SampleContextTracker.cpp:307-309
+ ContextTrieNode *FromNode = getContextFor(Context);
+ if (FromNode == Node)
+ continue;
----------------
hoy wrote:
> wenlei wrote:
> > Curious what triggered this order change?
> The context of an inlined or merged node may be out-of-sync with its tree path so `getContextFor` will AV in that case. This can happen when functions on a tree path are not processed in top-down order, due to recursions.
Could you share a concrete example for such case? I was expecting context to be in-sync with its position in trie, because when we promote a node in trie, we also adjust its context accordingly. Does it also happen before this change?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108433/new/
https://reviews.llvm.org/D108433
More information about the llvm-commits
mailing list