search for: issingleelementstructorarray

Displaying 3 results from an estimated 3 matches for "issingleelementstructorarray".

2007 Oct 02
2
[LLVMdev] struct as a function argument
...e it (my guess is that this should be doable by passing > some parameter to llvm-gcc)? The easiest way to disable this is to hack it out of llvm-gcc. Change this (gcc/llvm-abi.h): #ifndef LLVM_SHOULD_PASS_AGGREGATE_IN_INTEGER_REGS #define LLVM_SHOULD_PASS_AGGREGATE_IN_INTEGER_REGS(X) \ !isSingleElementStructOrArray(type) #endif to: #undef LLVM_SHOULD_PASS_AGGREGATE_IN_INTEGER_REGS #define LLVM_SHOULD_PASS_AGGREGATE_IN_INTEGER_REGS(X) 0 Note that you won't be able to mix and match .o files with GCC where structs are passed by value. -Chris
2007 Oct 02
0
[LLVMdev] struct as a function argument
Hi all, I have the same problem. My guess is that when a structure is passed as a parameter, you cast it into an array for optimization reasons (less parameters, less stack space). This is, certainly, a reasonable optimization, but makes inter-procedural static analysis more complex. Is there a way to disable it (my guess is that this should be doable by passing some parameter to llvm-gcc)? If
2007 Sep 29
3
[LLVMdev] struct as a function argument
Hi everybody! I recently started using llvm in a project on inferring additional information about pointers based on their types, casts, etc. The following simple example is giving me a headache :): typedef struct { int a; short b, c; int d, e, f; } foo; void bar(foo f) { short s; s = f.b; } int main(void) { foo p; bar(p); } Because llvm doesn't allow structures and arrays