This is an experimental debug location verifier that ensures the following condition: If an instruction has a source location, then all occurrences of each operand's source location must dominate this instruction or be in the same BB as the instruction.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
For example:
... o -MF lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o.d -o lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o -c /Volumes/Data/llvm-project/llvm/lib/Demangle/ItaniumDemangle.cpp Occurence of source location from an operand does not dominate instruction. br label %cond.end26, !dbg !2571 !2571 = !DILocation(line: 355, column: 10, scope: !2491) %cond = phi i8* [ %21, %cond.true24 ], [ null, %cond.false25 ], !dbg !2571
Comment Actions
Yes, triggers a similar error in debug mode:
lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o -c /Volumes/Data/llvm-project/llvm/lib/Support/CommandLine.cpp Occurence of source location from an operand does not dominate instruction. %25 = phi i1 [ false, %while.cond12 ], [ %lnot17, %land.rhs14 ], !dbg !18832 !18832 = !DILocation(line: 0, scope: !18830) %16 = phi i1 [ false, %while.cond ], [ %call5, %land.rhs3 ], !dbg !18832
Ah! I got to remove line: 0 locations.
Comment Actions
Ignore line 0.
Now:
ttyStackTrace.cpp.o -c /Volumes/Data/llvm-project/llvm/lib/Support/PrettyStackTrace.cpp Occurence of source location from an operand does not dominate instruction. br label %cond.end, !dbg !2018 !2018 = !DILocation(line: 107, column: 29, scope: !2010) %cond = phi i64 [ %call, %cond.true ], [ 0, %cond.false ], !dbg !2018 fatal error: error in backend: Broken module found, compilation aborted!
s/all occurrences/the first occurrence in any block/? Or do we mean to check the 'all' condition?