[llvm-commits] [llvm] r122801 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Jan 3 21:29:12 PST 2011


On Jan 3, 2011, at 8:43 PM, Cameron Zwarich wrote:

> Author: zwarich
> Date: Mon Jan  3 22:43:31 2011
> New Revision: 122801
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=122801&view=rev
> Log:
> Avoid finding loop back edges when we are not splitting critical edges in
> CodeGenPrepare (which is the default behavior).

Thanks, Cameron.

I noticed that there are a number of local DenseMap instances as well. It may be worthwhile to promote them to class members to avoid repeated allocations.

  DenseMap<Value*, Value*> SunkAddrs;
  DenseMap<BasicBlock*, Instruction*> InsertedTruncs;

These two are in static functions that would have to be promoted to methods:

  DenseMap<BasicBlock*, CastInst*> InsertedCasts;
  DenseMap<BasicBlock*, CmpInst*> InsertedCmps;

It seems like a good idea to avoid allocating and freeing a DenseMap for every bitcast and cmp instruction. 403.gcc has 157000 of those.

Is the fix-point loop in CodeGenPrepare still necessary? When critical edge splitting is disabled?

/jakob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110103/688f17e3/attachment.bin>


More information about the llvm-commits mailing list