Initial patch (in progress):
- It seemed like a good idea to make setArgExtAttr available as a member of TargetLibraryInfo to make it available easily.
- Don't know how to handle OpenMP/OMPIRBuilder.cpp as there is no TargetLibraryInfo available. Furthermore, those functions are all declared in a .def file. It would have been nice to put in the extension attributes there, but that's not possible since the type of extension needs to be determined per target, right? Is there by any chance a known single type of extension used for all these function parameters, or is it needed to handle them one by one?
- AddressSanitizer.cpp, MemorySanitizer.cpp, GCOVProfiling.cpp: These have a lot of missing attributes and I started adding as best I could, but not sure about all of them (sext or zext).
It's a little frustrating to have to fill all these out as it seems they really should only ever be used by clang, or? If so, maybe these functions could have something like an llvm-internal attribute so as to do the same trick as before by safely ignoring them?
This looks reasonable.