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 2/2] add static typed insn_deleted_p


On Thu, 2014-09-11 at 18:49 -0400, tsaunders@mozilla.com wrote:
> From: Trevor Saunders <tsaunders@mozilla.com>
> 
> Hi,
> 
> This changes all callers of INSN_DELETED_P to use one of insn->deleted () insn->set_deleted () or insn->set_undeleted () depending on what they're doing (set_deleted / set_undeleted seem somewhat clearer to me than = 0 / 1).
> 
> bootstrapped + regtested on x86_64-unknown-linux-gnu, and run through
> config-list.mk with a couple other patches. ok?
> 
> Trev
> 
> gcc/
> 
> 	* cfgrtl.c, combine.c, config/arc/arc.c, config/mcore/mcore.c,
> 	config/rs6000/rs6000.c, config/sh/sh.c, cprop.c, dwarf2out.c,
> 	emit-rtl.c, final.c, function.c, gcse.c, jump.c, reg-stack.c,
> 	reload1.c, reorg.c, resource.c, sel-sched-ir.c: Replace INSN_DELETED_P
> 	macro with staticly checked member functions.
> 	* rtl.h (rtx_insn::deleted): New method.
> 	(rtx_insn::set_deleted): Likewise.
> 	(rtx_insn::set_undeleted): Likewise.

I'm not an approver, but a couple of nitpicks:
(A) "staticly" -> "statically"
(B) the above candidate ChangeLog for rtl.h omits the deletion of the
INSN_DELETED_P macro (obviously trivial to fix).

[...]

FWIW, in case it's helpful, I have a script here that I use to help make
ChangeLog entries:
https://github.com/davidmalcolm/gcc-refactoring-scripts/blob/master/generate-changelog.py
(needs to be able to import the sibling "refactor" module)

You feed it a git diff, and it generates a fragment of ChangeLog,
grouped according to subdirectory appropriately (based on which have
ChangeLog files), with each hunk indented so you can see what changed,
and write stuff accordingly (the assumption being that any automated
approach is going to get things wrong, and that human review is
necessary).

Dave


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