toaarnio / llvm-ir-memprotect

LLVM IR instrumentation for protection against out-of-bounds memory accesses
Mozilla Public License 2.0
9 stars 2 forks source link

Make sure that noinline attribute is removed from functions, which has been modified to smart pointer versions. #20

Closed elhigu closed 11 years ago

elhigu commented 11 years ago

Actually probably we could remove that from every function except from kernel entry point. Currently biggest problems that this causes is that we kernel entry point is not allowed to inline the safepointer version of kernel, which causes pretty big overhead on small kernels and also nvptx compiler cannot allocate registers to handle smart pointer value arguments.

elhigu commented 11 years ago

Added: new_function->removeAttributes(AttributeSet::FunctionIndex, AttributeSet::get(c, AttributeSet::FunctionIndex, genVector(llvm::Attribute::NoInline)));