-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/08/11 07:33, Michael Matz wrote: > Hi, > > the problem is that some initializers expand to loops. If such > initializers are inserted on edges we have looping control flow on them. > Even if we have no loops, but normal control flow on them (which can > happen in other situations) we still forget to initialize JUMP_LABEL on > them leading to potential problems downstream (no idea why we never hit > any real problems until we had loops on edges, this problem is latent > since expand from SSA form). > > So, we have to initialize the jump labels somewhen. The obvious idea to > simply call rebuild_jump_labels after all insertions are done doesn't > work, because the jump labels are already needed for splitting edges (for > patching the jump insns), which insertion might cause. > > So, instead than this I've added another interface to initialize jump > labels for a non-main chain of instructions (in fact it's the same as with > the main chain, merely not diddling with the forced_labels list). > > Fixes the testcase, gcc dg.exp is clean, I'm currently regstrapping this > on x86_64-linux. Okay if that passes? > > > Ciao, > Michael. > PR middle-end/48389 > * jump.c (rebuild_jump_labels_1, rebuild_jump_labels_chain): New > functions. > (rebuild_jump_labels): Call rebuild_jump_labels_1. > * rtl.h (rebuild_jump_labels_chain): Declare. > * cfgexpand.c (expand_gimple_basic_block): Use PAT_VAR_LOCATION_LOC, > not INSN_VAR_LOCATION_LOC. > (gimple_expand_cfg): Initialize JUMP_LABEL also on insn inserted > on edges. > > testsuite/ > * gcc.target/i386/pr48389.c: New test. I'd pondered a similar approach, but hadn't tried an implementation. Good to see it wasn't hard to make it work. I like this better than Steven's approach. OK by me.
Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNnyPuAAoJEBRtltQi2kC7us4H/02MnP3HKapVMu/DoXAwyxBJ 6lN8xSdFY7Z/DQbHnU9SiKvB8UlcPQs1HHN4MiFrNZ23n0Qhtd4Z4bphbnzb2cXs gayymOheYGlEy7U/YHTUCjqOryMZbkwYybNbrFTlkl4d5Ymp2HEphZHn8G/8sRIr 9LY4o++M08zvZwX5WGd/NFJ9UosxCayhmfvA+raSwAuoz00EgD2Ns5KiqsLIhSey A9RxKkV2Czo2piqdO2wlv0NtVzQMAyDsDU5pv+1zec6Vf1UuuZzLslPGVdVyNQqk NCoz5gO8AyPLiMuNp57W0RtLtXHdwwGGVEv3y5AZ7T4bVvTVlAUuFhixeAc5tQ0= =jS34 -----END PGP SIGNATURE-----