Joan Lluch via llvm-dev
2019-May-05 20:48 UTC
[llvm-dev] How to get CLang array alloca alignments to be smaller than 16 bytes?
Hi Tim I created an Xcode project with CMAKE, which should have the entire lot of files. Selecting the ‘install’ scheme Xcode compiles everything including all available targets for clang and llc, which then I can fully debug. So the Xcode project definitely has all the cpp files in it. However, I now have found that for some reason the .h files in the lib/Basic/Targets directory were not included as part of the Xcode project. This is kind of weird, as this is the only case that I found of .h files not being added to the project. I assume this is a bug on one of the cmake install files. The entire thing compiles anyway because the compiler finds the .h files as they are included in the .cpp source. I have been performing all searches in the convenience of the xCode environment, and since these particular files were missing from the project they didn’t appear in any searches. I suppose this can be reported as a bug of the Cmake configuration files for xCode. John> On 5 May 2019, at 22:01, Tim Northover <t.p.northover at gmail.com> wrote: > > On Sun, 5 May 2019 at 19:41, Joan Lluch <joan.lluch at icloud.com> wrote: >> “LargeArrayMinWidth” is only on the following files: >> >> TargetInfo.cpp >> TargetInfo.h > > OK, so I've downloaded the official 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; > ./lib/Basic/Targets/Hexagon.h: LargeArrayMinWidth = 64; > ./lib/Basic/Targets/NVPTX.cpp: // - LargeArrayMinWidth, > LargeArrayAlign: Not visible across the > ./lib/Basic/Targets/X86.h: LargeArrayMinWidth = 128; > ./lib/Basic/Targets/WebAssembly.h: LargeArrayMinWidth = 128; > ./lib/AST/ASTContext.cpp: unsigned MinWidth > Target->getLargeArrayMinWidth(); > > I'm afraid I don't know what actually is happening here, but I think > the best explanation has to be that you're not actually looking at > Clang 7.0 source. That would definitely be my primary line of > investigation. > > Cheers. > > Tim.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190505/9ed9fdc8/attachment.html>
Tim Northover via llvm-dev
2019-May-05 20:58 UTC
[llvm-dev] How to get CLang array alloca alignments to be smaller than 16 bytes?
On Sun, 5 May 2019 at 21:49, Joan Lluch <joan.lluch at icloud.com> wrote:> However, I now have found that for some reason the .h files in the lib/Basic/Targets directory were not included as part of the Xcode project.Ah. At least we now have a common view on the source, and hopefully you can see what needs doing (even if Xcode won't reflect reality properly for whatever reason).> I assume this is a bug on one of the cmake install files.As far as I'm aware LLVM has little to no Xcode magic in its CMake files. So the bug would be in either CMake (supplying inadequate dependencies?) or Xcode (misinterpreting CMake output?). I'm afraid I don't really know enough about either to say which is responsible. It could even be LLVM, though from what I *have* seen of CMake, I'd be surprised if we needed to declare headers. Cheers. Tim.
Joan Lluch via llvm-dev
2019-May-05 21:24 UTC
[llvm-dev] How to get CLang array alloca alignments to be smaller than 16 bytes?
To be honest, I don’t either know what really happens under the hood when CMake creates the xCode project for CLang+LLVM. But there’s something really explicit going on there, because the project as it’s shown in xCode does not have the same file grouping structure than the actual physical folders. Not only the project file grouping doesn't match the physical folder locations, but the group naming is different and generally more convenient and organised than the actual folder structure. What does all that, I have no idea, but cmake creates it all by just selecting xCode as the cmake “generator”. John> On 5 May 2019, at 22:58, Tim Northover <t.p.northover at gmail.com> wrote: > > On Sun, 5 May 2019 at 21:49, Joan Lluch <joan.lluch at icloud.com> wrote: >> However, I now have found that for some reason the .h files in the lib/Basic/Targets directory were not included as part of the Xcode project. > > Ah. At least we now have a common view on the source, and hopefully > you can see what needs doing (even if Xcode won't reflect reality > properly for whatever reason). > >> I assume this is a bug on one of the cmake install files. > > As far as I'm aware LLVM has little to no Xcode magic in its CMake > files. So the bug would be in either CMake (supplying inadequate > dependencies?) or Xcode (misinterpreting CMake output?). > > I'm afraid I don't really know enough about either to say which is > responsible. It could even be LLVM, though from what I *have* seen of > CMake, I'd be surprised if we needed to declare headers. > > Cheers. > > Tim.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190505/ff5fb498/attachment.html>
Seemingly Similar Threads
- How to get CLang array alloca alignments to be smaller than 16 bytes?
- How to get CLang array alloca alignments to be smaller than 16 bytes?
- How to get CLang array alloca alignments to be smaller than 16 bytes?
- How to get CLang array alloca alignments to be smaller than 16 bytes?
- Help required on running the regression tests