mgorny added a comment.

In https://reviews.llvm.org/D28304#635620, @cryptoad wrote:

> Hey Michal,
>  If I understand correctly, my next move is to move the CRC32 code into it's 
> own file an only enable SSE 4.2 for this file?


Yes, like that. Have a SSE4.2 CRC32 function in a separate file, and call it 
only when SSE4.2 is determined to be supported. Note that for this you'd need 
to refactor things a bit since it seems that the hw CRC32 code is used commonly 
be SSE4.2 and ARM.

Furthermore, you might want to do the runtime check only when SSE4.2 was not 
enabled at build time, i.e. skip it if user specified -msse4.2 or -march= 
option enabling it explicitly. I guess you could use the `#ifdef` for that (on 
a file where -msse4.2 is not forced).

> Shouldn't COMPILER_RT_HAS_MSSE4_2_FLAG be kept for that purpose or is there 
> an alternative way to do it?

I don't really see a point in keeping it if you can equally easily re-add it in 
a later patch.


https://reviews.llvm.org/D28304



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

Reply via email to