[PATCH] D33345: [DAG] Improve Aliasing of operations to static alloca

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 20:56:57 PDT 2017


niravd marked an inline comment as done.
niravd added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:160
+          SPOffset -= TySize;
+          MF->getFrameInfo().setObjectOffset(FrameIndex, SPOffset);
           StaticAllocaMap[AI] = FrameIndex;
----------------
rnk wrote:
> I don't like setting SPOffset once and then setting it again later during PEI. Passes will get different results over time, and that seems bad.
> 
> Why does TCO cause frame index aliasing? That seems like a problem we might be able to address in TCO.
> 
> I'd much rather let alias analysis assume that loads and stores based on different non-fixed frame indices can't alias. Fixed frame indices can probably alias in things like va_arg handling, but in that case we should have a reliable fixed offset here. It should hold that fixed and un-fixed stack objects don't overlap.
> 
> These offsets here also don't account for alignment.
These concerns should all be resolved (explanation in new patch summary).


https://reviews.llvm.org/D33345





More information about the llvm-commits mailing list