https://bugs.llvm.org/show_bug.cgi?id=38666
Bug ID: 38666
Summary: Replace pass by const reference with pass by value
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org
Example:
int f(const int &p) {
return p;
}
=>
int f_optimized(const int p) {
return p;
}
Idea: clone function to modify parameters(if external linkage; modify directly
if static one), modify callsites -> replace const references with copies if
sizeof(T) <= sizeof(T *).
Maybe a new opt pass or part of a current one (which one?) ?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs