tra added a subscriber: echristo.
tra added a comment.

This was not intended. :-( I was unaware that GetCPUAndFeaturesAttributes() 
would add any feature that looks like a valid CPU name to the target-cpu 
attribute.
All I needed is to make builtins available or not. Setting them as function 
attributes is not what we need here.

I'm not sure what's the best way to deal with this. On one hand I do need to 
make some builtins available depending on combination of GPU arch and PTX 
version. The only way to do it is via the features. On the other hand, the 
features appear to propagate to LLVM IR, which is something I don't need or 
want.

One way would be to introduce some sort of feature blacklist which would 
prevent them from being converted to function attributes.
Or, perhaps, we can change TARGET_BUILTIN or create something similar which 
would allow availability of builtins w/o relying on features.

As a short-term fix we can disable feature-to-function attribute propagation 
for NVPTX until we fix it.

@echristo -- any other suggestions?


Repository:
  rC Clang

https://reviews.llvm.org/D47070



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to