[PATCH] D134068: [TableGen] Add log bang operator

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 12:51:16 PDT 2022


michaelmaitland created this revision.
michaelmaitland added reviewers: craig.topper, nhaehnle, barannikov88, kazu.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
michaelmaitland requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds base 2 logarithm that returns integer result. I initially wanted to name it `!log2`,
but numbers are not permitted in the name. The documentation makes sure to clarify that it is 
base 2 since it is not explicit in the operator name.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134068

Files:
  llvm/docs/TableGen/ProgRef.rst
  llvm/include/llvm/TableGen/Record.h
  llvm/lib/TableGen/Record.cpp
  llvm/lib/TableGen/TGLexer.cpp
  llvm/lib/TableGen/TGLexer.h
  llvm/lib/TableGen/TGParser.cpp
  llvm/test/TableGen/math.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134068.460859.patch
Type: text/x-patch
Size: 6487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220916/929edfea/attachment.bin>


More information about the llvm-commits mailing list