[PATCH] D81285: [builtins] Change si_int to int in some helper declarations

Anatoly Trosinenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 02:39:19 PDT 2020


atrosinenko updated this revision to Diff 271963.
atrosinenko added a comment.

Replaced `native_int` by plain `int`, as @aykevl suggested.

On one hand, I have no specific preference for using some descriptive name such as `native_int`, `default_int`, etc. (that should suggest it was chosen intentionally, not because "I had no better idea") or just use standard `int` instead (supposing special names would be more confusing than explaining).

On the other hand, I aggree with @aykevl that replacing machine mode-related names (locally typedef'ed `[sdt][ui]_int`) with widely known type names such as uint32_t that should be equivalent by the definition according to GCC documentation <https://gcc.gnu.org/onlinedocs/gccint/Machine-Modes.html> would simplify understanding of the builtins source code. And after such change, using `native_int` for just `int` and absolutely traditional names for most other types would be quite strange.

On renaming fixed width integer types to their traditional names: I would prefer sending such patch afterwards, it would probably be as simple as just running `sed --in-place` several times.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81285/new/

https://reviews.llvm.org/D81285

Files:
  compiler-rt/lib/builtins/README.txt
  compiler-rt/lib/builtins/clzdi2.c
  compiler-rt/lib/builtins/clzsi2.c
  compiler-rt/lib/builtins/clzti2.c
  compiler-rt/lib/builtins/ctzdi2.c
  compiler-rt/lib/builtins/ctzsi2.c
  compiler-rt/lib/builtins/ctzti2.c
  compiler-rt/lib/builtins/ffsti2.c
  compiler-rt/lib/builtins/int_lib.h
  compiler-rt/lib/builtins/paritydi2.c
  compiler-rt/lib/builtins/paritysi2.c
  compiler-rt/lib/builtins/parityti2.c
  compiler-rt/lib/builtins/popcountsi2.c
  compiler-rt/lib/builtins/popcountti2.c
  compiler-rt/lib/builtins/powidf2.c
  compiler-rt/lib/builtins/powisf2.c
  compiler-rt/lib/builtins/powitf2.c
  compiler-rt/lib/builtins/powixf2.c
  compiler-rt/test/builtins/Unit/clzdi2_test.c
  compiler-rt/test/builtins/Unit/clzsi2_test.c
  compiler-rt/test/builtins/Unit/clzti2_test.c
  compiler-rt/test/builtins/Unit/ctzsi2_test.c
  compiler-rt/test/builtins/Unit/ctzti2_test.c
  compiler-rt/test/builtins/Unit/ffsti2_test.c
  compiler-rt/test/builtins/Unit/paritydi2_test.c
  compiler-rt/test/builtins/Unit/paritysi2_test.c
  compiler-rt/test/builtins/Unit/parityti2_test.c
  compiler-rt/test/builtins/Unit/popcountsi2_test.c
  compiler-rt/test/builtins/Unit/popcountti2_test.c
  compiler-rt/test/builtins/Unit/powidf2_test.c
  compiler-rt/test/builtins/Unit/powisf2_test.c
  compiler-rt/test/builtins/Unit/powitf2_test.c
  compiler-rt/test/builtins/Unit/powixf2_test.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81285.271963.patch
Type: text/x-patch
Size: 37656 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200619/d45c41a3/attachment-0001.bin>


More information about the cfe-commits mailing list