This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: STRIP NOPS Question


On Thu, Oct 16, 2008 at 7:12 AM, Balaji V. Iyer <bviyer@ncsu.edu> wrote:
> Hello Everyone,
>    In GCC I found a MACRO called STRIP_NOPS and it is defined as the
> following:
>
> #define STRIP_NOPS(EXP)                                         \
>  while ((TREE_CODE (EXP) == NOP_EXPR                           \
>          || TREE_CODE (EXP) == CONVERT_EXPR                    \
>          || TREE_CODE (EXP) == NON_LVALUE_EXPR)                \
>         && TREE_OPERAND (EXP, 0) != error_mark_node            \
>         && (TYPE_MODE (TREE_TYPE (EXP))                        \
>             == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \
>    (EXP) = TREE_OPERAND (EXP, 0)
>

You are confusing macros at different times in the compiler .
STRIP_NOPS happens at the tree level whilst scheduling happens on RTL
. This isn't the same as the nops you want to introduce for your
pipeline hazards.

>
> I am currently having a VLIW architecture and I want to put NOPs between
> the dependent instructions... So if I disable this #define, then will it
> do the trick? Can someone please explain to me ohw this works?

You need to define your pipeline automaton and then insert nops to
avoid data hazards using machine_reorg or a trick as described by Ian
here.

http://gcc.gnu.org/ml/gcc/2006-03/msg00627.html

cheers
Ramana

>
> Any help is greatly appreciated!
>
> Please CC me in your response since I am not a subscribed to this list.
>
> Yours Sincerely,
>
> Balaji V. Iyer.
>
>
>
> --
>
> Balaji V. Iyer
> PhD Candidate,
> Center for Efficient, Scalable and Reliable Computing,
> Department of Electrical and Computer Engineering,
> North Carolina State University.
>
>
>



-- 
Ramana Radhakrishnan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]