cfghooks: Remove Name Field from cfg_hooks Structure
The `name` field has been removed from the `cfg_hooks` structure, as it's no longer needed with the introduction of the IR field.
The name field in the cfg_hooks structure has been removed, as its primary use was for internal errors. With the introduction of the IR field, the name field became redundant. This change simplifies the cfg_hooks structure and centralizes IR-related information, making error reporting more consistent.
In Details
This commit removes the name field from struct cfg_hooks in cfghooks.h, which previously stored a string name, relying instead on the IR (ir_type) field. The name field was mainly used for internal error messages in functions like dump_bb_for_graph. Now, current_ir_name is used. Affected files include cfghooks.cc, cfgrtl.cc, and tree-cfg.cc.
For Context
The control flow graph (CFG) is a representation of a program's execution paths. cfg_hooks allows customization of CFG construction and manipulation. This commit cleans up the internal structure of cfg_hooks by removing the name field, which identified the current intermediate representation (IR). The IR is now directly accessible, so the name field is no longer needed, simplifying the code.