[llvm-commits] [llvm] r160919 - in /llvm/trunk: include/llvm/Target/TargetInstrInfo.h lib/CodeGen/PeepholeOptimizer.cpp lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h test/CodeGen/X86/2012-05-19-avx2-store.ll test/CodeGen/X86/break-sse-dep.ll test/CodeGen/X86/fold-load.ll test/CodeGen/X86/fold-pcmpeqd-1.ll test/CodeGen/X86/sse-minmax.ll test/CodeGen/X86/vec_compare.ll

Manman Ren mren at apple.com
Sun Jul 29 10:42:48 PDT 2012


This function was originally implemented inside peephole, but I moved it to X86InstrInfo.

It causes compile time increase for ARM, but no performance advantage since foldMemoryOperandImpl does nothing for ARM.
I can't figure out a clean way of disabling this for ARM.
Suggestions are welcome.

Thanks,
Manman

On Jul 29, 2012, at 10:29 AM, Jakob Stoklund Olesen wrote:

> 
> On Jul 28, 2012, at 9:48 AM, Manman Ren <mren at apple.com> wrote:
> 
>> +/// optimizeLoadInstr - Try to remove the load by folding it to a register
>> +/// operand at the use. We fold the load instructions if and only if the
>> +/// def and use are in the same BB.
>> +MachineInstr* X86InstrInfo::
>> +optimizeLoadInstr(MachineInstr *MI, const MachineRegisterInfo *MRI,
>> +                  SmallSet<unsigned, 4> &FoldAsLoadDefRegs,
>> +                  MachineInstr *&DefMI) const {
> 
> Hi Manman,
> 
> This function doesn't seem to be X86 specific, and the interface is a bit awkward. Perhaps it should live inside Peephole itself?
> 
> /jakob
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120729/d73e4fef/attachment.html>


More information about the llvm-commits mailing list