Skip to content
Snippets Groups Projects
Commit 970c356d authored by jdh8d's avatar jdh8d
Browse files

better sconsing, and typedef updates for the CFG class.

Former-commit-id: fc99773a27cc60db082db9087c16f805fba79b12
parent 8070f5cf
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,6 @@ if "CYGWIN" in sysname:
Export('env')
#print 'env='
#print env.Dump()
libPEBLISS=SConscript("pebliss/trunk/pe_lib/SConscript", variant_dir='scons_build/libPEBLISS')
libEXEIO=SConscript("libEXEIO/SConscript", variant_dir='scons_build/libEXEIO')
libbea=SConscript("beaengine/SConscript", variant_dir='scons_build/beaengine')
......
import os
Import('env')
myenv=env
myenv=env.Clone()
myenv.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME'])
......@@ -18,7 +18,7 @@ cpppath='''
'''
#myenv.Append(CCFLAGS="-Wp,-w -Wall")
myenv.Append(CCFLAGS="-w")
myenv.Append(CCFLAGS=" -w ")
myenv=myenv.Clone(CPPPATH=Split(cpppath))
lib=myenv.Library(libname, Split(files))
......
import os
Import('env')
myenv=env
myenv=env.Clone()
myenv.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME'])
......@@ -21,7 +21,7 @@ libpath='''
'''
#myenv.Append(CCFLAGS="-Wp,-w -Wall")
myenv.Append(CCFLAGS="-g")
myenv.Append(CCFLAGS=" -g ")
libs= '''
EXEIO
......
......@@ -19,6 +19,9 @@
*/
class BasicBlock_t;
typedef std::set<BasicBlock_t*> BasicBlockSet_t;
typedef std::vector<Instruction_t*> InstructionVector_t;
class BasicBlock_t
{
......@@ -29,10 +32,10 @@ class BasicBlock_t
bool GetIsExitBlock() { return is_exit_block; }
void SetIsExitBlock(bool is_exit) { is_exit_block=is_exit; }
std::vector<Instruction_t*>& GetInstructions() { return instructions; }
std::set<BasicBlock_t*>& GetPredecessors() { return predecessors; }
std::set<BasicBlock_t*>& GetSuccessors() { return successors; }
std::set<BasicBlock_t*>& GetIndirectTargets() { return indirect_targets; }
InstructionVector_t& GetInstructions() { return instructions; }
BasicBlockSet_t& GetPredecessors() { return predecessors; }
BasicBlockSet_t& GetSuccessors() { return successors; }
BasicBlockSet_t& GetIndirectTargets() { return indirect_targets; }
BasicBlock_t* GetFallthrough();
BasicBlock_t* GetTarget();
......@@ -49,10 +52,10 @@ class BasicBlock_t
private:
std::vector<Instruction_t*> instructions;
std::set<BasicBlock_t*> predecessors;
std::set<BasicBlock_t*> successors;
std::set<BasicBlock_t*> indirect_targets;
InstructionVector_t instructions;
BasicBlockSet_t predecessors;
BasicBlockSet_t successors;
BasicBlockSet_t indirect_targets;
bool is_exit_block;
friend std::ostream& operator<<(std::ostream& os, const BasicBlock_t& block);
......
......@@ -20,6 +20,8 @@
typedef std::set<BasicBlock_t*> BasicBlockSet_t;
class ControlFlowGraph_t
{
public:
......@@ -39,7 +41,7 @@ class ControlFlowGraph_t
/* friends */
public:
friend std::ostream& operator<<(std::ostream& os, const ControlFlowGraph_t& cfg);
std::set<BasicBlock_t*>& GetBlocks() { return blocks; }
BasicBlockSet_t& GetBlocks() { return blocks; }
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment