llvm-project
llvm-project copied to clipboard
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
Is it possible to teach llvm do optimizations on builtin functions? For such code: ```c void test_mtspr() { __builtin_ppc_mtspr(3,5); __builtin_ppc_mtspr(3,5); } ``` With command: ```shell clang -cc1 -internal-isystem ~/mywork/llvm/build/lib/clang/15.0.0/include -nostdsysteminc...
In some cases, the compiler's ability to eliminate dead code depends on the order of the sub-expressions within the if. LLVM detects that the if expression in the following code...
Sometimes, DCE breaks by adding a redundant term. In the following example, the if statement always evaluates to false. LLVM (14) detects that and removes the dead code: ```c #include...
GCC calls the virtual destructor for ```cpp struct S { [[gnu::const]] virtual ~S(); }; void destroy(S* s) { s->~S(); } ``` ([Godbolt](https://godbolt.org/z/sbx4fz68M)) while clang optimizes it away. Since `[[gnu::const]]` is...
For about a week or so, I've noticed a huge slowdown in compilation speed of LLVM/Clang when my build got compiled with the following flags (my CPU = Haswell): ```shell...
Sometimes the compiler's ability to detect and eliminate dead code decreases when double negations are inserted. LLVM detects that in the following snippet the if expression is always false and...
| | | | --- | --- | | Bugzilla Link | [42987](https://llvm.org/bz42987) | | Version | 6.0 | | OS | All | | Reporter | LLVM Bugzilla Contributor...
The `one-shot-bufferize` pass throws assertion error `OpOperand was already decided to bufferize inplace` with the following IR ```mlir func.func @main(%arg0 : tensor) -> memref { %0 = bufferization.to_memref %arg0 :...
I am running clang static analyzer via CodeChecker with CTU analysis on Firefox (so it's a big project.) I am running into errors because it seems to generate an invalid...
First: Thank you so much for implementing these warnings! This is highly appreciated! Here is a minor nit: Clang warns for parameters declared using `[ * ]` when followed by...