[PATCH] D85572: [globalopt] Change so that emitting fragments doesn't use the type size of DIVariables

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 17:23:48 PDT 2020


akhuang added inline comments.


================
Comment at: llvm/test/DebugInfo/Generic/global-sra-struct-fwd-decl.ll:14-15
+
+; Check that the global variable "d" is not
+; emitted as a fragment if its struct type is
+; forward declared but d.c has zero length, so
----------------
nickdesaulniers wrote:
> akhuang wrote:
> > nickdesaulniers wrote:
> > > Is there a `CHECK-NOT` we can add too to check that we don't observe a fragment for `d`?
> > There's already a check that the DIGlobalVariableExpression doesn't have a fragment. Do you mean a check to make sure there are no other `DW_OP_LLVM_fragment`s emitted?
> With your test case, but not the above changes to LLVM, is there a CHECK-NOT case that could be added that would fail prior to your changes, but pass afterwards?
I checked that this test fails before my changes, from the existing `CHECK: ![[GVE]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85572



More information about the llvm-commits mailing list