[LLVMdev] Length restriction in tablegen

Anitha B Gollamudi anitha.boyapati at gmail.com
Wed Jun 26 23:51:31 PDT 2013


On 25 June 2013 22:43, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
>
> On Jun 25, 2013, at 1:45 AM, Anitha B Gollamudi
> <anitha.boyapati at gmail.com> wrote:
>
> > Is there some sort of restriction over class length names in td files.
>
> Only your own sanity, as far as I know.
>
> > For e.g. something like below gives an abort with tablegen. The abort
> > goes away when I reduce the name "my_target_intrinsics_class..." to
> > something shorter. I have not counted the exact length limit though. Is this
> > a known issue?
>
> No, can you reproduce it in a debugger? Please file a bug report with a
> stack trace and steps to reproduce.
>

The issue is seen on windows (x86_64)and for a private target. I tried
some time debugging tablgen on windows but it might take more time to
look into ParseObjectBody and ParseItem functions for the error.


The error that I see is as follows:

tblgen.exe -I .  -gen-tgt-intrinsic  -o HSAILGenIntrinsics.inc ..\..\..\HSAIL.td

..\..\..\..\..\..\utils\TableGen\build\w8\B_dbg\tblgen.exe: Unknown
unexpected exception occurred.


The problem site seems to be the following definition:

def int_HSAIL_atomic_compare_exchange_strong_gi32 :
GCCBuiltin<"__atomic_cas_gi32">,

defm a_c_e_strong_gi  :
TernaryAtomicB32<int_HSAIL_atomic_compare_exchange_strong_gi32,
.....>;


I know it is not of much information. But I can definitely see that
reducing the length of class name "
int_HSAIL_atomic_compare_exchange_strong_gi32 " to something like
"int_hsail_a_c_e_gi32 helps in getting through this error.

I have encountered this issue at other places... Not sure if other
targets faced this issue. It might help to see if this issue gets
reproduced in upstreamed targets like X86.

--
 Anitha



More information about the llvm-dev mailing list