[LLVMdev] Eliminating redundant loads (original) (raw)

Hal Finkel hfinkel at anl.gov
Sun Feb 22 14:54:40 PST 2015


----- Original Message -----

From: "Dibyendu Majumdar" <mobile at majumdar.org.uk> To: "David Jones" <djones at xtreme-eda.com> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Sunday, February 22, 2015 4:40:52 PM Subject: Re: [LLVMdev] Eliminating redundant loads

On 22 February 2015 at 20:58, David Jones <djones at xtreme-eda.com> wrote: > Not sure if this is your problem, but it was mine: > > You must create (or obtain) a DataLayout *and install it into the > Module*. > > It is possible to generate machine code for IR and not install the > DataLayout into the Module. Rather, the DataLayout is used locally > at the > point where code is generated. However, if you do this, then the > alias > analyses required to get rid of your redundant loads and stores > cannot > reason about possible aliasing. > Hi David, I tried setting the module's DataLayout to the engine's DataLayout. Don't see any improvement. The memcpy() is to perform a struct assign, so I tried replacing that with member by member store. But even then the loads are not being eliminated so I guess the memcpy() isn't the issue.

If you run the IR through opt -O3 do you get the optimization you expect?

-Hal

Regards Dibyendu


LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory



More information about the llvm-dev mailing list