[llvm-bugs] [Bug 38666] New: Replace pass by const reference with pass by value
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Aug 21 23:52:41 PDT 2018
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: unassignedbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180822/d846b44e/attachment.html>
More information about the llvm-bugs
mailing list