Skip to content

MetaCG Release v0.8.0#63

Merged
jplehr merged 103 commits intomasterfrom
rel/staging-0.8.0
Jul 31, 2025
Merged

MetaCG Release v0.8.0#63
jplehr merged 103 commits intomasterfrom
rel/staging-0.8.0

Conversation

@pearzt
Copy link
Member

@pearzt pearzt commented Jul 31, 2025

Supersedes #59

jplehr and others added 30 commits October 29, 2024 23:00
[MetaCG] Update / Fix README

See merge request tuda-sc/projects/metacg!167
Use $CI_PIPELINE_ID in CI build path

See merge request tuda-sc/projects/metacg!168
Adds initial Github Actions workflow to build the project in its
default build config.
[GH][CI] First Github CI steps

See merge request tuda-sc/projects/metacg!169
This factors out the policy settings to a module and function so it can
be included across the project. Also, this allows to run cmake-format
again on the CMakeLists.txt file without crashes.

Don't know why there were so many failures in the CMake formatting, but
anyway, this patch fixes the CMake formatting.
Adds basic API-level unit tests for CgNode.
[CI] Focus CMake lint away from build

See merge request tuda-sc/projects/metacg!170
There seems to be a race between the mcg-download job and the
build-container job, given that both specify a git strategy to
clone the repo. This would then overwrite folder / create new
ones, and might explain the weird failures we were seeing.
[CI] Eliminate race between mcg-download/build-container

See merge request tuda-sc/projects/metacg!173
Build a full MetaCG container via GH actions workflow. For that,
added a new "full-build" container recipe.

Use the built container to also run both pgis and metacg general
library tests inside the container.
[GH][CI] Adds container build to GH actions

See merge request tuda-sc/projects/metacg!174
[Graph] Adds CgNode unit tests

See merge request tuda-sc/projects/metacg!172
[NFC] Refactor code style

See merge request tuda-sc/projects/metacg!171
Fix CGValidate Overload Checking for v2

See merge request tuda-sc/projects/metacg!175
1. Fixes a bug that occurred when de-serializing MetaCG graphs into that had FileProperties Metadata attached
2. Fixes a bug in which the check whether to include a function in the graph was omitted if the node was a callee
3. Fixes includes to be compatible with newer LLVM versions

Note: This disables the Alias-Analysis Tests
Accumulation of minor bugfixes

See merge request tuda-sc/projects/metacg!176
Adds readmes for the different "sub projects" so that not all of the
text needs to be present in the top-level file.
The idea is that we have a better and clearer structure in the repo and
that a first-time visitor is not overloaded with unnecessary details.
[MetaCG][NFC] Add second-level READMEs

See merge request tuda-sc/projects/metacg!178
Refactor IO to prepare for new tools

See merge request tuda-sc/projects/metacg!182
Reader factory

See merge request tuda-sc/projects/metacg!183
Adds basic directory structure and CMake option for integration of graph-based tools

See merge request tuda-sc/projects/metacg!184
pearzt and others added 22 commits May 2, 2025 14:42
Client tools currently need to link to spdlog and nlohman themselves as we expose some of their includes in header files.
This changes the linkage status inside cmake to be public to hopefully remove this problem
* Add unique logging output capability with tests

* Added standalone helper functions for easy logging
Co-authored-by: Jan Patrick Lehr <JanPatrick.Lehr@amd.com>
# CGPatch instrumentation component
Static call-graphs generated by CGCollector may be incomplete due to indirect calls via function pointers. This PR introduces dynamic instrumentation to close this gap. CGPatch instruments indirect calls to resolve the call targets at runtime.

## Included in this PR
* LLVM instrumentation pass (CGPatchPass.cpp)
* Wrapper scripts (patchcxx and patchcc)
* Integration in build system and CI
* LIT tests for pass validation.

## Usage
Run ninja pass-tests from the build directory to execute the LIT tests.

## Not yet included
The runtime component of CGPatch will be submitted as soon as this PR is merged.

---------

Co-authored-by: Jan Patrick Lehr <JanPatrick.Lehr@amd.com>
* Fix dependency install rules

* Clean up dependencies in subprojects

