From 59850d0874429601812bc13408cb1f776649027c Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 14 Oct 2009 17:57:32 +0000 Subject: Update llvm to r84119. --- docs/GetElementPtr.html | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'docs/GetElementPtr.html') diff --git a/docs/GetElementPtr.html b/docs/GetElementPtr.html index f4b096a10de5..d5863e8a52b7 100644 --- a/docs/GetElementPtr.html +++ b/docs/GetElementPtr.html @@ -40,7 +40,7 @@

This document seeks to dispel the mystery and confusion surrounding LLVM's GetElementPtr (GEP) instruction. Questions about the wiley GEP instruction are - probably the most frequently occuring questions once a developer gets down to + probably the most frequently occurring questions once a developer gets down to coding with LLVM. Here we lay out the sources of confusion and show that the GEP instruction is really quite simple.

@@ -303,13 +303,14 @@ idx3 = (char*) &MyVar + 8

In this example, idx1 computes the address of the second integer - in the array that is in the structure in %MyVar, that is MyVar+4. The - type of idx1 is i32*. However, idx2 computes the - address of the next structure after %MyVar. The type of - idx2 is { [10 x i32] }* and its value is equivalent - to MyVar + 40 because it indexes past the ten 4-byte integers - in MyVar. Obviously, in such a situation, the pointers don't - alias.

+ in the array that is in the structure in %MyVar, that is + MyVar+4. The type of idx1 is i32*. However, + idx2 computes the address of the next structure after + %MyVar. The type of idx2 is { [10 x i32] }* and its + value is equivalent to MyVar + 40 because it indexes past the ten + 4-byte integers in MyVar. Obviously, in such a situation, the + pointers don't alias.

+ @@ -364,7 +365,7 @@ idx3 = (char*) &MyVar + 8 Valid HTML 4.01 The LLVM Compiler Infrastructure
- Last modified: $Date: 2008-12-11 19:23:24 +0100 (Thu, 11 Dec 2008) $ + Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ -- cgit v1.2.3