On 12/07/2015 09:39 AM, Ajit Kumar Agarwal wrote:


-----Original Message-----
From: Michael Eager [mailto:ea...@eagerm.com]
Sent: Thursday, December 03, 2015 7:27 PM
To: Ajit Kumar Agarwal; GCC Patches
Cc: Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju Mekala
Subject: Re: [Patch,microblaze]: Instruction prefetch optimization for 
microblaze.

On 12/01/2015 12:49 AM, Ajit Kumar Agarwal wrote:
The changes are made in this patch for the instruction prefetch optimizations 
for Microblaze.

Reg tested for Microblaze target.

The changes are made for instruction prefetch optimizations for
Microblaze. The "wic" microblaze instruction is the instruction
prefetch instruction. The instruction prefetch optimization is done to
generate the iprefetch instruction at the call site fall through path.
This optimization is enabled with  microblaze target flag mxl-prefetch. The purpose of 
adding the flags is that selection of "wic" instruction should be enabled in 
the reconfigurable design and the selection is not enabled by default.

ChangeLog:
2015-12-01  Ajit Agarwal  <ajit...@xilinx.com>

        * config/microblaze/microblaze.c
        (get_branch_target): New.
        (insert_wic_for_ilb_runout): New.
        (insert_wic): New.
        (microblaze_machine_dependent_reorg): New.
        (TARGET_MACHINE_DEPENDENT_REORG): Define macro.
        * config/microblaze/microblaze.md
        (UNSPEC_IPREFETCH): Define.
        (iprefetch): New pattern
        * config/microblaze/microblaze.opt
        (mxl-prefetch): New flag.

Signed-off-by:Ajit Agarwal ajit...@xilinx.com


Thanks & Regards
Ajit


+  rtx_insn *insn, *before_4 = 0, *before_16 = 0;  int addr = 0, length,
+ first_addr = -1;  int wic_addr0 = 128 * 4, wic_addr1 = 128 * 4;

Especially when there are initializers, I prefer to see each variable declared on a 
separate line.  If the meaning of a variable is not clear (and most of these are 
not), include a comment >>before the declaration.

+        if (first_addr == -1)
+          first_addr = INSN_ADDRESSES (INSN_UID (insn));

Can be moved to initialize first_addr.

+        addr = INSN_ADDRESSES (INSN_UID (insn)) - first_addr;

Is "addr" and address or offset?  If the latter, use a more descriptive name.


+        if (before_4 == 0 && addr + length >= 4 * 4)
+          before_4 = insn;
...

Please add comments to describe what you are doing here.  What are before_4 and 
before_16?  What are all these conditions testing?


+      loop_optimizer_finalize();

Space before parens.

All the above comments are incorporated. Updated patch is attached.

Regtested for Microblaze target.

Mibench/EEMBC benchmarks are run on the hardware enabling the mxl-prefetch and 
the run goes through fine
With the generation of "wic" instruction.

[Patch,microblaze]: Instruction prefetch optimization for microblaze.

The changes are made for instruction prefetch optimizations for Microblaze. The 
"wic"
microblaze instruction is the instruction prefetch instruction. The instruction 
prefetch
optimization is done to generate the iprefetch instruction at the call site 
fall through
path. This optimization is enabled with  microblaze target flag mxl-prefetch. 
The purpose
of adding the flags is that selection of "wic" instruction should be enabled in 
the
reconfigurable design and the selection is not enabled by default.

ChangeLog:
2015-12-07  Ajit Agarwal  <ajit...@xilinx.com>

        * config/microblaze/microblaze.c
        (get_branch_target): New.
        (insert_wic_for_ilb_runout): New.
        (insert_wic): New.
        (microblaze_machine_dependent_reorg): New.
        (TARGET_MACHINE_DEPENDENT_REORG): Define macro.
        * config/microblaze/microblaze.md
        (UNSPEC_IPREFETCH): Define.
        (iprefetch): New pattern
        * config/microblaze/microblaze.opt
        (mxl-prefetch): New flag.

Signed-off-by:Ajit Agarwal ajit...@xilinx.com

Thanks & Regards
Ajit


Committed revision 232683.


--
Michael Eager    ea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

Reply via email to