Conversation

just made CXXRTL 20% faster overall (2× faster commits) on clang-11 by replacing a bunch of `flag |= x.commit()` with `if (x.commit()) flag = true;` (gcc-10 is unaffected) compilers🤦‍♀️
6
121
what is particularly funny is that clang without the fix is slower than gcc, but clang with the fix is actually 10% faster than gcc
3
27
Replying to and
Clang similarly doesn't make much use of LLVM aggregates. In general, this is a sign that there's something wrong with the LLVM feature and it isn't a good idea to use it elsewhere if you expect correct and efficient code generation. C ABI support in LLVM is a total hack too.
1
4
Replying to and
Clang manually deals with implementing the C calling convention for structs instead of LLVM's C calling convention implementing it for aggregates. These workarounds in Clang cause many missed optimizations in LLVM, and LLVM also isn't optimized to deal well with first-class code.
1
5
Replying to and
Since Clang uses i8 for bool, optimization passes often haven't been implemented to handle i1. So, you choose between deciding to miss optimizations because LLVM thinks the other 7 bits might be used vs. missing optimizations because no one optimized for doing what makes sense.
1
8
Since LLVM doesn't have first-class tagged unions and the concept doesn't exist at a language level in C, LLVM is particularly bad at handling those and it's bad enough at handling booleans... Also, since restrict is hardly used in C, noalias is still incredibly broken in LLVM.
1
3
Show replies