[llvmgcc] Passing large structures by value to functions results in large code. #1117
Labels
bugzilla
Issues migrated from bugzilla
llvm-tools
All llvm tools that do not have corresponding tag
quality-of-implementation
Extended Description
#include <stdlib.h>
struct RT {
char a;
char b;
int c;
int d[50][50];
} glob;
int main(int argc, char **argv) {
glob.a = 1;
glob.b = 2;
glob.c = 3;
printf("glob.1 = %d\n", *(&glob + 1));
}
compiles 62 seconds, spits out 18kb bc file with 5063 tmp vars. For
larger arrays (say 1000 X 2000) it never returns. GCC has no problems
compiling such examples.
A 10-liner shouldn't kill the compiler :-)
Domagoj
The text was updated successfully, but these errors were encountered: