gtcasl/gpuocelot

StructuralTransform fails on the attached test case.

Closed this issue · 7 comments

From rodrigo.d.dominguez@gmail.com on September 14, 2011 16:26:56

StructuralTransform fails on the attached test case. I used tools/CFG to produce the attached control flow graphs. The right transformation would clone BB_1_0009. The attached files are:

  • test.ptx: the input file to CFG
  • test.pdf: the output of CFG w/o structural transformation
  • test.st.pdf: the output of CFG with structural transformation

Attachment: test.ptx test.pdf test.st.pdf

Original issue: http://code.google.com/p/gpuocelot/issues/detail?id=58

From wu.haich...@gmail.com on September 15, 2011 08:24:55

My structural analysis treat test.st.pdf as structured.

BB3, BB4, BB10 form an if-then
BB6, BB7, BB10_cloned form an if-then
BB3, BB4, BB10, BB5 are then sequential blocks
BB6, BB7, BB10_cloned, BB8 are also sequential block
BB2, BB3, BB4, BB10, BB5, BB6, BB7, BB10_cloned, BB8 are then a if-then-else

From rodrigo.d.dominguez@gmail.com on September 15, 2011 09:41:13

Hi Haicheng,

I don't see how BB3, BB4, and BB10 form an if-then.

From wu.haich...@gmail.com on September 15, 2011 19:07:48

I treat

if(x)
exit();

as an if-then module.

As to lexical order, my implementation does not require it. I run an structural analysis (Muchnick 7.7) to detect the program structure.

From rodrigo.d.dominguez@gmail.com on September 16, 2011 05:28:09

You can't treat it as an if-then because it has a side exit (to the end of the function in this case). I am attaching a graph with the expected result from Zhang's algorithm.

Attachment: test.expected.pdf

From wu.haich...@gmail.com on September 16, 2011 11:37:58

For simplicity, I do not treat exit node as a special node. So it does not have to appear in the end of the function and there may be multiple exit nodes.

From gregory....@gatech.edu on February 02, 2012 10:01:24

So is this not a bug?

Status: Invalid

From rodrigo.d.dominguez@gmail.com on February 02, 2012 10:43:24

I believe this is still an issue.