search for: largearrayalign

Displaying 9 results from an estimated 9 matches for "largearrayalign".

2019 May 05
2
How to get CLang array alloca alignments to be smaller than 16 bytes?
> Are you looking in Clang's source, and that from the same 7.0 version? Yes, I am, and it’s the same version (7.0.1). “LargeArrayMinWidth” is only on the following files: TargetInfo.cpp TargetInfo.h So I still think there’s something else that makes the difference on the x86 target. Anyway, I will now investigate other targets as my temporary frontend. It is right that other targets
2019 May 05
4
How to get CLang array alloca alignments to be smaller than 16 bytes?
I am working on a custom LLVM backend for a 16 bit architecture. For my architecture, I need smaller array alignments for arrays created on the stack. For example, consider the following code at the start of a C function: char localBuff[20]; char localBuff2[6]; this gets converted by Clang into this: %localBuff = alloca [20 x i8], align 16 %localBuff2 = alloca [6 x i8], align 1 Note
2017 May 22
2
How exactly is datatype alignment determined?
Hi, I'm seeing a bug in the AVR backend that seems to be caused by LLVM thinking things will be aligned to 8 bytes whereas they are unaligned. Specifically, MF->getDataLayout().getPrefTypeAlignment(Ty) returns 8 for the following two types: %opt = type { i8, [0 x i8], [3 x i8] } %Machine = type { i16, [0 x i8], i16, [0 x i8], [16 x i8], [0 x i8] } The target datalayout specifies that
2017 May 22
2
How exactly is datatype alignment determined?
On Mon, 22 May 2017, Krzysztof Parzyszek via llvm-dev wrote: > Probably from LargeArrayMinWidth/LargeArrayAlign settings in Targets.cpp (in > clang). Wait what? In clang? But my input is already LLVM IR. MF->getDataLayout().getPrefTypeAlignment(Ty) must be basing its answer on either something in the IR file, or in the target implementation, but clang is not really in the picture.
2019 May 05
2
How to get CLang array alloca alignments to be smaller than 16 bytes?
...ficial Clang released source > (https://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz), and: > > $ tar xvf Downloads/cfe-7.0.0.src.tar.xz > [...] > $ cd cfe-7.0.0.src/ > $ grep -r LargeArrayMinWidth . > ./include/clang/Basic/TargetInfo.h: unsigned char LargeArrayMinWidth, > LargeArrayAlign; > ./include/clang/Basic/TargetInfo.h: // getLargeArrayMinWidth/Align - > Return the minimum array size that is > ./include/clang/Basic/TargetInfo.h: unsigned getLargeArrayMinWidth() > const { return LargeArrayMinWidth; } > ./lib/Basic/TargetInfo.cpp: LargeArrayMinWidth = 0; >...
2019 May 05
2
How to get CLang array alloca alignments to be smaller than 16 bytes?
...rgeArrayMinSize in any project files (not even in lib/Basic/Targets/X86.cpp) > > Sorry, I think that may actually be "LargeArrayMinWidth". I > investigated on a different computer to where I typed up my first > reply so didn't have the exact text on screen. > >> LargeArrayAlign is only in TargetInfo.h and TargetInfo.cpp which is set to a value of 0 (Zero) > > The default is set to 0 in TargetInfo.cpp, but I see it overridden in > X86.h, even in the 7.0 branch (again, typo in my original comment, > where I said .cpp). You'll be creating the equivalent file...
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...dth = LongAlign = PointerWidth = PointerAlign = 64; + const bool IsX32 = (getTriple().getEnvironment() == llvm::Triple::GNUX32); + LongWidth = LongAlign = PointerWidth = PointerAlign = IsX32 ? 32 : 64; LongDoubleWidth = 128; LongDoubleAlign = 128; LargeArrayMinWidth = 128; LargeArrayAlign = 128; SuitableAlign = 128; - IntMaxType = SignedLong; - UIntMaxType = UnsignedLong; - Int64Type = SignedLong; + if (IsX32) { + SizeType = UnsignedInt; + PtrDiffType = SignedInt; + IntPtrType = SignedInt; + } else { + IntMaxType = SignedLong; + UIntMaxTy...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi, I'm working on bringing up complete coverage for a Gentoo x32 "desktop" system. I've been cooking up quite a few patches for various packages to push upstream, but right now, the biggest blocker is the lack of support for building with/codegen targeting x32 in llvm/clang. Since the x32 patches were sent last year, I see support code has landed in LLVM, and basic handling of
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...dth = LongAlign = PointerWidth = PointerAlign = 64; + const bool IsX32 = (getTriple().getEnvironment() == llvm::Triple::GNUX32); + LongWidth = LongAlign = PointerWidth = PointerAlign = IsX32 ? 32 : 64; LongDoubleWidth = 128; LongDoubleAlign = 128; LargeArrayMinWidth = 128; LargeArrayAlign = 128; SuitableAlign = 128; - IntMaxType = SignedLong; - UIntMaxType = UnsignedLong; - Int64Type = SignedLong; + if (IsX32) { + SizeType = UnsignedInt; + PtrDiffType = SignedInt; + IntPtrType = SignedInt; + } else { + IntMaxType = SignedLong; + UIntMaxTy...