[LLVMdev] [llvm-commits] [PATCH] Refactoring the DFA generator
Anshuman Dasgupta
adasgupt at codeaurora.org
Fri Aug 24 08:01:29 PDT 2012
Hi Ivan,
> I missed last 2 commits made by Alexey. Following his advices, I
> updated the patch. It should be ok now.
> Thanks Anshu!
>
> I've recently added more functional units to our Schedule.td and the
> generation time became painfully long. In fact, the main problem was
> in writeTableAndAPI(). I propose another patch to fix it:
> - Fixed memory leaks.
> - Transitions are attached to states.
>
> I've regenerated the DFA table of Hexagon and everything is ok.
> Please review it.
I had a few comments about the design change that you're introducing
with the patch:
This patch adds multiple points of control for adding a transition:
there's now an addTransition() for DFA and another addTransition() for
State that populate different data structures. We shouldn't need both. I
am okay with transitions being folded into the State class if it results
in significant speedup in DFA generation. But then please remove the
Transition mechanism for the DFA class (stateTransitions).
For transitions being folded into State:
> std::map<unsigned, Transition *> inputToTrans;
We don't need a map to Transition* here; we can directly map from input
to stateNum. You should be able to use a LLVM data structure.
-Anshu
More information about the llvm-dev
mailing list