1 : // Copyright 2012 Google Inc.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 : //
15 : // Utilities for dealing with block-graphs and blocks.
16 :
17 : #ifndef SYZYGY_BLOCK_GRAPH_BLOCK_UTIL_H_
18 : #define SYZYGY_BLOCK_GRAPH_BLOCK_UTIL_H_
19 :
20 : #include "syzygy/block_graph/block_graph.h"
21 :
22 m : namespace block_graph {
23 :
24 : // Determines if this code block's attributes preclude basic-block
25 : // decomposition.
26 : // @param block the code block whose attributes are to be inspected.
27 : // @returns true if the block attributes are safe for decomposition to basic-
28 : // blocks, false otherwise.
29 : // @pre block has type CODE_BLOCK.
30 m : bool CodeBlockAttributesAreBasicBlockSafe(
31 m : const block_graph::BlockGraph::Block* block);
32 :
33 m : } // namespace block_graph
34 :
35 : #endif // SYZYGY_BLOCK_GRAPH_BLOCK_UTIL_H_
|