[Beignet] [PATCH] GBE: add thread_local for class static variable

Pan, Xiuli xiuli.pan at intel.com
Thu Oct 29 00:43:57 PDT 2015


Thanks for your advice, I will try what you said and test again.

Thanks
Xiuli Pan 

-----Original Message-----
From: Song, Ruiling 
Sent: Thursday, October 29, 2015 3:05 PM
To: Pan, Xiuli <xiuli.pan at intel.com>; beignet at lists.freedesktop.org
Cc: Pan, Xiuli <xiuli.pan at intel.com>
Subject: RE: [Beignet] [PATCH] GBE: add thread_local for class static variable

You don't need to modify " static char ID ", and any llvm pass has the "static char ID", see llvm_to_gen.cpp, lots of llvm passes were invoked.
llvm will not modify the value of ID. It just use the address of ID to identify a pass.
The issue occurs because of " static map<CallInst*, PrintfSet::PrintfFmt*> printfs ", why don't change it to non-static member?
I think we should not use static member like 'printfs' in a FunctionPass.

Thanks!
Ruiling



More information about the Beignet mailing list