This is the mail archive of the 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: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)

> We added the LIB_CALL_ID because we foresaw that as we modernize the
> rtl passes, that more and more of these passes will be using either
> use-def or def-use chains.  For these optimizations, you rarely make
> linear passes over the instructions, you simply follow the chains from
> one insn of interest to another.

Define "rarely". :-)  The only pass that uses REG_LIBCALL_ID is dce.c and the 
first thing it does is a linear pass over the instructions...

> The LIB_CALL_ID provides a simple constant time test to find out if you have
> landed inside of a lib call.  Removing this structure will only make it
> harder to add passes that only deal with the instructions of interest and
> essentially forces us into the endless inefficient rescanning of blocks
> paradyme that the rtl passes are famous for.

OK, but it's half-backed work since only the new dce.c pass among the RTL 
passes knows of it, and GCC is also famous for its half-back transitions.

> I have not looked at this bug.  I am happy to if you want.  I am sure
> that it will be trivial to modify the pass that moved/created the insn
> in the middle of the libcall to inherit the LIB_CALL_ID from the
> previous insn.

As I said to Daniel, it's probably only the tip of the iceberg.

Eric Botcazou

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