• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7    http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#ifndef TENSORFLOW_COMPILER_MLIR_HLO_TRANSFORMS_PASSES
17#define TENSORFLOW_COMPILER_MLIR_HLO_TRANSFORMS_PASSES
18
19include "mlir/Pass/PassBase.td"
20
21def BufferReuse : FunctionPass<"buffer-reuse"> {
22  let summary = "Reuses already allocated buffers to save allocation "
23                "operations if it is provably safe.";
24  let description = [{
25    This pass tries to reuse already allocated buffers if they have the same
26    size, are in the right appearance order and have no interference among
27    themselves.
28  }];
29  let constructor = "createBufferReusePass()";
30}
31
32def TestUserange : FunctionPass<"test-print-userange"> {
33  let summary = "Test pass for checking userange intervals.";
34  let constructor = "createTestUserangePass()";
35}
36
37#endif // TENSORFLOW_COMPILER_MLIR_HLO_TRANSFORMS_PASSES
38