[PATCH] D44415: [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 14 06:59:04 PDT 2018


chandlerc added a comment.

In https://reviews.llvm.org/D44415#1036911, @jlebar wrote:

> > Also, to address (briefly) what Justin mentioned: I think getting cache locality of single visit of instructions is likely to be more valuable than the overhead of the indirect calls. Could be wrong, but we can also look to see if there is a problem.
>
> Totally agree, but I think I wasn't clear, that's a different comparison from the one I was trying to make.  The question I was trying ask is, given the current loop structure (which I think you're right, is the right structure), is the overhead of indirect calls vs direct (possibly inlined) calls (generated via metaprogramming) significant?


Probably not? But maybe?

That said, generating direct calls here seems really, really hard... Maybe you have an idea I don't see...

The only way I see to make them not indirect, we would need to have heterogeneous collection of callbacks for the various attributes and iterate across it heterogeneously.... Essentially, we'd need to take each collection of callbacks in the constructor so we can deduce all of their types and the number of them in one go, build a tuple of them, and then have the 'run' thing actually use tuple-iteration (maybe w/ a variadic function template) instead of a loop. The complexity of that code just didn't seem worth it w/o a benchmark...


Repository:
  rL LLVM

https://reviews.llvm.org/D44415





More information about the llvm-commits mailing list