I've got a tip-of-trunk checkout of llvm, cfe, and compiler-rt. I'm
building on Ubuntu 14.04, so using GCC 4.8.2 for the build.
CMake configuration works fine, and a full build ('make all') also works
fine. When I run 'make check-all', I see quite a lot of unit tests being
built, and then the foll
I shouldn't think there's a way to remove/disable them. It would mean
rewriting the memcpies as loops, since the 'store' instruction is only for
first class types ( http://llvm.org/docs/LangRef.html#store-instruction
http://llvm.org/docs/LangRef.html#t-firstclass )
SimplifyLibCalls is for simplify
Thanks, David, I understand. Then, is there a way of disabling generating
the llvm. intrinsics? opt seems to have an option called
-disable-simplify-libcalls. However, in my case, it does not remove the
llvm.memcpy instruction from the bitcode.
On Thu, Feb 11, 2016 at 6:04 PM, David Blaikie wrote
There probably is a rule, but I don't know what it is - I would imagine
memcpy is used when storing a whole aggregate (but then you'll get into ABI
issues, etc - maybe if the struct contains only a single primitive type it
just switches to a store, etc).
On Thu, Feb 11, 2016 at 8:44 AM, Simona Sim
Thanks, David, this is useful.
So sometimes the front-end generates llvm.memcpy instead of store
instructions.
Is there a rule in generating llvm.memcpy instructions instead of stores? I
would have the same question for other instrinsics, such as memset and
memmove.
Thanks,
Simona
On Thu, Feb 11
On Thu, Feb 11, 2016 at 7:25 AM, Simona Simona via cfe-users <
cfe-users@lists.llvm.org> wrote:
> Hi,
>
> I'm using clang 3.4 to generate the bitcode of a C source file.
> The source file is the following:
>
> typedef struct __attribute__ ((__packed__)) { float x, y; } myType;
> myType make_float2
Hi,
I'm using clang 3.4 to generate the bitcode of a C source file.
The source file is the following:
typedef struct __attribute__ ((__packed__)) { float x, y; } myType;
myType make_float2(float x, float y) { myType f = { x, y }; return f; }
int main(int argc, char* argv[])
{
myType myVa