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

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 22:17:04 PDT 2017


chandlerc added a comment.

Just want to point out that we're getting a bit far afield of this patch. Would love any comments on the actually technique... So far, I don't have any performance regressions and I'm seeing large wins on benchmarks that happen to be sensiitive to short memcpy and memsets formed out of loops. Still working on size...

In https://reviews.llvm.org/D36059#826960, @mehdi_amini wrote:

> Sure, I agree with having a separate pass. My point was rather about the fact that it is added to the optimization pipeline instead of left up to the target "IR-lowering" passes.
>
> @chandlerc's explanations make sense to me, but seeing it as part of `buildModuleOptimizationPipeline` is still a bit strange. I wonder if this shouldn't be split further to clearly identify the point where we start to do some "lowering" (if we agree to have such conceptual "stage" in the pipeline). A bit like I extracted the "function simplification" part of the pipeline (what runs in a CGSCC alternating with the inliner)


I don't think this is any more or less "lowering" than the vectorizers or partial unrolling. Both are completely dependent on the target for "what ckind of code should i produce?".

I actually view the entire "optimization" phase as somewhat lowering -- we're destroying information and specializing for execution performance on a *particular* target. Many steps here lose significant analysis information in exchange for this.

Still, all of this is somewhat of a larger more meta discussion...


https://reviews.llvm.org/D36059





More information about the llvm-commits mailing list