[PATCH] D78403: Infer alignment of loads with unspecified alignment in IR/bitcode parsing.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 18:03:47 PDT 2020


dexonsmith added a subscriber: aprantl.
dexonsmith added inline comments.


================
Comment at: llvm/tools/opt/opt.cpp:123
 static cl::opt<bool>
+NoUpgradeDebugInfo("disable-upgrade-debug-info",
+                   cl::desc("Generate invalid output"), cl::ReallyHidden);
----------------
efriedma wrote:
> mehdi_amini wrote:
> > How is it related to the data layout thing?
> Upgrading debug info encounters a similar sort of issue with the datalayout as computing the alignment: if we try to upgrade debug info with the wrong datalayout, we get the wrong result.  llc was using the UpgradeDebugInfo boolean to delay upgrading debug info until after it computed the correct datalayout.  With this patch, llc doesn't need that special case anymore.
> 
> Given that, there isn't really any legitimate use for disabling UpgradeDebugInfo anymore.  So I decided it makes sense to split apart the API, so the normal entry points for IR parsing don't expose this weird edge case of intentionally creating invalid bitcode files.  I added the entry point parseAssemblyFileWithIndexNoUpgradeDebugInfo, and I split the debug-upgrading part of "-disable-verify" into a separate option.
> 
> Maybe I should do something more minimal in this patch?
It would be great for @aprantl to review at least this part of the patch.

@efriedma, I'm curious if this refactoring would be easy/reasonable to split out and commit first?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78403





More information about the llvm-commits mailing list