[PATCH] D40289: [SafepointIRVerifier] Allow deriving pointers from unrelocated base

Daniil Suchkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 01:44:12 PST 2017


DaniilSuchkov created this revision.

Deriving pointer (adding GEPs/casts to base pointer) from it's base by itself
isn't incorrect even if the base pointer is unrelocated. Correctness depends
only on uses of this derived pointer. This patch allows to use derived pointers
in the same way as base pointers no matter where (before or after safepoint)
they were derived from base. 
It is acheived by two changes:

1. GEPs/casts are allowed to use unrelocated pointers without any restrictions
2. When checking if the pointer's use is legal we need to know only if its base

pointer is relocated or not.


https://reviews.llvm.org/D40289

Files:
  lib/IR/SafepointIRVerifier.cpp
  test/SafepointIRVerifier/use-derived-unrelocated.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40289.123729.patch
Type: text/x-patch
Size: 10998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171121/d15ef7f1/attachment.bin>


More information about the llvm-commits mailing list