This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lno-branch]: Alignment analysis, take two



On Jul 25, 2004, at 3:49 PM, Devang Patel wrote:



On Jul 25, 2004, at 10:22 AM, Daniel Berlin wrote:


he apple guys will probably want to add a way to say that malloc result is aligned on darwin (RTH had suggested that we might be able to reuse attribute aligned on function declarations, so that you could have something be attribute malloc, and attribute aligned. We could also introduce a new attribute if nobody likes that idea). Our definition of "attribute malloc" doesn't give us enough of a guarantee that we can make any assumptions about the alignment of it's return value.

Does this mean decorating malloc decl in system header with attribute aligned OR darwin target automatically attaching attribute aligned to malloc?
Either, i guess. He just suggested what we might abuse attribute aligned on function types, since it currently means nothing.


+/* Main structure for CCP.  Contains the lattice value and, if it's a
+    constant, the constant value.  */
+typedef struct
+{
+  latticevalue lattice_val;
+  struct
+  {
+    unsigned int n;
+    unsigned int offset;
+  } alignment;
+} value;

Cut-n-pasto in comment. Need to reflect alignment analysis not CCP.


Whoops, thanks.

+	 If it does, then in_ccp_worklist will be zero.  */
+      if (ann->in_ccp_worklist)

rename 'in_ccp_worklist' ?


We could rename it to "in_worklist" and make it a general "in-worklist" bit for passes to use, unless someone really objects.

+static int
+gcd (int a, int b)

also available in lambda-code.c.



Yes, in fact, that's where i copied it from. I forgot i wasn't going to submit this for the mainline since it was in stage2, and thus, i had that code available already.


I'll just make the lambda one external and reuse it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]