Otawa  0.10
PostDominance.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * Copyright (c) 2005 IRIT-UPS
4  *
5  * include/util/PostDominance.h -- PostDominance class interface.
6  */
7 #ifndef OTAWA_UTIL_POSTDOMINANCE_H
8 #define OTAWA_UTIL_POSTDOMINANCE_H
9 
11 #include <otawa/proc/Feature.h>
12 
13 namespace otawa {
14 
15 // External
16 class BasicBlock;
17 namespace dfa {
18  class BitSet;
19 }
20 
21 // PostDominance class
22 class PostDominance: public CFGProcessor {
23 public:
24  static void ensure(CFG *cfg);
25  static bool postDominates(BasicBlock *bb1, BasicBlock *bb2);
26  static inline bool isPostDominated(BasicBlock *bb1, BasicBlock *bb2);
27 
28  // Constructor
29  PostDominance(void);
30 
31  // CFGProcessor overload
32  virtual void processCFG(WorkSpace *fw, CFG *cfg);
33 };
34 
35 // Features
37 
38 // Properties
40 
41 } // otawa
42 
43 #endif // OTAWA_UTIL_POSTDOMINANCE_H
CFG * cfg(void) const
Get the current CFG.
Definition: CFGProcessor.h:56
static bool isPostDominated(BasicBlock *bb1, BasicBlock *bb2)
static bool postDominates(BasicBlock *bb1, BasicBlock *bb2)
Test if the first basic block postdominates the second one.
Definition: util_PostDominance.cpp:113
static void ensure(CFG *cfg)
Check if the postdominance informance is available.
Definition: util_PostDominance.cpp:161
PostDominance(void)
The postdominance processors computes postdominance relation on the current CFG.
Definition: util_PostDominance.cpp:176
Control Flow Graph representation.
Definition: CFG.h:42
This CFG processor computes and hook to the CFG the postdominance relation that, tehn, may be tested with PostDominance::postDominate() function.
Definition: PostDominance.h:22
Feature< PostDominance > POSTDOMINANCE_FEATURE
This feature ensures that information about postdomination between nodes of a CFG is vailable...
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
This is a specialization of the processor class dedicated to CFG processing.
Definition: CFGProcessor.h:35
Identifier< dfa::BitSet * > REVERSE_POSTDOM
Identifier of annotation containing reverse-postdominance information.
virtual void processCFG(WorkSpace *fw, CFG *cfg)
Computes the postdomination relation.
Definition: util_PostDominance.cpp:143
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
A feature is a set of facilities, usually provided using properties, available on a framework...
Definition: Feature.h:46