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: extra instructions lost from -O0 to -O1


Thomas A.M. Bernard wrote:
> Well I found another way to solve the problem by updating the dce for
> not taking out my instructions.
> 
> I inserted "setallocate" as a native operator in the back-end which
> comes from a GIMPLE node and map to the RTL pattern. Earlier in the
> discussion, it's been discussed that the dce was taking out the
> instruction when flag -O1 was engaged. To solve that, in
> 'tree-ssa-dce.c', I flagged this node with the function,
> "mark_stmt_necessary". And it works fine so far. The instruction is not
> omitted anymore by the dce :-)

Do not add it as a GIMPLE node.  Add it as a builtin function, so that
the tree-level DCE will treat like every other call and not remove it.

IOW, do not add new kinds of node.  Use builtins for trees, and unspecs
for RTL.

Paolo


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