Posts

Showing posts from April, 2025

Project Stage III: Tidy & Wrap

Image
 In this Stage III we focuse on enhanced testing rather than enabling full AFMV cloning. revised code that analyze multiple cloned functions and generating PRUNE / NOPRUNE diagnostics for each clone set. #include "config.h" #include "system.h" #include "coretypes.h" #include "backend.h" #include "tree.h" #include "gimple.h" #include "pass_manager.h" #include "context.h" #include "diagnostic-core.h" #include "tree-pass.h" #include "ssa.h" #include "tree-pretty-print.h" #include "internal-fn.h" #include "gimple-iterator.h" #include "gimple-walk.h" #include "tree-core.h" #include "basic-block.h" #include "gimple-ssa.h" #include "cgraph.h" #include "attribs.h" #include "pretty-print.h" #include "tree-inline.h" #include "intl.h" #include "dumpfile.h" #in...

Project Stage 2: Clone-Pruning Analysis Pass

Image
In this stage, we will implement a custom GCC pass that analyzes cloned functions generated through Function Multi-Versioning (FMV), determines whether they are substantially the same, and emits pruning recommendations. This is part of a broader effort toward Automatic Function Multi-Versioning (AFMV). First ,we copy and extract the SPO600 function multiversioning test archive: mkdir ~/spo600-tests cp /public/spo600-test-clone.tgz ~/spo600-tests/ cd ~/spo600-tests tar -xvzf spo600-test-clone.tgz Step1:Print detailed information about the GIMPLE statement number, statement type name (such as GIMPLE_ASSIGN), and operands. #include "config.h" #include "system.h" #include "coretypes.h" #include "tree.h" #include "tree-pass.h" #include "cgraph.h" #include "function.h" #include "basic-block.h" #include "gimple.h" #include "gimple-iterator.h" #include "cfg.h" #include "context.h...