[LLVMdev] Info on byval attributes

Santosh Nagarakatte santosh.nagarakatte at gmail.com
Sat May 12 16:17:17 PDT 2012


LLVM developers,


I was wondering if the program would still be safe if I strip the
byval attributes from the parameters in the entire bitcode.

LLVM language reference manual states that "The attribute implies that
a hidden copy of the pointee is made between the caller and the
callee, so the callee is unable to modify the value in the callee.
This attribute is only valid on LLVM pointer arguments."

Is there a way I can avoid the byval attribute by a custom
transformation? I was thinking of a custom transformation that
introduces an alloca and maintains the hidden copy of the pointee?

Thanks,
Santosh

-- 
Santosh G Nagarakatte,
Computer and Information Science Department
University of Pennsylvania,
Philadelphia-19104
http://www.cis.upenn.edu/~santoshn



More information about the llvm-dev mailing list