* NFC: fix formatting
* added lit to build_submodules

* added lit to cmake configuration

* fixed typo

* next try to save the pipeline

* im dumb

* dont write explicit path

* added install target for full build

* Changed lit tests to use build dir instead of install dir

* add install

* added lib64 dir to wrapper

* added seperate version matrix for lit

* fixed typo and depend on install

* Revert "fixed typo and depend on install"

This reverts commit c85dad55df60fa4e2d916874673d8c9593a21e6f.

* install in test job

* Update .gitlab-ci.yml file

* Update .gitlab-ci.yml file

* Update .gitlab-ci.yml file

* Fix CI for real this time

---------

Co-authored-by: silas.martens <silas.martens@stud.tu-darmstadt.de>
Co-authored-by: Kreutzer, Sebastian <sebastian.kreutzer@tu-darmstadt.de>
* Implemented cgpatch with tests

# Conflicts:
#	.github/workflows/mcg-ci.yml
#	.gitlab-ci.yml
#	CMakeLists.txt
#	container/full-build
#	tools/cgpatch/CMakeLists.txt
#	tools/cgpatch/include/CallAnalysis.h
#	tools/cgpatch/src/CallAnalysis.cpp
#	tools/cgpatch/test/CMakeLists.txt
#	tools/cgpatch/test/pass-tests/CMakeLists.txt
#	tools/cgpatch/test/pass-tests/inst-test/06_extern_declaration.cpp
#	tools/cgpatch/test/pass-tests/lit.cfg
#	tools/cgpatch/test/pass-tests/lit.site.cfg.in
#	tools/cgpatch/test/pass-tests/vcall-detection-test/01_basic_vcall.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/02_pointer_call.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/03_member_ptr.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/04_ptr_to_vfun.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/05_ref_call.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/06_fake_vcall.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/07_call_in_ctor.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/08_call_in_dtor.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/09_lambda.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/10_fake_vcall_2.cpp
#	tools/cgpatch/test/pass-tests/vcall-detection-test/11_mult_inheritance.cpp
#	tools/cgpatch/wrapper/patchcc.in
#	tools/cgpatch/wrapper/patchcxx.in

# Conflicts:
#	.gitlab-ci.yml
#	tools/cgpatch/wrapper/patchcxx.in

* Renamed cgpatch runtime

* Fixed error I made when rebasing :)

* Removed global var that survived rebase

* Removed old README

* removed cgmerge part as this has its own PR

* Added todo comment

* Bug-Fix: Renamed cgpatch runtime lib

* removed unused rules and grouped some ignore rules

* fixed pipeline

* Use camelCase

Co-authored-by: Jan Patrick Lehr <JanPatrick.Lehr@amd.com>

* removed merge artifacts

* changed debug out to debug

* adjusted variable usages according to name convention

* fixed pipeline

* next try to save the pipeline

* Fixed typo

Co-authored-by: Jan Patrick Lehr <JanPatrick.Lehr@amd.com>

* fix indent (hopefully)

* Revert "fix indent (hopefully)"

This reverts commit e2a4d0a.

* fix indent try 2

* add temp file

* replace full-build with full-build.fixed

* camelCase and remove unnecessary comments

* use convenience functions and std::filesystem

* make constness more explicit

* fixed wrong function name

* renamed variables

* cleaned up testfile

* Now checks if mpi is available when building cgpatch with CGPATCH_USE_MPI

* Only enable MPI when CGPATCH is built

* Fixed wrapper

---------

Co-authored-by: Jan Patrick Lehr <JanPatrick.Lehr@amd.com>
Co-authored-by: silas.martens <silas.martens@stud.tu-darmstadt.de>
* Generate temporary test files into build directory

* Configure integration tests via cmake

* Convert CGPatch integration test script to space-indentation

---------

Co-authored-by: silas.martens <silas.martens@stud.tu-darmstadt.de>
Copy link
Member

@jplehr jplehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready to go.

@jplehr jplehr merged commit 35763c8 into master Jul 31, 2025
9 checks passed
@pearzt pearzt deleted the rel/staging-0.8.0 branch August 8, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants