Hi Daniel,
Firstly, I am also not an expert in WOPT and Open64. The following is
just for some of clue that maybe helpful to you.
1. Whirl is AST based IR, while the in/out list used in Data-flow
analysis is based on BB and CFG.
2. According to the Pre_Optimizer() in be/opt/opt_main.cxx. At the
beginning of WOPT, WHIRL IR will be translated into CFG ( a different IR
for SSA-based DFA analysis) after comp_unit->Ssa()->Construct().
3. set a breakpoint after the SSA construction using gdb, and run
comp_unit->Ssa()->Print(), Comp_unit->Cfg()->Print(stderr,1,-1),
Cr->Print_str(true), cr->Print_node(1,stderr), Sr->Print(stderr),
BB_Node->Print(stderr) for object of comp_unit, CODEREP, STMTREP, BB_Node
may help understand what is going on during the OPT, and also help you to
get an idea of how the in/out is generated.
4. If you want to know the actual definition of in/out list of BBs in
CFG of WOPT, looking into the code of opt_bb.cxx/h may be a good start.
Regards,
Kun Ling
On Sat, Oct 12, 2013 at 6:46 AM, daniel tian <xti...@uh.edu> wrote:
> hey guys:
> I have a question about how to get the in/out variables list for a
> block in high level whirl? I checked the def/use chain. But there is no
> such thing in WOPT. I mean there must be a existing module to analysis a
> input block and get the in/out list.
>
> For example:
>
> Block1:
>
> sum = 0;
> for(i=0; i<n; i++)
> {
> A[i] = B[c] + C[c]
> sum+=A[i];
> }
>
> For here, this block require the input list"B, C, n", and the output is
> "A, sum". And "i" is obviously defined in the block. BTW, here the block is
> in IR, but not three address code.
>
> Does anyone have clue?
> Any suggestion is appreciated.
>
> Thank you very much.
> Daniel
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
>
--
http://www.lingcc.com
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel