llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

tblgen isn't sufficiently meta

Open lattner opened this issue 16 years ago • 4 comments

Bugzilla Link 8330
Resolution FIXED
Resolved on Sep 07, 2012 00:14
Version trunk
OS All
CC @darkbuck

Extended Description

This crashes tblgen:


class Or4<bits<8> Val> { bits<8> V = {Val{7}, Val{6}, Val{5}, Val{4}, Val{3}, 1, Val{1}, Val{0} }; }

class Whatev<bits<8> x>;

multiclass X<bits<8> BaseOpc> { def bar : Whatev<Or4.V >; }

defm a : X<4>;

The problem is that tblgen needs to complete the instantiation of the anonymous def "Or4", and when it does this there are still symbolic references to BaseOpC. TableGen doesn't have a way to represent this and helpfully responds by crashing.

lattner avatar Oct 07 '10 20:10 lattner

fixed in r163360

darkbuck avatar Sep 07 '12 07:09 darkbuck

Should this PR be changed to status=fixed?

lattner avatar Sep 07 '12 07:09 lattner

fixed in r163360

darkbuck avatar Sep 07 '12 02:09 darkbuck

a re-work on bit/bits value resolving fixes this issue as well as other related issues, please review the code at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120827/149131.html

darkbuck avatar Aug 29 '12 00:08 darkbuck