[all-commits] [llvm/llvm-project] fc4177: [mlir][spirv] De-template serialization

Lei Zhang via All-commits all-commits at lists.llvm.org
Wed Dec 23 12:04:06 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fc41777702aae1cb88512a6aa45382736766fadf
      https://github.com/llvm/llvm-project/commit/fc41777702aae1cb88512a6aa45382736766fadf
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-12-23 (Wed, 23 Dec 2020)

  Changed paths:
    M mlir/lib/Target/SPIRV/Serialization.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

  Log Message:
  -----------
  [mlir][spirv] De-template serialization

Previously for each op we generate a separate serialization
method for it. Those serialization methods duplicate the logic
of parsing operands/results/attributes and such.

This commit creates a generic method and let suitable op-specific
serialization method to call into it.

wc -l SPIRVSerialization.inc: before 8304; after: 5597 (So -2707)

Reviewed By: hanchung, ThomasRaoux

Differential Revision: https://reviews.llvm.org/D93535




More information about the All-commits mailing list