[llvm-commits] [poolalloc] r131262 - in /poolalloc/trunk: lib/AssistDS/TypeChecks.cpp runtime/DynamicTypeChecks/TypeRuntime.c
Arushi Aggarwal
aggarwa4 at illinois.edu
Thu May 12 16:39:30 PDT 2011
Author: aggarwa4
Date: Thu May 12 18:39:30 2011
New Revision: 131262
URL: http://llvm.org/viewvc/llvm-project?rev=131262&view=rev
Log:
1. We can ignore size in the runtime,because matching
types ensures that.
2. Ensure that we only transform internal varargs
functions
Modified:
poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.cpp?rev=131262&r1=131261&r2=131262&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Thu May 12 18:39:30 2011
@@ -189,6 +189,8 @@
TypeChecks::visitVarArgFunction(Module &M, Function &F) {
if(!F.isVarArg())
return false;
+ if(!F.hasInternalLinkage())
+ return false;
// FIXME:handle external functions
// Find all uses of the function
@@ -728,6 +730,9 @@
// Insert runtime check for va_arg instructions
bool TypeChecks::visitVAArgInst(Module &M, VAArgInst &VI) {
+ Function *Func = VI.getParent()->getParent();
+ if(!Func->hasInternalLinkage())
+ return false;
// FIXME:handle external functions
// For every va_arg instruction,
Modified: poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c?rev=131262&r1=131261&r2=131262&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c Thu May 12 18:39:30 2011
@@ -99,7 +99,6 @@
* Check that the two types match
*/
void compareTypes(uint8_t typeNumberSrc, uint8_t typeNumberDest, uint32_t tag) {
- //TODO:add size info
if(typeNumberSrc != typeNumberDest) {
printf("Type mismatch: detecting %u, expecting %u! %u \n", typeNumberDest, typeNumberSrc, tag);
}
More information about the llvm-commits
mailing list