[PATCH] D46410: [Target] Diagnose mismatch in required CPU for always_inline functions

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 3 18:02:19 PDT 2018


craig.topper added a comment.

>From the backend codegen perspective it would be fine if the callees instruction features were a subset. So it really depends on why the user wrote the different arch on the callee in the first place. If they did it because of one of the various tuning flags in the backend that we set based on CPU name that information would be lost during the inlining. Maybe a warning would be more appropriate. My main goal was to give the user something more to go on when the instruction set features weren't a subset so we didn't just give them some random feature name that mismatched first.

Experiments with gcc showed that it throws an error for CPU name mismatch. Strangely it even gave an error if one function had a target attribute with an arch= and the command line had the same -march.


https://reviews.llvm.org/D46410





More information about the cfe-commits mailing list