https://bugs.llvm.org/show_bug.cgi?id=37278
Bug ID: 37278
Summary: Devirtualization optimization missed
Product: clang
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: marcosa...@gmail.com
CC: llvm-bugs@lists.llvm.org
The compiler misses this opportunity to perform devirtualization on the
offset/read_uword/write_uword member functions:
https://godbolt.org/g/P4nfyr
The only compiler to optimize this correctly was GCC where it never calls these
member functions and just uses a register to store the result.
Moving the offset member function directly into the WordPcRegister class makes
the compiler perform the same optimization as GCC.
Marking the WordPcRegister as final or not doesn't seem to make a difference
either.
--
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