From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93428 invoked by alias); 14 Jun 2015 10:09:01 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 93405 invoked by uid 89); 14 Jun 2015 10:08:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.7 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-yh0-f41.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=3zglybjK9nQ3+vptWtf+ZkP4T69VSKBg4A/6kmNO4/g=; b=lTKdxiTE3jP6476V8KfsnRWsNyoUTj3mh+QFjKctSS5lPYrmOUYfGUFNdVeoZsFxuh jUNkIenzFbt6XYnuQASfCkRduF/4XeebR+uWIvtiNbgGQubUip2z6iWs9oZjBgfaMkzf 55o6umuYyHS7vvH5H3REcmtfoK7fYpOUCSCuEzwIX4Flw7BjGCb9n19SJVXEU80+QLW5 /Wvu9MoVlSA2TO/oi1DnFUfSmmXJw5jrJySk6RREnMlPuCMJt622ailZNJE2IJhCGsDx Zk46TOcKXr+Fcgf7giGDa7/ud7cUqzU+3bcePzW2kX51eGM7/e/ttFHq0myXf6QJWApy DG6A== X-Gm-Message-State: ALoCoQnpRfps9CDBqUUHZaQs3/B6Db6wFV0gchOFH87ODbA+NjTwT+ybJG3AnJoGxmGC23qOKJOH MIME-Version: 1.0 X-Received: by 10.170.113.148 with SMTP id f142mr28548971ykb.115.1434276535919; Sun, 14 Jun 2015 03:08:55 -0700 (PDT) Date: Thu, 01 Jan 2015 00:00:00 -0000 Message-ID: Subject: lvalues and rvalues From: Dibyendu Majumdar To: jit@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-q2/txt/msg00052.txt.bz2 I am still trying to get the lvalue / rvalue concepts so that I know exactly what to use when. I have struct with a pointer member. struct X { struct Y *base; }; Now this pointer base can be updated while the function is running so I need the value of the pointer refreshed (loaded) whenever it can potentially change. In LLVM I emit explicit load instructions which are then optimized so that any redundant loads are deleted. What would be the equivalent method here? Should I just use a rvalue reference? Will this be automatically refreshed? Should I use a local variable and assign the value of the base pointer to it explicitly (i.e. similar to explicit load) ? Thanks and Regards Dibyendu