Skip to content

Conversation

@MartinaStarone
Copy link

RACFED

Implementation of RACFED. Starting from RASM implementation to RACFED.
Implementation in LLVM 21.1.6.

Authors

Gabriele Santandrea
Martina Starone


Commits previous to "Init RACFED" shared with branch patch-llvm-16-to-21

Patching ASPIS to LLVM 21 (some functions/headers/classes are not compatible)
Didn't manage to run test
Simple changes on RASM.cpp
Removed some enable-new-pm flags
Fixed the not equal on dup check.
Commented lowerswitch pass
Gab-San and others added 20 commits January 14, 2026 00:22
Since LLVM 17 all pointers are opaques so checks for opaque pointers have been removed
endswith and startswith methods have been replaced by ends_with and starts_with
StringRef .equals method has been replaced by llvm::operator==
Class RACFED.cpp
Made everything unsigned 32 bit values
Added multiline test functions
Fixed error introduced on last push
- Fixed error where sumIntraInstructions wasn't properly updated and crashed the execution of the program
- Implemented Return Value Check
- Standardized some notation in order to have better formatted and more readable code
Modified test.py in order to be able to run different configuration files making it more manageable.
Added --tests-file flag -> use different configuration files
Added --suffix flag -> extending support to versioned binaries (aspis modifications compatibility)
Removed some redundant tests
Updated testing/README
Tested RACFED+EDDI using test.py
Issue #11 seems to be related to duplication algorithm since when enabling eddi it works correctly
Issue #9 can be closed since it seems to be working correctly
@Gab-San
Copy link

Gab-San commented Jan 14, 2026

@davidebaroffio-polimi

Just a warning before a future merge.

Given that RACFED is being implemented in LLVM 21.1.6 some patching was done to RASM and to EDDI.
This will break backwards compatibility, though it is inevitable since LLVM improvements break frequently compatibility with older versions of LLVM.
Work to patch all of the aspis suite to llvm version 21 is already being done.

Patches to RASM and EDDI can be reverted (rebase on patching branch is instant and shouldn't break any work done in RACFED development branch).

Given that RACFED utilizes a global runtime signature it doesn't support multi-threading

Update to racfed+eddi test names
Added some documentation.
Added CompiledFuncs logic (copied from rasm)
In order to close issue #10 test multi_if_then_else has been added
Support for multiple test configuration files has been added to flag --tests-file
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.

2 participants