Re: [PATCH 2/2] better dealing with OP_PHISOURCE insn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 9, 2011 at 5:12 AM, Jan Pokorný <pokorny_jan@xxxxxxxxx> wrote:
> -               if (def->opcode == OP_PHI) {
> -                       phi_defines(def, target, defines);
> -                       continue;
> -               }
> -               defines(def->bb, phi->def, target);
> +               /* if this ever fails (very unlikely), it's a sign of a regression */
> +               assert(def->opcode == OP_PHISOURCE);
> +               defines(def->bb, def, target);
>        } END_FOR_EACH_PTR(phi);

That comment usually means there is some thing fishy going on there.
I think you are on to some thing. The original code mean to recursively
define all the phi source, if the phi source is come from another phi node.
But the original code seems wrong. It should lookat def->phi_src->def->opcode
instead of def->opcode. I don't think we should remove the phi_defines there.
I need to double check this as well.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux