[PATCH] D47070: [CUDA] Upgrade linked bitcode to enable inlining

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 18 11:03:35 PDT 2018


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





More information about the cfe-commits mailing list