This is an archive of the discontinued LLVM Phabricator instance.

[mlir] squash LLVM_AVX512 dialect into AVX512
ClosedPublic

Authored by ftynse on Mar 10 2021, 2:47 AM.

Details

Summary

The dialect separation was introduced to demarkate ops operating in different
type systems. This is no longer the case after the LLVM dialect has migrated to
using built-in vector types, so the original reason for separation is no longer
valid. Squash the two dialects into one.

The code size decrease isn't quite large: the ops originally in LLVM_AVX512 are
preserved because they match LLVM IR intrinsics specialized for vector element
bitwidth. However, it is still conceptually beneficial to have only one
dialect. I originally considered to use Tablegen multiclasses to define both
the type-polymorphic op and its two intrinsic-related instantiations, but
decided against it given both the complexity of the required Tablegen input and
its dissimilarity with the rest of ODS-defined ops, both potentially resulting
in very poor maintainability.

Depends On D98327

Diff Detail

Event Timeline

ftynse created this revision.Mar 10 2021, 2:47 AM
ftynse requested review of this revision.Mar 10 2021, 2:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2021, 2:47 AM
ftynse updated this revision to Diff 329586.Mar 10 2021, 2:59 AM

Slightly more cmake

This revision is now accepted and ready to land.Mar 10 2021, 3:17 AM
springerm accepted this revision.Mar 10 2021, 4:03 AM
This revision was landed with ongoing or failed builds.Mar 10 2021, 4:07 AM
This revision was automatically updated to reflect the committed changes.
mlir/lib/Target/LLVMIR/Dialect/AVX512/CMakeLists.txt