From 3fdb44ec16a5397520411bcb5e3e9087328c71ad Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 5 Nov 2007 17:45:54 +0000 Subject: [PATCH] Dan points out that mem2reg also promotes vectors: be more precise. llvm-svn: 43715 --- docs/tutorial/LangImpl7.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html index 6664c7c5802..b002f7a4519 100644 --- a/docs/tutorial/LangImpl7.html +++ b/docs/tutorial/LangImpl7.html @@ -258,7 +258,9 @@ once, which makes analysis simpler. the address of the stack object is passed to a function, or if any funny pointer arithmetic is involved, the alloca will not be promoted. -
  • mem2reg only works on allocas of scalar values, and only if the array size +
  • mem2reg only works on allocas of first class +values (such as pointers, scalars and vectors), and only if the array size of the allocation is 1 (or missing in the .ll file). mem2reg is not capable of promoting structs or arrays to registers. Note that the "scalarrepl" pass is more powerful and can promote structs, "unions", and arrays in many cases.