[cfe-users] What's the easisest way to tell clang about type sizes and alignment?

2016-09-17 Thread Philipp Klaus Krause via cfe-users
To see the benefit of some optimization passes in LLVM for certain architectures, I'd like to compile C or C++ code for a target where a C compiler (SDCC) already exists. I guess the easiest way would be to use clang -S -emit-llvm then the optimization passes then the C backend (probably much easi

[cfe-users] Standalone build of clang possible?

2016-09-18 Thread Philipp Klaus Krause via cfe-users
Is it possible to do a standalone build of clang, i.e. using LLVm from the distro instead of building LLVM? The instructions at http://clang.llvm.org/get_started.html only mention building LLVM with clang. At https://gist.github.com/kwk/9617978 there is a project (that I didn't try yet) for a stan

Re: [cfe-users] Standalone build of clang possible?

2016-09-18 Thread Philipp Klaus Krause via cfe-users
On 18.09.2016 15:56, Philipp Klaus Krause via cfe-users wrote: > Is it possible to do a standalone build of clang, i.e. using LLVm from > the distro instead of building LLVM? > > The instructions at http://clang.llvm.org/get_started.html only mention > building LLVM with cl

[cfe-users] How to make char unsigned by default in target?

2016-09-21 Thread Philipp Klaus Krause via cfe-users
How can I make char unsigned by default in a target? I want to make my target to behave by default as if -fno-signed-char had been specified. TargetInfo has lots of members to specify properties of types, e.g. WCharType (which can be overridden by options, such as -fno-short-wchar). But I didn't s

[cfe-users] How to change alignment of long long

2016-10-21 Thread Philipp Klaus Krause via cfe-users
In clang-3.8, I'm trying to have some data types aligned on 8-bit boundaries, which works for everything except long long. In my target, I've used: IntAlign = 8; LongAlign = 8; LongLongAlign = 8; FloatAlign = 8; DataLayoutString = "E-p:16:8:8-i1:8:8-i8:8:8-i16:8:8-i32:8:8-i64:8:8-f32:8:8-a:8:8";

Re: [cfe-users] How to change alignment of long long

2016-10-22 Thread Philipp Klaus Krause via cfe-users
Found another one that encountered this problem: http://lists.llvm.org/pipermail/cfe-dev/2013-October/032554.html Again no solution there. Is anyone sucessfully using clang (preferably 3.8) with an alignment for long long or double that is not 64 bits? Philipp _

Re: [cfe-users] How to change alignment of long long

2016-10-22 Thread Philipp Klaus Krause via cfe-users
On 22.10.2016 09:35, Philipp Klaus Krause via cfe-users wrote: > Found another one that encountered this problem: > > http://lists.llvm.org/pipermail/cfe-dev/2013-October/032554.html > > Again no solution there. > > Is anyone sucessfully using clang (preferably 3.8) with an

Re: [cfe-users] How to 'reloop' llvm code into ifs, whiles, fors?

2016-11-07 Thread Philipp Klaus Krause via cfe-users
On 06.11.2016 09:17, Hugh Perkins via cfe-users wrote: > Hi, > > I have a project to rewrite llvm output as OpenCL, > https://github.com/hughperkins/cuda-on-cl It currently contains lots of > conditional branches, whch become /labels / gotos in the output OpenCL. > > What options are available t