[llvm-commits] two-byte return optimization for AMD
Evan Cheng
echeng at apple.com
Sun Dec 7 23:39:39 PST 2008
On Dec 7, 2008, at 11:10 PM, Chris Lattner wrote:
>
> On Dec 7, 2008, at 11:04 PM, Evan Cheng wrote:
>
>> I am not crazy about adding a subtarget feature for a micro-
>> optimization. If you want to enable a family of optimizations for AMD
>> chips, please just add something like a FeatureAMD feature.
>
> Why not? What if some AMD chips have this "feature/problem" and
> others don't?
>
I don't know. The problem with using SubtargetFeature for these is you
can easily have an explosion of "features". But these are not
features, they are micro-optimizations, errata workarounds. I'd rather
break AMD into a several AMD families and teach x86 which families
suffer from this.
>> Also, it seems awfully expensive to perform a full machine function
>> pass. This seems like something that can be done at instruction
>> selection time?
>
> It needs to happen after prolog epilog insertion, code layout, etc is
> done.
I thought it was just replacing every X86::RET with X86::REP_RET. I
see now it's only doing this if it's the first instruction.
Evan
>
>
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list