This is an archive of the discontinued LLVM Phabricator instance.

[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
ClosedPublic

Authored by gchatelet on Sep 11 2019, 2:41 AM.

Details

Summary

This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,

Unit tests are automatically fixed with a custom tool, 3 needed special care:

  • llvm/test/CodeGen/MIR/Generic/machine-function.mir
  • llvm/test/CodeGen/Mips/unaligned-memops-mapping.mir
  • llvm/test/DebugInfo/X86/debug-loc-offset.mir

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Diff Detail

Repository
rL LLVM

Event Timeline

gchatelet created this revision.Sep 11 2019, 2:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 11 2019, 2:41 AM

Can you point to the tests that have anything interesting to look at ?

llvm/lib/Target/ARC/ARCMachineFunctionInfo.h
37 ↗(On Diff #219676)

no s

gchatelet edited the summary of this revision. (Show Details)Sep 11 2019, 3:49 AM
gchatelet updated this revision to Diff 219684.Sep 11 2019, 3:51 AM
  • Address comments
courbet accepted this revision.Sep 11 2019, 3:51 AM
This revision is now accepted and ready to land.Sep 11 2019, 3:51 AM
gchatelet marked an inline comment as done.Sep 11 2019, 3:53 AM
This revision was automatically updated to reflect the committed changes.