Tablgen refactoring

Malul, Elior elior.malul at intel.com
Sun Feb 3 07:25:52 PST 2013


To be honest, I think the it is exactly the cases for which god has created the visitor pattern,  but I guess querying for the dynamic type is also an option..
Attached is the new patch, which like the previous one eliminates the overload of 'convertValue' which receives 'UnsetInit*'.
Finally the intention is to get rid of all these frustrating overloads, and to leave only one function: 'convetTo(Init*).

I'll appreciate any reviews and comments that you may have.
Thx, Elior

-----Original Message-----
From: Sean Silva [mailto:silvas at purdue.edu] 
Sent: Thursday, January 31, 2013 19:45
To: Malul, Elior
Cc: llvm-commits at cs.uiuc.edu; stoklund at 2pi.dk
Subject: Re: Tablgen refactoring

I think an InitVisitor of some kind might be independently useful, but this particular issue would likely be better solved like you did in you other patch for baseClassOf (i.e. remove the overloads and have just one method taking the base class (Init*) that tests the convertibility condition with regular code instead of using overloading (of a virtual!) to implement that logic). At least for now that will probably be the simplest approach (and it reduces the dependency graph between Init subclasses to only the edges of convertibility, rather than a complete graph).

-- Sean Silva
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tblgen.patch
Type: application/octet-stream
Size: 4269 bytes
Desc: tblgen.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130203/d07b14a7/attachment.obj>


More information about the llvm-commits mailing list