Markus =?utf-8?q?Gschoßmann?= <markus.gschossm...@tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossm...@tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossm...@tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossm...@tum.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/130...@github.com>


rnk wrote:

Thanks!

It looks like the new IR after this change doesn't pass verification, and 
presumably this causes the crash later:
```
$ clang -cc1 t.cpp -triple bpfel  -debug-info-kind=constructor -emit-llvm  -o - 
Attribute after last parameter!
ptr @_ZN3FooD0Ev
fatal error: error in backend: Broken module found, compilation aborted!
```

If you disable the verifier you can see the generated IR, but you can't see the 
"attributes beyond the last parameter". I guess they don't exist, so they don't 
get printed:
```
$ clang -cc1 t.cpp -triple bpfel  -debug-info-kind=constructor -emit-llvm  -o - 
-disable-llvm-verifier
...
; Function Attrs: nounwind
declare !dbg !5 void @_ZN3FooD0Ev() unnamed_addr #136686 
```

Actual base destructor (D0) prototypes have argument attributes that look like 
this:
```
define dso_local void @_ZN3BarD0Ev(ptr noundef nonnull align 8 
dereferenceable(8) %this) unnamed_addr #0 align 2 !dbg !27 {  
```

It's not clear what the BPF target is doing that's special that's forcing the 
compiler to emit this otherwise unused destructor declaration, that seems like 
the edge case here. Regardless, let's roll it back for now.


https://github.com/llvm/llvm-project/pull/130674
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to