RE: [PATCH] Changes in ‘CodeExtractor’ for call-site block

Nema, Ashutosh Ashutosh.Nema at amd.com
Wed Apr 1 22:18:10 PDT 2015


Thanks Chandler for looking into this.

> There are a bunch of coding convention problems here. 
I’ll fix these.

> Also, you don't provide a test case that this fixes. 
> It's hard to evaluate what problem you're actually solving without the test case.

I was trying to use code extractor for inner loops. 
i.e.
for (i…N){
  for(j..N)
  {}
}

And like to move inner loop to a function.

CodeExtractor is moving loop to a outlined function properly:

OutlinedFunction(args)
{
  for(j..N)
  {}
}
for (i…N){
  call OutlinedFunction(args) // call-site appears in a block
}

But it’s not registering call-site block to outer loop(if available).

Because of un registered call site block in outer loop, loop verification fails with below error:
"Loop block has no in-loop successors!".

I’m not very sure we can write test case for this because currently no optimization 
moves inner loop to a outlined function. I can try if you have any suggestions.

So in this change, I exposed call site block.
If required, optimizations can register call-site block to outer loop.

Hope this explains the problem I'm trying to solve.

Regards,
Ashutosh

-----Original Message-----
From: Chandler Carruth [mailto:chandlerc at gmail.com] 
Sent: Monday, March 30, 2015 3:00 AM
To: Nema, Ashutosh
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Changes in ‘CodeExtractor’ for call-site block

There are a bunch of coding convention problems here. Also, you don't provide a test case that this fixes. It's hard to evaluate what problem you're actually solving without the test case.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7118

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list