[llvm-commits] [poolalloc] r133555 - in /poolalloc/trunk/lib: DSA/StdLibPass.cpp PoolAllocate/PASimple.cpp PoolAllocate/TransformFunctionBody.cpp
Matthew Wala
mttjwl at gmail.com
Tue Jun 21 15:12:50 PDT 2011
Author: wala1
Date: Tue Jun 21 17:12:50 2011
New Revision: 133555
URL: http://llvm.org/viewvc/llvm-project?rev=133555&view=rev
Log:
Add support for SAFECode runtime format string functions and intrinsics.
Modified:
poolalloc/trunk/lib/DSA/StdLibPass.cpp
poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=133555&r1=133554&r2=133555&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original)
+++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Tue Jun 21 17:12:50 2011
@@ -297,6 +297,11 @@
{"pool_strncasecmp",{NRET_NNYARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
{"pool_bcopy", {NRET_NNYARGS, NRET_NNNYARGS, NRET_NARGS, NRET_NNYARGS, true}},
{"pool_bcmp", {NRET_NNYARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, true}},
+
+ // format string intrinsics and functions
+ {"sc.fsparameter", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"sc.fscallinfo", {NRET_YARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"pool_printf", {NRET_YARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
// Type Checks
{"trackGlobal", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=133555&r1=133554&r2=133555&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Tue Jun 21 17:12:50 2011
@@ -101,7 +101,8 @@
(funcname == "sc.pool_unregister") ||
(funcname == "sc.get_actual_val") ||
(funcname == "__if_pool_get_label") ||
- (funcname == "__if_pool_set_label")) {
+ (funcname == "__if_pool_set_label") ||
+ (funcname == "sc.fsparameter")) {
return 1;
}
Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=133555&r1=133554&r2=133555&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Tue Jun 21 17:12:50 2011
@@ -874,7 +874,8 @@
(CF->getName() == "sc.pool_unregister") ||
(CF->getName() == "sc.get_actual_val") ||
(CF->getName() == "__if_pool_get_label") ||
- (CF->getName() == "__if_pool_set_label")) {
+ (CF->getName() == "__if_pool_set_label") ||
+ (CF->getName() == "sc.fsparameter")) {
visitRuntimeCheck (CS);
} else if ((argc = PAInfo.getCStdLibPoolArguments(CF->getName())) > 0) {
visitCStdLibCheck(CS, argc);
More information about the llvm-commits
mailing list