Showing posts with label #debug. Show all posts
Showing posts with label #debug. Show all posts

Tuesday, November 16, 2021

gnutools-gcc: dump switch

 #gcc #debugging 

details appended to fdump-rtl-pass generates messages during RTL transformations for the pass
for example:
-fdump-rtl-expand-details
produces gimple inline with its matching RTL, as well as messages on optimizations happening during expand pass.
output:

;; Generating RTL for gimple basic block 2


;; moveTo_state = 0;


(insn 10 9 0 (set (mem/c:SI (symbol_ref:SI ("|bss|moveTo_state") [flags 0x6] <var_decl 0x10382c630 moveTo_state>) [1 moveTo_state+0 S4 A32])

(const_int 0 [0])) "../library/PcCut/pccut.c":287 -1

(nil))

if some optimization doesn't react to adding details check if the pass uses TDF_DETAILS 
TDF_DETAILS is implemented in dumpfile.c


gnutools: learning resources

I have been working on GNU toolchain for about two years now.  I have worked on target ports, code upgrades, feature development and bug fixes in a target backend.

GCC has an internal document, gccint, but much of it is kept very high level.  

Developers can learn through seeing the results of an optimization, to assist a list of optimization switches and their description is provided, GCC developer-options.

In this space I intend to expand on these resources.

The information here is to augment the already in place resources highlighter above.