Clang error during instrumented build: "musttail call must be precede a ret with an optional bitcast" |
||
Issue descriptionI ran into this with the pinned clang (328575) while trying to build a cygprofile-instrumented 32-bit chrome: gn gen out\instrument --args="is_debug=false is_official_build=true generate_order_files=true symbol_level=1 use_goma=true target_cpu=\"x86\"" ninja -j800 -C out\instrument chrome Attaching the repro.
,
Apr 5 2018
Currently reducing, but it's taking a while.
This is the full error message:
musttail call must be precede a ret with an optional bitcast
musttail call x86_thiscallcc void @"?ProcessKeyEvent@InputMethodEngine@input_method@@UAEXABVKeyEvent@ui@@V?$OnceCallback@$$A6AX_N@Z@base@@@Z"(i8* %4, <{ %"class.ui::KeyEvent"*, %"class.base::OnceCallback"
}>* inalloca nonnull %0) #14
fatal error: error in backend: Broken function found, compilation aborted!
That ProcessKeyEvent is the one mentioned in crbug.com/822202
,
Apr 5 2018
This probably doesn't block the Clang roll actually, but it would be nice to get fixed.
,
Apr 6 2018
Reid's example from Issue 822202 can be used to reproduce: $ cat /tmp/a.cc struct Incomplete; struct A { A() {} virtual ~A() {} virtual void asdf() = 0; virtual void foo(Incomplete p) = 0; int a; }; struct B : virtual A { B(); ~B() override; void foo(Incomplete p) override; virtual void bar(); int b; }; struct C { C() {} virtual ~C() {} virtual void baz() = 0; int c; }; struct D : B, C { D(); ~D() override; void asdf() override {} //void foo(Incomplete p) override; void bar() override; void baz() override; int d; }; D::D() {} D::~D() {} //void D::foo(Incomplete p) {} void D::bar() {} void D::baz() {} $ bin/clang -cc1 -triple i386-pc-windows-msvc19.11.0 -emit-obj -finstrument-functions-after-inlining /tmp/a.cc musttail call must be precede a ret with an optional bitcast musttail call x86_thiscallcc void (%struct.B*, ...) bitcast (void ()* @"?foo@B@@UAEXUIncomplete@@@Z" to void (%struct.B*, ...)*)(%struct.B* %6, ...) fatal error: error in backend: Broken function found, compilation aborted!
,
Apr 6 2018
IR repro:
$ cat /tmp/a.ll
declare void @foo()
define void @bar() #0 {
musttail call void @foo()
ret void
}
attributes #0 = { "instrument-function-exit-inlined"="__cyg_profile_func_exit" }
$ bin/opt -passes="function(post-inline-ee-instrument)" -S /tmp/a.ll
musttail call must be precede a ret with an optional bitcast
musttail call void @foo()
LLVM ERROR: Broken module found, compilation aborted!
,
May 7 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by h...@chromium.org
, Apr 5 2018