[PATCH] D29295: Move core RDF files from lib/Target/Hexagon to CodeGen
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 3 05:49:00 PST 2017
kparzysz added inline comments.
================
Comment at: lib/CodeGen/RDFGraph.cpp:596
+ };
+ NodeList Ms = members_if(EqBB, G);
+ if (!Ms.empty())
----------------
hiraditya wrote:
> This function findBlock appears to be O(n) algorithm, and it is used in multiple places where this function is called for each BasicBlock in the function. Is there a way to speed up this algorithm.
The DFG has a private cache where it stores the addresses for quick lookup and it uses its own function to locate block nodes.
This function is restricted to use the public interfaces available from its class hierarchy and from the DFG, so it has to search all blocks. The search itself could be improved a bit, but it would remain O(n), and the code would become more complex.
Repository:
rL LLVM
https://reviews.llvm.org/D29295
More information about the llvm-commits
mailing list