[PATCH] D20262: [DSE]Split memset when the memset is small enough to be lowered to stores

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 07:46:02 PDT 2016


> On Jun 1, 2016, at 6:59 AM, Jun Bum Lim <junbuml at codeaurora.org> wrote:
> 
> junbuml added a comment.
> 
>> +Mehdi, who set the mandatory data layout.
> 
> 
> Can you please clarify about the mandatory?

http://llvm.org/docs/doxygen/html/Module_8cpp_source.html#l00375
"const DataLayout &Module::getDataLayout() const { return DL; }"

It returns a reference, so it is guaranteed to not be null.

> The reason I'm asking is because I can still see many test cases without data layout.

"No data layout in the Textual IR means "use the default data layout" for the triple."

> 
>> Having  DL.getLargestLegalIntTypeSizeInBits() returning 0 would mean that someone specifically asked for not having int types supported at all. Handling this case means that LLVM acknowledges that it aims at supporting this case. Is it possible/desirable to support this? Otherwise an assertion would be more appropriate IMO.
> 
> 
> If having  DL.getLargestLegalIntTypeSizeInBits() returning 0 is undesirable, I think we should assert in getLargestLegalIntTypeSizeInBits().

Wouldn't DL.getLargestLegalIntTypeSizeInBits() == 0 imply that you can have icmp or select? Hence almost nothing in llvm would work?

-- 
Mehdi


More information about the llvm-commits mailing list