llvm-project
abfdc8f7 - [OpenMP][flang] Score unknown context selector properties by selector

Commit
13 hours ago
[OpenMP][flang] Score unknown context selector properties by selector Flang records an unknown property such as kind(bogus) or vendor(bogus) as TraitProperty::invalid, which belongs to no selector. Under match_any or match_none, where such a variant can still be selected, the property therefore lost its selector's weight: kind(bogus) added nothing, while an unmatched kind(gpu) adds 2^l, where l is the number of constructs in the context. A score on a selector that mixes known and unknown properties was also added twice, once for the known property and once for invalid, and unknown properties in different selectors shared a single score. Add VariantMatchInfo::addUnknownTrait, which keeps the property unmatched and records its selector and score, and score that selector like any other. Use it in Flang. Clang drops unknown properties while parsing and is unaffected. Fixes: https://github.com/llvm/llvm-project/issues/233029 Assisted-by: GitHub Copilot (Claude Opus 5.5)
Author
Committer
Parents
Loading