------- Comment #14 from jakub at gcc dot gnu dot org 2009-04-29 10:12 ------- Also, couldn't we use the information computed by compute_alignments and assume CODE_LABELs are aligned? Probably would need to add label_to_max_skip (rtx) function to final.c, so that not just label_to_alignment, but also LABEL_TO_MAX_SKIP is available to backends. Then when we know for the label in the testcase that .p2align 4,,10 .p2align 3 then we know the 16 byte boundary is either at that label, or at most 5 bytes before it, so all we need is consider any jumps/calls in the last 5 bytes before the label.
For min_insn_size, is it possible to find out for which non-jump/call insns get_attr_length might not be exact (i.e. be a maximum guess rather than guaranteed size (though of course, this is also just an optimization, so 100% guarantees aren't needed either))? If so, we could use get_attr_length for the insns where it is known to be exact... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942