[llvm-commits] [LLVMdev] [PATCH] Refactoring the DFA generator

Sean Silva silvas at purdue.edu
Thu Jun 14 09:34:11 PDT 2012


Thank you for using a deterministic sort order for the std::set :)

One nit: please make as much as possible private to the translation unit.
Run

nm DFAPacketizerEmitter.cpp.o | awk '$2 == "T"' | c++filt

to ensure that only the "emit" function is being exported.

I can't comment on the validity of this optimization since I'm not familiar
with the algorithm that this code uses.

--Sean Silva

On Thu, Jun 14, 2012 at 6:22 AM, Ivan Llopard <ivanllopard at gmail.com> wrote:

> Hi,
>
> I've refactored the DFA generator in TableGen because it takes too much
> time to build the table of our BE and I'd like to share it.
> We have 15 functional units and 13 different itineraries which, in the
> worst case, can produce 13! states. Fortunately, many of those states are
> reused :-) but it still takes up to 11min to build the entire table. This
> patch reduces the build time to 5min, giving a speed-up factor greater than
> 2.
>
> It contains small changes:
> - Transitions are stored in a set for quicker searches
> - canAddInsnClass() API is split in two API's:
>  - canAddInsnClass() which perform a quick verification about the
> possibility of having new states for a given InsnClass
>  - AddInsnClass() performs the actual computation of possible states.
>
> I've regenerated the DFA table of Hexagon and all seems to be ok.
>
> What do you think about these changes ?
>
>
> Ivan
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120614/8b514795/attachment.html>


More information about the llvm-commits mailing list