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

            Bug ID: 38153
           Summary: clang should have the ability to generate roundps to
                    implement std::round
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangb...@nondot.org
          Reporter: brucedaw...@chromium.org
                CC: llvm-bugs@lists.llvm.org

As reported in crbug.com/863135, std::round() ends up consuming most of the CPU
time in Chrome's ComputeThumbnailScore. This is because of the overhead of the
function call plus what appears to be an inefficient implementation.

We could optimize every call site based on floating-point tricks that work in
particular circumstances or llvm/clang-cl could generate the SSE 4.1 roundss or
roundps instruction:

http://www.info.univ-angers.fr/~richer/ens/l3info/ao/intel_sse4.pdf

std::round has showed up as a performance problem in Chrome before
(crbug.com/617365) and it would be good to solve it generically rather than
just in specific cases.

-- 
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

Reply via email to