[PATCH] D18900: New pre-isel pass SystemZBRCTLoops

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 20:31:17 PDT 2016


hfinkel added a comment.

In http://reviews.llvm.org/D18900#396671, @jonpa wrote:

> Since there seems to be some general interest for a target independent hw-loop pass, I started out thinking that the hw-loop counter might be a simple beginning for it. So I actually first made just a 'hw-loop-count' intrinsic in the main file, but then moved it into a '-s390-' since this is still only a SystemZ pass.
>
> I think this pass could basically be target-independent right now, so the question is if anyone would want this right now? Should I make a systemz pre-isel pass out of this or a new target-independent hw-loop pass with just the hw-loop-count intrinsic implemented?
>
> Regardless, I don't think SystemZ needs the intrinsic, like you pointed out. For just a SystemZ pre-isel pass, it could just be removed. With a target-independent pass, just the isel patterns for it would remain.


I think this could make sense as a target-independent pass? Did you just copy the PPCCTRLoops pass, change the name, change the name of the intrinsics generated, and remove the PPC-specific CTR-register use legality checking? I could certainly see abstracting those bits into callbacks (or just adding some target-independent intrinsics if we can both use the same ones, and adding a callback for additional legality checking to TLI). That seems a much better option than copy-and-paste here.


http://reviews.llvm.org/D18900





More information about the llvm-commits mailing list