[llvm-dev] [RFC] New diagnostic handler for llc
Diana Picus via llvm-dev
llvm-dev at lists.llvm.org
Thu May 12 05:20:12 PDT 2016
Hi all,
I'd like to add a new diagnostic handler to llc. Right now, llc
doesn't have one at all, and instead just exits after the first error
that it encounters. This is very different from the behaviour of clang
and other front ends, who try to report as many errors as possible
before exiting.
I think this is very important for testing LLVM's CodeGen in a more
robust fashion. For instance, PR24071, for which I have submitted a
patch recently [1], would've been uncovered by our current tests,
instead of being reported by a clang user through a .c file.
I've uploaded a sample patch for the new diagnostic handler on
Phabricator [2]. With this patch, we currently get 27 failures in
check-all. 9 of these are PR24071 and would be fixed by patch [1]. The
other 18 [3] seem to have pretty diverse causes and I don't know if I
could propose patches for all of them.
What would be a good way forward for this?
I was thinking about leaving the old behaviour, i.e. no diagnostic
handler, under a flag and running the remaining 18 failures with that
flag enabled. This would leave all bots green and help us write better
tests by default. Then we could progressively fix these bugs and get
rid of the flag. I know people here are a bit wary of such transitions
that could leave things in between. Is there a better option?
Thanks,
Diana
[1] http://reviews.llvm.org/D20156
[2] http://reviews.llvm.org/D20202 - Note that this isn't really a
review yet, I just thought it looks better there than as a plain
attachment.
[3] LLVM :: CodeGen/AMDGPU/call.ll
LLVM :: CodeGen/AMDGPU/dynamic_stackalloc.ll
LLVM :: CodeGen/AMDGPU/no-hsa-graphics-shaders.ll
LLVM :: CodeGen/AMDGPU/private-memory-broken.ll
LLVM :: CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
LLVM :: CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll
LLVM :: CodeGen/BPF/many_args1.ll
LLVM :: CodeGen/BPF/many_args2.ll
LLVM :: CodeGen/BPF/struct_ret1.ll
LLVM :: CodeGen/BPF/struct_ret2.ll
LLVM :: CodeGen/MIR/Generic/invalid-jump-table-kind.mir
LLVM :: CodeGen/MIR/Generic/llvm-ir-error-reported.mir
LLVM :: CodeGen/MIR/Generic/machine-function-missing-function.mir
LLVM :: CodeGen/MIR/Generic/machine-function-missing-name.mir
LLVM :: CodeGen/MIR/Generic/machine-function-redefinition-error.mir
LLVM :: CodeGen/MIR/X86/spill-slot-fixed-stack-object-aliased.mir
LLVM :: CodeGen/MIR/X86/spill-slot-fixed-stack-object-immutable.mir
LLVM :: CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
More information about the llvm-dev
mailing list