[PATCH] D87148: [ImplicitNullCheck] Handle Nonzero faulting pages and complex addressing

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 08:43:45 PDT 2020


anna created this revision.
anna added reviewers: philip, dantrushin, skatkov.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
anna requested review of this revision.

This patch:

1. introduces a new TII API for handling complex addressing mode

in isSuitableMemoryOp. Earlier, we used to bail out if the memory
operation had an index register or a scale != 1.

2. handles memory accesses where the faulting page is a non-zero one as

specified through a named module level metadata
(startaddress_faulting_pages) introduced in this patch. The optional
metadata is added by front-ends.

See #2 in action with added MIR tests for positive and negative case. #1
allows us to handle a case which was not handled earlier (see
implicit-null-checks.ll).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87148

Files:
  llvm/include/llvm/CodeGen/TargetInstrInfo.h
  llvm/lib/CodeGen/ImplicitNullChecks.cpp
  llvm/lib/Target/X86/X86InstrInfo.cpp
  llvm/lib/Target/X86/X86InstrInfo.h
  llvm/test/CodeGen/X86/implicit-null-check-negative.ll
  llvm/test/CodeGen/X86/implicit-null-check.ll
  llvm/test/CodeGen/X86/implicit-null-checks.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87148.289967.patch
Type: text/x-patch
Size: 15777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200904/415791f7/attachment-0001.bin>


More information about the llvm-commits mailing list