diff options
author | River Riddle <riddleriver@gmail.com> | 2020-11-02 14:21:02 -0800 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-11-02 14:39:43 -0800 |
commit | b870d9ec8334523a902e0abc04fd49a5a95dbc43 (patch) | |
tree | dd7690f62121f97195a02f42ab21a98e454af169 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | f38a9e51178add132d2c8ae160787fb2175a48a4 (diff) | |
download | llvm-b870d9ec8334523a902e0abc04fd49a5a95dbc43.zip llvm-b870d9ec8334523a902e0abc04fd49a5a95dbc43.tar.gz llvm-b870d9ec8334523a902e0abc04fd49a5a95dbc43.tar.bz2 |
[mlir] Optimize Op definitions and registration to optimize for code size
This revision refactors the base Op/AbstractOperation classes to reduce the amount of generated code size when defining a new operation. The current scheme involves taking the address of functions defined directly on Op and Trait classes. This is problematic because even when these functions are empty/unused we still result in these functions being defined in the main executable. In this revision, we switch to using SFINAE and template type filtering to remove remove functions that are not needed/used. For example, if an operation does not define a custom `print` method we shouldn't define a templated `printAssembly` method for it. The same applies to parsing/folding/verification/etc. This dropped MLIR code size for a large downstream library by ~10%(~1 mb in an opt build).
Differential Revision: https://reviews.llvm.org/D90196
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions