[PATCH] D38278: [CGP] Make optimizeMemoryInst capable of handling multiple AddrModes
John Brawn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 08:10:56 PDT 2017
john.brawn added inline comments.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2680
+ Value *OriginalValue = nullptr;
+ User *AddrModeUser = nullptr;
+
----------------
skatkov wrote:
> I cannot understand why you need a AddrModeUser. The only one use of this field I see is for checking that user of AddrMode is Phi or Select.
>
> However according to usage of AddressingModeCombiner AddrModeUser cannot be anything else.
>
> Do I miss anything?
It's there mostly for when we do actually want to do the transform to adjust the select / add a new one - I have an updated version of D38133 that builds on top of this (that I'm not intending to commit), to make sure that this patch actually does something useful, and it's used there. Depending on how D36073 goes it may or may not end up being useful though, so I'll remove it.
https://reviews.llvm.org/D38278
More information about the llvm-commits
mailing list