[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
Tue Aug 11 15:45:01 PDT 2020


akhuang added inline comments.


================
Comment at: llvm/test/DebugInfo/Generic/global-sra-struct-fwd-decl.ll:14
+
+; Check that the global variable "d" is not
+; emitted as a fragment if its struct type is
----------------
MaskRay wrote:
> It is not "d". It is "d.0" (scalar replacement of aggregate: d.b)
Oh, true. I can fix the comments. 


================
Comment at: llvm/test/DebugInfo/Generic/global-sra-struct-fwd-decl.ll:4
+; typedef struct {} a;
+; static struct {
+;     long b;
----------------
MaskRay wrote:
> Is the source still the same as global-sra-struct-zero-length.ll?
I just copied global-sra-struct-zero-length.ll and changed struct `d` to be a declaration instead of a definition. So the source should be the same? Technically you wouldn't be able to get this IR from the source, though. 


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