[PATCH] D11331: Remove TargetInstrInfo::canFoldMemoryOperand

Simon Pilgrim llvm-dev at redking.me.uk
Sat Jul 18 14:52:18 PDT 2015


RKSimon created this revision.
RKSimon added reviewers: qcolombet, nadav, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

During a recent visual review of the x86 memory folding code I noticed that X86InstrInfo::canFoldMemoryOperand had bit-rotted somewhat compared to the actual foldMemoryOperand/foldMemoryOperandImpl implementation. I began investigating a fix when I realised that canFoldMemoryOperand is not actually used anywhere in the codebase.... All existing users instead call foldMemoryOperand directly when they wish to fold and can correctly deduce what they need from the return value. I don't see this state of affairs changing - do you?

This patch removes the canFoldMemoryOperand base function and the target implementations; only x86 had a real implementation, although AMDGPU had a preparatory stub that had never needed to be completed.

Repository:
  rL LLVM

http://reviews.llvm.org/D11331

Files:
  include/llvm/Target/TargetInstrInfo.h
  lib/CodeGen/TargetInstrInfo.cpp
  lib/Target/AMDGPU/AMDGPUInstrInfo.cpp
  lib/Target/AMDGPU/AMDGPUInstrInfo.h
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11331.30091.patch
Type: text/x-patch
Size: 6847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150718/a3bd41ce/attachment.bin>


More information about the llvm-commits mailing list