[PATCH] D78862: [IR] Convert null-pointer-is-valid into an enum attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 25 07:23:46 PDT 2020


nikic created this revision.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya.
Herald added a project: LLVM.

The `"null-pointer-is-valid"` attribute needs to be checked by many pointer-related combines. To make the check more efficient, convert it from a string into an enum attribute.

While D78859 <https://reviews.llvm.org/D78859> already makes the check for the attribute cheaper, this is another 0.4% improvement <http://llvm-compile-time-tracker.com/compare.php?from=0cc4958dd2dda646abda6a7b01aeb6b50b601e6b&to=370e15fccbfff64c66289e70cd75f11fd78eeebe&stat=instructions>.

This doesn't include the necessary test changes yet.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78862

Files:
  docs/LangRef.rst
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/Attributes.td
  include/llvm/IR/AutoUpgrade.h
  lib/AsmParser/LLLexer.cpp
  lib/AsmParser/LLParser.cpp
  lib/AsmParser/LLToken.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/CGCall.cpp
  lib/IR/Attributes.cpp
  lib/IR/AutoUpgrade.cpp
  lib/IR/Function.cpp
  lib/IR/Verifier.cpp
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Bitcode/attributes.ll
  test/CodeGen/delete-null-pointer-checks.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78862.260092.patch
Type: text/x-patch
Size: 10704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200425/1dfb9ac3/attachment-0001.bin>


More information about the llvm-commits mailing list