[PATCH] D77292: [Alignment][NFC] Convert MachineIRBuilder::buildDynStackAlloc to Align

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 10:19:14 PDT 2020


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:1895
 
-  MF->getFrameInfo().CreateVariableSizedObject(Align ? Align : 1, &AI);
+  MF->getFrameInfo().CreateVariableSizedObject(Alignment, &AI);
   assert(MF->getFrameInfo().hasVarSizedObjects());
----------------
gchatelet wrote:
> gchatelet wrote:
> > courbet wrote:
> > > I'd like to get a knowledgeable pair of eye to look at this. We used to align anything smaller than the stack size to 1, now we align to max(AI.align, preftypealign). This sounds OK, but let's be on the safe side.
> > @aemerson what do you think?
> AFAICT it is not clear what it means use G_DYN_STACKALLOC with an alignment of `0`
> https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-dyn-stackalloc
> 
> @aemerson can you help me understand what's going on here? Or add relevant people to the thread?
An alignment of 0 I believe is used to mean there is no alignment requirement at all.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77292





More information about the llvm-commits mailing list