Skip to content

[loopsimplify] Many pointless phi nodes are created #559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lattner opened this issue Dec 16, 2003 · 3 comments
Closed

[loopsimplify] Many pointless phi nodes are created #559

lattner opened this issue Dec 16, 2003 · 3 comments
Assignees

Comments

@lattner
Copy link
Collaborator

lattner commented Dec 16, 2003

Bugzilla Link 187
Resolution FIXED
Resolved on Mar 06, 2010 14:00
Version 1.0
OS All

Extended Description

In .general_ci_points_4 function of 177.mesa, for example, the following
preheader block is created by the loop simplify pass:

no_exit.0.preheader:
%iy.2.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1
]
%ix.4.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1
]
%y1.1.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1
]
%y0.1.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1
]
%x1.1.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1
]
%x0.1.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1
]
%z.0.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1 ]

%y.0.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1 ]

%x.0.ph = phi int [ 0, %cond_true.0 ], [ 0, %cond_true.1 ], [ 0, %cond_false.1 ]

This is a common occurance, so the loop simplify pass should try a bit harder to
clean things up for subsequent loop optimization passes.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Dec 16, 2003

assigned to @lattner

@lattner
Copy link
Collaborator Author

lattner commented Dec 16, 2003

This should be easy to fix, I just didn't want to forget about it.

-Chris

@lattner
Copy link
Collaborator Author

lattner commented Dec 19, 2003

This problem is fixed like so:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010354.html

Many fewer PHI nodes are created and inserted. I feel much better now. :)

-Chris

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 1, 2021
xlauko pushed a commit to trailofbits/instafix-llvm that referenced this issue Mar 28, 2025
This commit extends the support for floating point attributes parsing by
using
the new `AsmParser::parseFloat(fltSemnatics, APFloat&)` interface.
As a drive-by, this commit also harmonizes the cir.fp print/parse
namespace
usage, and adds the constraint of supporting only "CIRFPType"s for
cir.fp in
tablegen instead of verifying it manually in the parsing logic.

---

This commit is based on top of a to-be-upstreamed commit which extends
the upstream MLIR float type parsing. Upstream parsing of float type has
full capability only through parsing the Builtin Dialect's `FloatAttr`.
Thos commit exposes the same capabilities to downstream users.

---

This PR should resolve (at least) `GCC-C-execute-ieee-fp-cmp-2` and
`GCC-C-execute-ieee-fp-cmp-4`, paving the way to other
`GCC-C-execute-ieee-*` tests passing from the SingleSource suite. It
resolves llvm#559 .
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant