Page MenuHomePhabricator

hjooybar2 (mohammad hadi jooybar)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 16 2021, 9:06 AM (8 w, 3 h)

Recent Activity

Tue, Mar 16

hjooybar2 updated the diff for D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.
Tue, Mar 16, 1:19 PM · Restricted Project

Mon, Mar 15

hjooybar2 added a comment to D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.

@nikic As you said, as soon as the GEPs are being updated to simple arithmetic operations, PHI Translation would never be confused by GEP polymorphs. So this changeset along with this whole instruction-combining is going to be out of the picture. But still, for up until that point, I would suggest to fix this unprofitable instCombine

Mon, Mar 15, 11:12 AM · Restricted Project

Mar 9 2021

hjooybar2 added a comment to D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.

@lebedev.ri
There is nothing wrong with phi translation and MemoryDependencyAnalysis to fix. This changeset is not introducing a new InstCombine to fix an issue in other passes. Current implementation of InstCombine is carelessly (without doing necessary checks) combine instructions. This changeset merely prevent some of these unprofitable combines. It doesn't make sense to change other passes when the instCombine itself is introducing the problem. Even without considering MemoryDependencyAnalysis there is no benefit in combining bitcast and gep in the testcase I added. This fusion will create a GEP that uses pure byte index instead of element index in a struct.

Mar 9 2021, 1:54 PM · Restricted Project
hjooybar2 added a comment to D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.

@nikic By making a little modification in my changeset, now none of existing tests are failing. I added a new test to show how the code is supposed to look like.

Mar 9 2021, 1:37 PM · Restricted Project
hjooybar2 updated the diff for D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.
Mar 9 2021, 1:23 PM · Restricted Project

Feb 22 2021

hjooybar2 updated the diff for D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.

I have updated my implementation base on reviewer's comments. The only reason that I had used void* pointer detection instead of Alloc like function was to cover more cases. However, since using pointer size in optimization passes are prohibited, I changed the implementation back to Alloc like function

Feb 22 2021, 12:43 PM · Restricted Project

Feb 17 2021

hjooybar2 requested review of D96881: [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions.
Feb 17 2021, 10:46 AM · Restricted Project