[PATCH] D16530: [Polly] Introduce MemAccInst helper class; NFC
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 07:16:44 PST 2016
Meinersbur added a comment.
In http://reviews.llvm.org/D16530#334955, @llvm-commits wrote:
> > +/// getValueOperand() and getPointerOperand() have different implementations in
> > +/// LoadInst and StoreInst, but for most other members the implementation is
> > +/// identical. Those have been reproduced here to avoid useless branching to
> > +/// identical implementations. If those implementations change in
> > +/// LoadInst/StoreInst, they must be changed here as well.
> The last sentence alone guarantees problems. Duplication is (almost)
> never a solution, especially not to save a call/jump/branch.
We'd notice immediately, but I can change to calling the proper functions, no problem.
Note that this is also duplicated in LLVM itself.
More information about the llvm-commits