Dear LLVM and SVA community:
This is to brief you the progress of this week. I mainly focused on minor fixes this week. Following is what I finished this week.
- Move the implementation of runOnModule of RegisterGlobalVar pass from .h back to .cpp file.
- Introduce two new functions to register and unregister function prototypes on llvm.compiler.used.
- Added two regression tests for PromoteArrayAllocas pases.
- Rewrite InitAllocas pass. This pass is originally written as a function pass. Rewrite this pass to Module pass to make the intrinsic function llvm.malloc
- The customized malloc, calloc, and realloc in safecode/runtime/BBRuntime/AlignedMalloc.cpp could be overrided by system implementation on some environments. Thus I added a _sc_bb prefix to these customized heap allocation functions. I also write a module pass to automatically rename all malloc / calloc / realloc to __sc_bb_malloc … Regression tests are also completed for this pass.
This week, I plan to
- Test SAFECode’s bbac implementation on more real-world programs, and fix possible crashes.
- Discuss with my mentor Prof. John Criswell about the insertion point of free in PromoteArrayAllocas pass.
Best regards,
Zhengyang.