Bjorn De Sutter
2013-Aug-06 16:47 UTC
[LLVMdev] strcpy optimization to i32 instead of i64 stores
Hi, For my 32-bit architecture backend, I run into trouble because strcpy is converted into i64 store instructions, on which instruction selection fails. No i64 store is declared anywhere in my .td files or architecture backend, so I would assume that they are automatically converted into 2 i32 stores, but apparently, that is not the case. Do I need to add anything to my backend to have this types of i64 stores converted into 2 i32 stores? Or can I easily avoid that opt or clang create the i64 instructions in the first place? Thanks, Bjorn De Sutter Computer Systems Lab Ghent University
Tim Northover
2013-Aug-07 15:17 UTC
[LLVMdev] strcpy optimization to i32 instead of i64 stores
Hi Bjorn,> Do I need to add anything to my backend to have this types of i64 stores converted into 2 i32 stores?It looks like you need to override "getOptimalMemOpType" in XXXISelLowering.cpp. It's used by FindOptimalMemOpLowering in SelectionDAG.cpp.> Or can I easily avoid that opt or clang create the i64 instructions in the first place?That's more tricky, but it looks like the relevant functions are "gerMaxStoresPerMemcpy", "getMaxStoresPerMemmove" and "getMaxStoresPerMemset". I don't think they would stop it entirely though, just discourage it. Cheers. Tim.
Reasonably Related Threads
- How to change CLang struct alignment behaviour?
- How to change CLang struct alignment behaviour?
- How to change CLang struct alignment behaviour?
- [LLVMdev] subtle issue with soft-float and new attribute scheme (possibly an issue with other attributes)
- How to change CLang struct alignment behaviour?