On 12/10/16 12:23, cheng...@emindsoft.com.cn wrote:
> From: Chen Gang <cheng...@emindsoft.com.cn>
>
> When check bundle, gcc may still need modify the prev insn. Original
> implementation will lose the prev insn.
>
> Also correct the coding styles of relate code.
>
> 2016-12-10  Chen Gang <gang.chen.5...@gmail.com>
>
>       gcc/
>       PR target/78222
>       * tilegx.c (tilegx_gen_bundle): Reserve prev insn when delete
>       useless insn.

I think this was already fixed by Walt:

------------------------------------------------------------------------
r242617 | walt | 2016-11-19 03:34:17 +0100 (Sat, 19 Nov 2016) | 5 lines
Changed paths:
    M /trunk/gcc/ChangeLog
    M /trunk/gcc/config/tilegx/tilegx.c

TILE-Gx: Fix bundling when encountering consecutive barriers.

         * config/tilegx/tilegx.c (tilegx_gen_bundles): Preserve
           end-of-bundle marker for consecutive barriers.


But the formatting here is still odd, and should be fixed:
TAB usage, single statements in braces, { not in a line of its own.

I am however not sure about this statement:

           /* Never wrap {} around inline asm.  */
           if (GET_CODE (PATTERN (insn)) != ASM_INPUT)

... because this does only exclude asm(""); that is basic asm with
empty assembler string.  To exclude all other forms of asm statements
that are hidden in PARALLEL constructs we would need:

           /* Never wrap {} around inline asm.  */
           if (GET_CODE (PATTERN (insn)) != ASM_INPUT
               && asm_noperands (PATTERN (insn)) < 0)


I think this if-condition is probably unnecessary, because it does
apparently not create any problems although it is completely broken.


Bernd.

Reply via email to