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] Update source location for PRE inserted stmt


> The randomness here means that if we set UNKNOWN_LOCATION to insn, it
> can get source location anywhere. Even with some small code layout
> changes, the location for that insn could change. I would hope that in
> the future, we add an assertion when emitting instruction to enforce
> that INSN_LOCATION is never UNKNOWN_LOCATION. So when generate new
> instructions/stmts, if we can surely know where it is coming from, it
> is fine. Otherwise, instead of using UNKNOWN_LOCATION, we will set its
> location to where it is inserted. How does that sound?

Still the same problem: you cannot make that a general rule, since you don't 
know the coverage status of the instruction just above the insertion point.
If a later optimization moves the new statements around, you may well end up 
with wrong coverage info.

-- 
Eric Botcazou


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