[PATCH] D35933: Eliminate TargetTransformInfo::isFoldableMemAccess()

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 03:18:45 PDT 2017


jonpa updated this revision to Diff 108612.
jonpa added a comment.

> I'm not sure about the common code changes -- what does simply calling isLegalAddressingMode instead of isFoldableMemAccessOffset do to targets that have not yet added support to do instruction-specific checks to the former?  I'd assume you'd see performance regressions there.
> 
> Maybe this transition should be done on a target-by-target basis.

SystemZ was the only user of isFoldableMemAccessOffset() except for any out-of-tree targets. I was thinking that this transition should not be much more difficult than what it was on SystemZ. Since it is now clear that this method is obsolete, perhaps a heads-up in the commit message will do?

> Hmm, this pulls the conditions apart again ... Maybe readability would be improved by just always having a SupportedAM variable, initialized at the top like...

Done.


https://reviews.llvm.org/D35933

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  include/llvm/CodeGen/BasicTTIImpl.h
  include/llvm/Target/TargetLowering.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/SystemZ/SystemZISelLowering.cpp
  lib/Target/SystemZ/SystemZISelLowering.h
  lib/Transforms/Scalar/LoopStrengthReduce.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35933.108612.patch
Type: text/x-patch
Size: 8132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170728/c2b1903c/attachment.bin>


More information about the llvm-commits mailing list