[PATCH] D30529: [GlobalISel] Enable specifying how to legalize non-power-of-2 size types. [NFC-ish]

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 06:52:04 PDT 2017


kristof.beyls added a comment.



>> 2. Would this allow merging data?
>> 
>>   When sub-arch specific decisions are concerned, having a way to override a base default case would reduce the amount of code on both table-gen and c++ parts.
>> 
>>   For example, we could have a default catch-all case like `{1,widen; 32,legal; 33,unsupp}`, and later on, based on sub-arch decisions, increment legality, lib calls, etc.
> 
> With the patch as is, you indeed need to re-specify the info for all bit sizes.
>  It could be that I pushed the current patch way too far in breaking existing APIs and if I turned back the patch to only change the internal representations used in LegalizerInfo.cpp,
>  this would work. So, the idea being that tablegen info and targets specify for which data types an action can be taken that doesn't require changing bitsize, such as Legal, Lower, Libcall.
>  And then the target-independent logic can hopefully make decisions on most/all operations on how to adapt types to different bitsizes when that's needed.
>  I'll look into that.

The above is what the latest version of the patch does now.


https://reviews.llvm.org/D30529





More information about the llvm-commits mailing list