Skip to content
Snippets Groups Projects
Commit e57d3cce authored by Andre Vieira's avatar Andre Vieira
Browse files

rtl: Enable the use of rtx values with int and mode attributes

The 'code' part of a 'define_code_attr' refers to the type of the key, in other
words, it uses a code_iterator to pick the 'value' from their (key "value") pair
list.

However, rtx_alloc_for_name requires a code_attribute to be used when the
'value' needs to be a type. In other words, no other type of attributes could be
used, before this patch, to produce a rtx typed 'value'.

This patch removes that restriction and allows the backend to use any kind of
attribute as long as that attribute always produces a valid code typed 'value'.

gcc/ChangeLog:

	* read-rtl.cc (rtx_reader::rtx_alloc_for_name): Allow all attribute
	types to produce code 'values'.
	(check_code_attribute): Rename ...
	(check_attribute_codes): ... to this.  And change comments to refer to
	* doc/md.texi: Add paragraph to document that you can use int and mode
	attributes to produce codes.
parent 71059d26
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment