[PATCH] D79245: [Verifier] Constrain where DILocations may be nested

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 17:14:37 PDT 2020


vsk created this revision.
vsk added reviewers: aprantl, dsanders.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Constrain which metadata nodes are allowed to be, or contain,
DILocations. This ensures that logic for updating DILocations in a
Module is complete.

Currently, !llvm.loop metadata is the only odd duck which contains
nested DILocations. This has caused problems in the past: some passes
forgot to visit the nested locations, leading to subtly broken debug
info and late verification failures.

If there's a compelling reason for some future metadata to nest
DILocations, we'll need to introduce a generic API for updating the
locations attached to an Instruction before relaxing this check.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79245

Files:
  llvm/lib/IR/Verifier.cpp
  llvm/test/Verifier/dilocation-in-wrong-place.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79245.261480.patch
Type: text/x-patch
Size: 5271 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200502/16f42d38/attachment-0001.bin>


More information about the llvm-commits mailing list