[PATCH] R600/SI: Use isProfitableToDupForIfCvt

Matt Arsenault arsenm2 at gmail.com
Tue Mar 18 11:23:48 PDT 2014


On Mar 18, 2014, at 11:09 AM, Tom Stellard <tom at stellard.net> wrote:

> On Tue, Mar 18, 2014 at 10:21:56AM -0700, Matt Arsenault wrote:
>> On 03/18/2014 10:12 AM, Tom Stellard wrote:
>>> Are these used outside of the IfConversion pass?  Because we don't use
>>> IfConversion on SI.
>> No. I assume that's because of the control flow intrinsics? I was 
>> planning on trying something that would eventually remove them.
>> 
> 
> The main reason we don't run it on SI is that no one has implemented all
> the required callbacks for predicating instructions or even the
> Insert, Remove, and Analyze Branch functions.
> 
> I'm not sure whether or not the control flow intrinsics make it hard
> or impossible to implement these, but I am interested to hear your idea
> for removing them.

I’ve started to think doing the structurization at the IR level is not the optimal way to do it. I am planning on implementing the algorithm in a recent research paper for how to handle unstructured control flow. Instead of duplicating blocks, it inserts guard variables which keep track of what the predcessor block was. It’s best done much later, and I was going to try implementing it with AnalyzeBranch and co. That’s what the paper recommends, and I tried to see if it could be used on IR, but as expected trying to use it on SSA form was pretty awful. At that point the intrinsics are just obstacles.

-Matt



More information about the llvm-commits mailing list