Difference between revisions of "DebugLLVM"

From NaplesPU Documentation
Jump to: navigation, search
(Created page with "LLVM is provided with a debug infrastructure. If you want to debug the compiler, you only need to build LLVM and Clang in debug mode. == Typical errors == === Cannot select...")
 
(Cannot select)
Line 4: Line 4:
  
 
=== Cannot select ===
 
=== Cannot select ===
 +
<syntaxhighlight lang="c" line='line'>
 
fatal error: error in backend: Cannot select:  
 
fatal error: error in backend: Cannot select:  
 
...
 
...
Line 10: Line 11:
 
In function: function name
 
In function: function name
 
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to see invocation)
 
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to see invocation)
 
+
</syntaxhighlight>
 
This error occurs when the backend lacks a rule to perform the instruction selection of a certain SelectionDAG node.  
 
This error occurs when the backend lacks a rule to perform the instruction selection of a certain SelectionDAG node.  
 
In such a case, you have a look at the [[NuPlusInstrFormats.td | NuPlusInstrFormats.td]], [[NuPlusInstrInfo.td | NuPlusInstrInfo.td]] and [[NuPlusISelLowering.cpp | NuPlusISelLowering.cpp]] files to understand why this node cannot be lowered.
 
In such a case, you have a look at the [[NuPlusInstrFormats.td | NuPlusInstrFormats.td]], [[NuPlusInstrInfo.td | NuPlusInstrInfo.td]] and [[NuPlusISelLowering.cpp | NuPlusISelLowering.cpp]] files to understand why this node cannot be lowered.

Revision as of 19:29, 8 June 2018

LLVM is provided with a debug infrastructure. If you want to debug the compiler, you only need to build LLVM and Clang in debug mode.

Typical errors

Cannot select

fatal error: error in backend: Cannot select: 
	...
	...
	...
In function: function name
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to see invocation)

This error occurs when the backend lacks a rule to perform the instruction selection of a certain SelectionDAG node. In such a case, you have a look at the NuPlusInstrFormats.td, NuPlusInstrInfo.td and NuPlusISelLowering.cpp files to understand why this node cannot be lowered.