https://bugs.llvm.org/show_bug.cgi?id=38336

            Bug ID: 38336
           Summary: Optimize strlen called on std::string c_str()
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Transform:
int lenstr(std::string &str) {
    return strlen(str.c_str() /* .data() */);
}

To:
int lenstr(std::string &str) {
    return str.length();
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to