[llvm-commits] [llvm] r91104 - in /llvm/trunk/lib/Target/X86: X86InstrInfo.cpp X86InstrInfo.h

Evan Cheng evan.cheng at apple.com
Sat Dec 12 10:40:34 PST 2009


On Dec 11, 2009, at 11:19 AM, Dan Gohman wrote:

> 
> On Dec 10, 2009, at 10:01 PM, Evan Cheng wrote:
> 
>> Author: evancheng
>> Date: Fri Dec 11 00:01:48 2009
>> New Revision: 91104
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=91104&view=rev
>> Log:
>> Add support to 3-addressify 16-bit instructions.
>> 
>> Modified:
>>   llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
>>   llvm/trunk/lib/Target/X86/X86InstrInfo.h
>> 
>> Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=91104&r1=91103&r2=91104&view=diff
>> 
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Fri Dec 11 00:01:48 2009
>> @@ -1058,6 +1058,107 @@
>>  return false;
>> }
>> 
>> +/// convertToThreeAddressWithLEA - Helper for convertToThreeAddress when 16-bit
>> +/// 16-bit LEA is disabled, use 32-bit LEA to form 3-address code by promoting
> 
> Typo: "16-bit 16-bit".
> 
>> +/// to a 32-bit superregister and then truncating back down to a 16-bit
>> +/// subregister.
> 
> This change introduces a partial register stall condition; are you
> sure this is worthwhile? If so, please note this in a comment.
> 
> Also, do you have a testcase?

See 91105.

I had considered the issue of partial register stall. I do have a micro-benchmark that shows this patch speeding it up noticeably. Perhaps lea doesn't suffer from it? I'll fix up the test and commit it later.

It might also be worthwhile to consider just using the 16-bit lea instruction. I'll experiment.

Evan

> 
> Dan
> 





More information about the llvm-commits mailing list