[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-22 Thread Markus Lavin via Phabricator via cfe-commits
markus added a comment. In D123300#3467309 , @nikic wrote: > Sounds reasonable in general -- though isn't this a pre-existing problem > you'd see if you simply had multiple loads from the same global (without any > GEP)? Looking at the current ConstantH

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-22 Thread Markus Lavin via Phabricator via cfe-commits
markus added a comment. We have run into a slight performance degrading issue with our downstream target. The situation is that we relay on the "consthoist" pass with option "-consthoist-gep=1" to factor out the common parts of GEP expresseions to reduce the number of symbol references. For exa

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-20 Thread Markus Lavin via Phabricator via cfe-commits
markus added a comment. In D123300#3459023 , @nikic wrote: > @markus Without tracing through it in detail, I'd guess that without opaque > pointers this creates two getelementptr constant expressions that get folded > together. With opaque pointers, the

[PATCH] D123300: [Clang] Enable opaque pointers by default

2022-04-19 Thread Markus Lavin via Phabricator via cfe-commits
markus added a comment. With $ ./bin/clang -cc1 -emit-llvm BBI-68673.c the IR contains the following @a2_ldm_i64 = global [4 x [18 x { i64, i64 }]] zeroinitializer, align 16 %arrayidx = getelementptr inbounds [4 x [18 x { i64, i64 }]], ptr @a2_ldm_i64, i64 0, i64 %idxprom %.real = load