[PATCH] D66399: [ORCv2] - New Speculate Query Implementation

Praveen velliengiri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 15:40:03 PDT 2019


pree-jackie marked an inline comment as done.
pree-jackie added inline comments.


================
Comment at: llvm/lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp:248-249
+// with call.
+SequenceBBQuery::BlockListTy
+SequenceBBQuery::queryCFG(Function &F, const BlockListTy &CallerBlocks) {
+
----------------
lhames wrote:
> Can you describe more about how SequencedBBQuery differs from BlockFreqQuery?
> 
> In particular: (1) What is the output of this algorithm, queryCFG, and (2) what benefit do we get from scanning to the exit blocks?
The blockfreqquery, only selects the blocks with highest execution frequencies. Based on the observation, often the blocks within the loop nests have high frequency. The idea here is to, traverse back towards the entry node and exit node to collect all the predecessor and successor blocks with call instructions respectively. 
Here the standard hot branch probability (4/5) is used to guide traversal to entry and exit nodes but we 
can customize the branch probability to define own hotness instead of 80%, to have better coverage. 

Algorithm produces a set of basic blocks N, where N >= NHotBlocks, 

that is when N = NHotBlocks, there are no predecessor & successor blocks with call inst. 

when N > NHotBlocks,  x = (N - NHotBlocks)
there are x number of predecessor & successor blocks with call inst which we miss in block freq query. 




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66399/new/

https://reviews.llvm.org/D66399





More information about the llvm-commits mailing list