summaryrefslogtreecommitdiffstats
path: root/mlir/test/lib/Transforms/TestInlining.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2020-01-02 14:28:37 -0800
committerRiver Riddle <riverriddle@google.com>2020-01-02 14:40:09 -0800
commitfd01d8626cdcce9f34caab060f8d3fd35f6661cc (patch)
tree10181d726e607c5eaff7ff3428f2d6b9f2dd5eeb /mlir/test/lib/Transforms/TestInlining.cpp
parent1c45852c828dae0dd15136cda3d7fd6af0f75dc7 (diff)
downloadbcm5719-llvm-fd01d8626cdcce9f34caab060f8d3fd35f6661cc.tar.gz
bcm5719-llvm-fd01d8626cdcce9f34caab060f8d3fd35f6661cc.zip
[mlir] Rewrite the internal representation of OpResult to be optimized for memory.
Summary: This changes the implementation of OpResult to have some of the results be represented inline in Value, via a pointer int pair of Operation*+result number, and the rest being trailing objects on the main operation. The full details of the new representation is detailed in the proposal here: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ The only difference between here and the above proposal is that we only steal 2-bits for the Value kind instead of 3. This means that we can only fit 2-results inline instead of 6. This allows for other users to steal the final bit for PointerUnion/etc. If necessary, we can always steal this bit back in the future to save more space if 3-6 results are common enough. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D72020
Diffstat (limited to 'mlir/test/lib/Transforms/TestInlining.cpp')
-rw-r--r--mlir/test/lib/Transforms/TestInlining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/test/lib/Transforms/TestInlining.cpp b/mlir/test/lib/Transforms/TestInlining.cpp
index 36378283f8e..584849d0f51 100644
--- a/mlir/test/lib/Transforms/TestInlining.cpp
+++ b/mlir/test/lib/Transforms/TestInlining.cpp
@@ -46,7 +46,7 @@ struct Inliner : public FunctionPass<Inliner> {
if (failed(inlineRegion(
interface, &callee.body(), caller,
llvm::to_vector<8>(caller.getArgOperands()),
- llvm::to_vector<8>(caller.getResults()), caller.getLoc(),
+ SmallVector<Value, 8>(caller.getResults()), caller.getLoc(),
/*shouldCloneInlinedRegion=*/!callee.getResult()->hasOneUse())))
continue;
OpenPOWER on IntegriCloud