On 11/21/24 10:56 AM, Robin Dapp wrote:
Hi,

currently we distribute insn patterns in genemit, partitioning them
by the number of patterns per file.  The first 100 into file 1, the
next 100 into file 2, and so on.  Depending on the patterns this
can lead to files of very uneven size.

Similar to the genmatch split, this patch introduces a dynamic
choose_output () which considers the size of the output files
and selects the shortest one for the next pattern.

Bootstrapped and regtested on x86 and power10, aarch64 running.
Regtested on rv64gcv.

gcc/ChangeLog:

        PR target/111600

        * genemit.cc (handle_arg): Use files instead of filenames.
        (main): Ditto.
        * gensupport.cc (SIZED_BASED_CHUNKS): Define.
        (choose_output): New function.
        * gensupport.h (choose_output): Declare.
LGTM. I probably would have removed the !SIZED_BASE_CHUNKS clause, but I can see how we might want it...

jeff


Reply via email to