This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Alan Modra <amodra at gmail dot com>, Jason Merrill <jason at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 9 Feb 2018 22:10:00 +0100
- Subject: Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers
- Authentication-results: sourceware.org; auth=none
- References: <orlgjec1b5.fsf_-_@lxoliva.fsfla.org> <20171110023448.28164-9-aoliva@redhat.com> <or7etsvep6.fsf@lxoliva.fsfla.org> <20180124171232.GG2063@tucnak> <orh8r94s88.fsf@lxoliva.fsfla.org> <orlgg2etl4.fsf@lxoliva.fsfla.org> <20180209035334.GF3846@bubble.grove.modra.org> <6e28e34e-681d-bebb-d815-569eee148de5@redhat.com> <or1shtlvx6.fsf@lxoliva.fsfla.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Feb 09, 2018 at 07:01:25PM -0200, Alexandre Oliva wrote:
> So, as discussed on IRC, I'm trying to use a target hook to allow
> targets to indicate that their length attrs have been assessed for this
> purpose, and a param to make that overridable, but I'm having trouble
> initializing the param from the target hook. How does one do that?
Better in the default version of the target hook check the param
whether it should return true or false, and for analyzed targets
just use an always true (or false, depending on what the hook is)
as the hook.
> By disabling it altogether, we won't get the assembler checks or
> incorrect view numbers in debug info, but we will get plenty of all-zero
> locview lists. Oh well... I guess at this point that's better than
> wrong debug info or assembler failures.
For the debugging of the target issues, you can also use a hack:
in final.c for instructions that have minimum length longer than zero
emit a label right before emitting the insn and after it:
.Lhacke1:
.if (.Lhacke1 - .Lhackb1) == 0
.error "zero length"
.endif
(or perhaps just:
.if (. - .Lhack1) == 0
.error "zero length"
.endif
), then make check various targets with that.
Jakub