[llvm-commits] [llvm] r69810 - in /llvm/trunk: docs/TableGenFundamentals.html test/TableGen/MultiClassInherit.td utils/TableGen/TGParser.cpp utils/TableGen/TGParser.h
Chris Lattner
clattner at apple.com
Fri May 1 16:53:09 PDT 2009
On May 1, 2009, at 4:13 PM, David Greene wrote:
>
> As I understand things, the multiclass implementation is a bit of a
> black
> sheep, relying on the CurMultiClass variable both as a state
> specifier (am
> I parsing a multiclass or not?) and a conveyor of information (what
> multiclass
> am I looking at?). The consequence is that recursion becomes
> difficult and
> there are various special cases throughout the code (see ParseDef, for
> example). I would have preferred to somehow unify the class and
> multiclass
> inheritance mechanisms because they're very simimlar, but the global
> state
> represented by CurMultiClass prevents that.
>
The historic reason for this was that the tblgen parser used to be
written in bison, which only allowed passing of state by globals. It
would be really nice to eliminate this ugly and horrible hack.
-Chris
More information about the llvm-commits
mailing list