Ian Lance Taylor - Re: Creating temporary variables (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] |
- From: Ian Lance Taylor
- To: VIbhav Garg
- Cc: gcc at gcc dot gnu dot org
- Date: 20 Nov 2005 19:36:32 -0800
- Subject: Re: Creating temporary variables
- References: <4380D7B8.1080603@yahoo.com>
VIbhav Garg vibhtech@yahoo.com writes:
I am working on some optimizations on the CFG. Can someone please give me some info on the following -
- For an gimple expression node, how do we determine the return type?
You can get the type of any gimple expression using TREE_TYPE.
- How do we create a temporary variable, and add it to the list of variables defined in the current function declaration?
create_tmp_var.
- Any particular code I can look at to see how it works.
grep for create_tmp_var.
- Any issues I should be aware of?
It kinds of depends on when during the compilation you are doing this. When in SSA form you probably need to do other stuff as well.
Ian
- Follow-Ups:
- Re: Creating temporary variables
* From: VIbhav Garg
- Re: Creating temporary variables
- References:
- Creating temporary variables
* From: VIbhav Garg
- Creating temporary variables
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |