This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

[patch] Add option to compute "reaching and live definitions"


Hello,

The attached patch adds a DF changeable flag to compute a subset of
reaching definitions that are also live at the program points they
reach. This is an idea I discussed with Paolo many years ago already,
but until today it hadn't really ever been close to the top of my todo
list, but trying to compile the test case for PR54146 with -fweb
finally changed that :-)

The idea is to prune the DF_RD_OUT set of each basic block by
registers live in DF_LR_OUT. I've implemented this pruning with the
same approach as the sparse formulation of RD dataflow, expanding the
regs in DF_LR_OUT to the corresponding set of DEFs and using that set
to mask out dead DEFs in DF_RD_OUT. This is a convenient formulation
because DF_LR is already expressed in terms of regnos (like
sparse_kill & friends), and the formulation also works fine for the
dense formulation, of course.

The effect on compile time for a set of cc1-i files is negligible (not
measurable, anyway), but for crazy large test cases like PR54146 this
patch is the difference between triggering out-of-memory or completing
the pass (at least -fweb, probably also the other affected passes).

Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?

Ciao!
Steven

Attachment: df_rd_pruned.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]