Missing passes

Hi,

I was evaluating all transformation passes and noticed a few things. In
particular, I found three passes in the documentation that I can't seem to
find any code for. Where these removed?
  Lower GC intrinsics, for GCless code generators (-lowergc)
  Correlated Expression Elimination (-cee)
  Lower select instructions to branches (-lowerselect)

Additionally, I found the following passes for which no documentation was
present:
  createGVExtractionPass()
  createStructRetPromotionPass()
  createStripDeadPrototypesPass()
  createJumpThreadingPass()
  createMemCpyOptPass()
  createLoopDeletionPass()
  createCodeGenPreparePass()

From what I saw in Passes.html, the passes documentation is not generated
automatically? What's the policy on updating this documentation?

Gr.

Matthijs

I was evaluating all transformation passes and noticed a few things. In particular, I found three passes in the documentation that I can't seem to find any code for. Where these removed?
  Lower GC intrinsics, for GCless code generators (-lowergc)

Yes; this pass at least has been removed.

  Correlated Expression Elimination (-cee)
  Lower select instructions to branches (-lowerselect)

Additionally, I found the following passes for which no documentation was present:
createGVExtractionPass()
  createStructRetPromotionPass()
  createStripDeadPrototypesPass()
  createJumpThreadingPass()
  createMemCpyOptPass()
  createLoopDeletionPass()
  createCodeGenPreparePass()

From what I saw in Passes.html, the passes documentation is not generated automatically?

It is not, although I think there's a 'one-liner' to help with updating it.

What's the policy on updating this documentation?

It hasn't been updated since I completed it several months ago, AFAIK. Please submit a patch if you like.

— Gordon

These two were also removed.

Dan

These two were also removed.

I'll whip up a patch in the morning.

Gr.

Matthijs

Hi all,

I've attached two patches. The first, pass-comments.diff adds or improves the
file comments for a number of passes. This patch is slightly interesting. The
second, pass-doc.diff is mostly a yank-put job and updates Passes.html as
follows.

I've removed the following passes from the documentation:

  Lower GC intrinsics, for GCless code generators (-lowergc)
  Correlated Expression Elimination (-cee)
  Lower select instructions to branches (-lowerselect)
  lowers packed operations to operations on smaller packed datatypes (-lower-packed)

(I didn't report the last one in my initial posting, though I had noticed it
was missing).

I've added the following passes to the documentation:

  createStructRetPromotionPass()
  createStripDeadPrototypesPass()
  createJumpThreadingPass()
  createMemCpyOptPass()
  createLoopDeletionPass()
  createCodeGenPreparePass()

I've left out the Global Value Extraction Pass, since that doesn't seem to be
a full pass in itself (no RegisterPass for example).

I've also pulled Passes.html through the w3 validator, only to discover some
errors of my own :slight_smile:

Gr.

Matthijs

pass-comments.diff (6 KB)

pass-doc.diff (12.5 KB)

Thanks, applied!

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080505/062161.html

The passes for which you updated the comments are primarily written by:

Chris: lib/Transforms/IPO/StripDeadPrototypes.cpp
Devang: lib/Transforms/IPO/StructRetPromotion.cpp
Chris: lib/Transforms/Scalar/CodeGenPrepare.cpp
Chris/Evan: lib/Transforms/Scalar/JumpThreading.cpp
Chris: lib/Transforms/Scalar/LoopDeletion.cpp

Who should probably review the added comments for accuracy.

— Gordon

Chris: lib/Transforms/IPO/StripDeadPrototypes.cpp
Devang: lib/Transforms/IPO/StructRetPromotion.cpp
Chris: lib/Transforms/Scalar/CodeGenPrepare.cpp
Chris/Evan: lib/Transforms/Scalar/JumpThreading.cpp
Chris: lib/Transforms/Scalar/LoopDeletion.cpp

I responded to the commit too, but I'm concerned about where the comments were moved to in the JumpThreading class. I don't think doxygen will pick them up now. I'd prefer they stayed where they were if thats the case.

-Tanya

StructRetPromotion.cpp comment t is appropriate.
Thanks!