SSA vs RTL
Ian Lance Taylor
Mon Apr 6 19:22:00 GMT 2009
charfi asma <firstname.lastname@example.org> writes:
> I am a newbie in GCC, and I am intersested in GCC optimization
> I can not find a simple example that explain why Constant propagation is more efficient in SSA form than in RTL form ?
> I knew that in SSA form, the algorithm is faster. but why ?
> Can so give me an example that explain why RTL do it slower ?
Please do not ask a new question by replying to a message on the mailing
list. Instead, send a new message. When you reply to a message, it
shows up in the wrong place for people using threaded e-mail readers.
Your question is really one about compiler theory, not one about gcc.
Constant propagation is faster when using SSA simply because each
variable is set only once, which means that you can very easily
determine whether a variable has a constant value. In RTL form each
pseudo-register can be set multiple times, so for each use of a
pseudo-register you have to determine the set of values which the
pseudo-register may hold at that time.
More information about the Gcc-help