[LLVMdev] [llvm-commits] [cfe-commits] [PATCH] [llvm+clang] memset for non-8-bit bytes
Eli Friedman
eli.friedman at gmail.com
Fri Oct 19 12:59:48 PDT 2012
On Fri, Oct 19, 2012 at 12:45 PM, Owen Anderson <resistor at mac.com> wrote:
>
> On Oct 19, 2012, at 11:43 AM, Patrik Hägglund H <patrik.h.hagglund at ericsson.com> wrote:
>
>>> I'm a bit confused by this concept.
>>
>> For the term byte, I use the "archaic" definition in the C (and C++) standard (section 3.6):
>>
>> addressable unit of data storage large enough to hold any member of the basic character
>> set of the execution environment
>
> That definition isn't really relevant to LLVM, though. You can define char to be (say) 16 bits, and your frontend (clang?) just needs to set CHAR_BIT properly, and generate code with i16 whenever you wrote char.
That's not true; SimplifyLibCalls, for example, would perform all
sorts of bad optimizations if CHAR_BIT is not 8.
> I suspect what you want to talk about, and the part that is relevant to LLVM as opposed to clang, is supporting architectures where the minimum addressable unit is not 8 bits in size.
There's also this.
-Eli
More information about the llvm-dev
mailing list