[PATCH] D43239: Improve internal StringSwitch code gen with Optional<T>

David Zarzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 07:57:37 PST 2018


davezarzycki created this revision.
Herald added a subscriber: llvm-commits.

StringSwitch currently fakes Optional<T> by storing a pointer to the result. The problem with this approach is that it forces the compiler to store all case results on the stack before entering the string switch just so the address of the result can be temporarily used.


Repository:
  rL LLVM

https://reviews.llvm.org/D43239

Files:
  include/llvm/ADT/StringSwitch.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43239.134040.patch
Type: text/x-patch
Size: 8195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180213/df7567f8/attachment.bin>


More information about the llvm-commits mailing list