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



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

Reply via email to