[LLVMdev] Utilizing gperf for TableGen

Bill Wendling isanbard at gmail.com
Fri Jan 4 01:18:14 PST 2008

On Jan 3, 2008, at 6:57 AM, Wilhansen Li wrote:

> On Wed, 2 Jan 2008, Chris Lattner wrote:
>> This should be fixed now, please verify, thanks!
>> -Chris
> The newer code that TableGen produces is indeed lower however, MSVC
> still throws the same error messages (and moreover, I don't think
> they're fixing it anytime soon.. I'll try to re-open this issue to
> them). Also, it seems that the new code produces an extraneous "if
> (0);" statement before each of the else-if chains. Normally, compilers
> would (and should) just optimize them away but it still counts agains
> MSVC's ``nesting limit''.

I think the "if (0);" is there to make the code generator easier. The  
loop that produces the if-then statements now just has to generate  
the text:

	else if (...)
	  IntrinsicID = ...;

instead of checking if it should emit the "else".


More information about the llvm-dev mailing list