This is the mail archive of the gcc-patches@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: [PATCH] Do not use invalid log links


There are a couple of things it should do:

(1) Use REG_BASIC_BLOCK as a smoke test.  If it equals BLOCK_FOR_INSN,
    then you know the value is confined to the current block, and can
    return false without knowing whether it's a constant.

(2) The scan from "first" is doltish. It may scan the current block
twice. It doesn't scan all blocks. The second loop should be rewritten to use FOR_EACH_BB.

I had noticed (2) myself. But then, I'm also tempted to change it to respectively "return 0;" and "return 1;", and compare the resulting assembly outputs.


Paolo


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