[PATCH] D33758: [globalisel][tablegen] Partially fix compile-time regressions by converting matcher to state-machine(s)
Kristof Beyls via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 00:26:51 PDT 2017
kristof.beyls added a comment.
> Replace the matcher if-statements for each rule with a state-machine. This
> significantly reduces compile time, memory allocations, and cumulative memory
> allocation when compiling AArch64InstructionSelector.cpp.o after r303259 is
> recommitted.
My guess is that the compiler compile time goes down simply because tablegen produces far less code?
Do you also have an insight of how using a state machine "interpreter" changes the run-time of the compiler itself compared to using the "directly-compiled" generated C++ code?
I can't predict really how the different tradeoffs in both approaches will affect the compiler's run-time performance in the end, so it would be nice to share insights you may have for this.
Also, if we end up using a state machine for this, I think it'd be a good idea to, after the design settles, write a blog post or something similar to explain how the state machine works, as I've heard from many people that reverse engineering the DAGISel-produced state machine was hard due to limited or no documentation on it.
https://reviews.llvm.org/D33758
More information about the llvm-commits
mailing list