[llvm-dev] Why this piece of LLVM IR isn't optimized out at O3
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Tue Aug 13 12:21:47 PDT 2019
Hard to say without the complete IR (though minimizing it first before
sharing would be helpful - and might show you what's important along the
way).
On Tue, Aug 13, 2019 at 1:05 AM Zhang via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> ```
> %218 = call %struct._object* @PyObject_GetAttr(%struct._object* %216,
> %struct._object* %217)
> store %struct._object* %218, %struct._object** %26, align 8
> %219 = load %struct._object*, %struct._object** %26, align 8
> ```
> It seems to me that %219 should't exist at all.
> For that %store, there is only one instruction loading from it later on
> (although in a different succeeding block) so I'd assume it should get
> optimized too, leaving an empty unreferenced alloca at the beginning of the
> Entry Block. But running opt src.bc -S -o opt.ll -O3 didn't change them.
>
> What did I misunderstand here?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190813/29a5da69/attachment.html>
More information about the llvm-dev
mailing list