This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: LTO/WHOPR summary streaming fixes
- From: Diego Novillo <dnovillo at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: martinj at suse dot cz, rguenther at suse dot de, gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Oct 2009 11:05:39 -0400
- Subject: Re: LTO/WHOPR summary streaming fixes
- References: <20091020145324.GA8676@kam.mff.cuni.cz>
On Tue, Oct 20, 2009 at 10:53, Jan Hubicka <hubicka@ucw.cz> wrote:
> + /* Write ipcp summary. Â*/
> + static void
> + ipcp_write_summary (cgraph_node_set set)
Document SET. Blank line after comment.
> + {
> + Â ipa_prop_write_jump_functions (set);
> + }
> +
> + /* Read ipcp summary. Â*/
> + static void
Blank line after comment.
>
> ! Â Â Â execute_ipa_summary_passes ((struct ipa_opt_pass_d *) all_regular_ipa_passes);
> ! Â Â }
Watch line wrapping.
> + static void
> + inline_write_summary (cgraph_node_set set)
SET needs documenting.
> + /* Stream out jump function JUMP_FUNC. Â*/
> +
OB needs documenting.
> +
> + /* Read in jump function JUMP_FUNC. Â*/
> +
IB needs documenting.
> + Â bp = lto_input_bitpack (ib);
> + Â jump_func->type = (enum jump_func_type) bp_unpack_value (bp, 3);
> + Â bitpack_delete (bp);
> +
> + Â switch (jump_func->type)
> + Â Â {
> + Â Â case IPA_JF_UNKNOWN:
> + Â Â Â break;
> + Â Â case IPA_JF_CONST:
> + Â Â Â jump_func->value.constant = lto_input_tree (ib, false);
> + Â Â Â break;
> + Â Â case IPA_JF_PASS_THROUGH:
> + Â Â Â jump_func->value.pass_through.operand = lto_input_tree (ib, false);
> + Â Â Â jump_func->value.pass_through.formal_id = lto_input_uleb128 (ib);
> + Â Â Â jump_func->value.pass_through.operation = (enum tree_code) lto_input_uleb128 (ib);
Watch line wraping.
> + Â Â Â break;
> + Â Â case IPA_JF_ANCESTOR:
> + Â Â Â jump_func->value.ancestor.offset = lto_input_uleb128 (ib);
> + Â Â Â jump_func->value.ancestor.type = lto_input_tree (ib, false);
> + Â Â Â jump_func->value.ancestor.formal_id = lto_input_uleb128 (ib);
> + Â Â Â break;
> + Â Â case IPA_JF_CONST_MEMBER_PTR:
> + Â Â Â jump_func->value.member_cst.pfn = lto_input_tree (ib, false);
> + Â Â Â jump_func->value.member_cst.delta = lto_input_tree (ib, false);
> + Â Â Â break;
> + Â Â }
> + Â bitpack_delete (bp);
You are deleting BP twice.
> + }
> +
> + /* Stream out node info. Â*/
> +
NODE and OB need documenting.
> +
> + Â /* Note that flags will need to be read in the opposite
> + Â Â Âorder as we are pushing the bitflags into FLAGS. Â*/
This comment does not apply anymore (probably a left over from
old code?). Bitpacks are packed/unpacked in the same order.
> +
> + /* Srtream in node info. Â*/
s/Srtream/Stream/
NODE and IB need documenting.
> +
> + /* Write jump functions. Â*/
SET needs documenting.
> + Â Â Â struct lto_input_block *ib
> + Â Â Â = lto_create_simple_input_block (file_data,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂLTO_section_ipa_pure_const,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â&data, &len);
I wonder if it makes sense to have simple_input_block anymore.
Do they offer any significant advantage over regular input_block?
Patch looks OK otherwise.
Diego.