This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
MD file patterns and RTL templates
- From: "BHASKAR G. REDDY" <bhaskar at cse dot iitb dot ac dot in>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 27 Jan 2007 23:13:28 +0530 (IST)
- Subject: MD file patterns and RTL templates
Hi,
Is there any way to know, how a pattern in MD file is matched while
generating code?
I know that one of the debugging options "-dP" gives which RTL template is
matched against which md pattern and corresponding assembly instructions
generated.
But this way suggests exhaustive method of trying for all datatypes.
For example:
in i386.md file:
"*andsi_1* pattern is matched when you apply bitwise AND operation to
integer data types, and corresponding assembly instruction generated
is "andl".
"*andhi_1* pattern is matched when you apply bitwise AND operation to
SHORT integer data types, and corresponding assembly instruction
generated is "andw".
But there are numerous other patterns in this md file which also
generates and instruction when matched against RTL template.
I want to know is there any intuitive way to get around, so that one can
easily tell which pattern is matched is when?
--
Bhaskar G. Reddy,
Graduate Student,
Department of CSE,
IIT Bombay