[llvm-dev] [GSoC'16] Weekly Status - July 3 - Zhengyang Liu
Zhengyang Liu via llvm-dev
llvm-dev at lists.llvm.org
Sun Jul 3 04:12:30 PDT 2016
Dear LLVM and SVA community:
This is to brief you the progress of this week. Following is what I finished this week.
1. Correct the free() call insertion mistake in PromoteArrayAllocas. This piece of code seems pretty robust now and works well. I have also added detailed comments for each function as you told me. This patch can be found in 
2. The getenv() call causes the generated program crash. This is because the return value of getenv() is not aligned, and SAFECode will treat getenv() as a memory allocation and register it. I have also noticed strdup() call is the same as getenv(). Therefore, I created a wrapper function for getenv() and strdup(). This patch can be found in
3. Fix a bug in GEPChecks pass. The GEPChecks pass is introduced to automatically insert the safety checks to the getelementptr. Before the bugfix, GEPChecks pass can only handle getelementptr instructions with scalar return value. However, according to the LLVM Language Reference,the getelementptr returns a vector of pointers, instead of a single address, when one or more of its arguments is a vector.
<result> = getelementptr <ty>, <ptr vector> <ptrval>, <vector index type> <idx>
Therefore, I make the GEPChecks pass support this vector style getelementptr instruction.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev