[PATCH] D36059: [memops] Add a new pass to inject fast-path code for specific library function calls.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 09:30:42 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D36059#825518, @chandlerc wrote:

> In https://reviews.llvm.org/D36059#825488, @mehdi_amini wrote:
>
> > It seems to me to conceptually belong to the backend. Why isn't this part of CodeGenPrepare (or injected by the target as part of its pre-ISel IR passes)?
>
>
> It definitely is similar to CGP.
>
> The reason I didn't put it there after talking to folks (mostly Hal I think) was because I generally operate under the principle of "if it doesn't need to be in CGP, it should be separate" for maintenance, testing, etc. The usual case which necessitates transforms being in CGP is needing to participate in its iterative process, but that isn't true here. A common practical reason is because the logic is too small or isolated to really make sense as its own pass, but that doesn't seem to be true here as well.


This is my opinion as well (as I think I expressed on IRC). CGP has accumulated a lot of different pieces of functionality because it makes sense for them to iterate (similar to why InstCombine has gotten that way). I see no reason for this to be part of that iterative scheme, and so it can be a separate pass (and, thus, it should be).


https://reviews.llvm.org/D36059





More information about the llvm-commits mailing list