Page MenuHomePhabricator

okura (Shinji Okumura)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 11 2020, 1:14 AM (32 w, 5 h)

Recent Activity

Sep 2 2020

okura committed rG5d1347957454: [Attributor] Make use of AANoUndef in AAUndefinedBehavior (authored by okura).
[Attributor] Make use of AANoUndef in AAUndefinedBehavior
Sep 2 2020, 12:12 AM
okura closed D86984: [Attributor] Make use of AANoUndef in AAUndefinedBehavior.
Sep 2 2020, 12:12 AM · Restricted Project
okura committed rG7558e9e5a2a9: [Attributor] Fix AANoUndef initialization (authored by okura).
[Attributor] Fix AANoUndef initialization
Sep 2 2020, 12:07 AM
okura closed D86983: [Attributor] Fix AANoUndef initialization.
Sep 2 2020, 12:07 AM · Restricted Project

Sep 1 2020

okura added inline comments to D86983: [Attributor] Fix AANoUndef initialization.
Sep 1 2020, 10:52 PM · Restricted Project
okura updated the diff for D86984: [Attributor] Make use of AANoUndef in AAUndefinedBehavior.

minor change

Sep 1 2020, 3:37 PM · Restricted Project
okura requested review of D86984: [Attributor] Make use of AANoUndef in AAUndefinedBehavior.
Sep 1 2020, 3:35 PM · Restricted Project
okura requested review of D86983: [Attributor] Fix AANoUndef initialization.
Sep 1 2020, 3:27 PM · Restricted Project

Aug 29 2020

okura committed rGa7ca9e09bd10: [Attributor] Fix callsite check in AAUndefinedBehavior (authored by okura).
[Attributor] Fix callsite check in AAUndefinedBehavior
Aug 29 2020, 9:21 PM
okura closed D86845: [Attributor] Fix callsite check in AAUndefinedBehavior.
Aug 29 2020, 9:21 PM · Restricted Project
okura updated the diff for D86845: [Attributor] Fix callsite check in AAUndefinedBehavior.

address comment

Aug 29 2020, 9:15 PM · Restricted Project
okura committed rG7082381735e7: [Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl (authored by okura).
[Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl
Aug 29 2020, 8:39 PM
okura closed D86842: [Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl.
Aug 29 2020, 8:39 PM · Restricted Project
okura updated the diff for D86845: [Attributor] Fix callsite check in AAUndefinedBehavior.

add test

Aug 29 2020, 8:33 PM · Restricted Project
okura updated the diff for D86845: [Attributor] Fix callsite check in AAUndefinedBehavior.

delete unnecessary brackets

Aug 29 2020, 7:19 PM · Restricted Project
okura requested review of D86845: [Attributor] Fix callsite check in AAUndefinedBehavior.
Aug 29 2020, 7:13 PM · Restricted Project
okura added inline comments to D86842: [Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl.
Aug 29 2020, 6:15 PM · Restricted Project
okura updated the diff for D86842: [Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl.
  • fix dependence
  • fix formatting
Aug 29 2020, 6:12 PM · Restricted Project
okura requested review of D86842: [Attributor][NFC] Fix dependency type in AAUndefinedBehaviorImpl::updateImpl.
Aug 29 2020, 2:04 PM · Restricted Project
okura committed rG7a15dfd0565c: [Attributor] Fix AANoUndef identification (authored by okura).
[Attributor] Fix AANoUndef identification
Aug 29 2020, 1:41 PM
okura closed D86737: [Attributor] Fix AANoUndef identification.
Aug 29 2020, 1:40 PM · Restricted Project
okura updated the diff for D86737: [Attributor] Fix AANoUndef identification.

fix OpenMP/parallel_deletion.ll

Aug 29 2020, 1:33 PM · Restricted Project
okura updated the diff for D86737: [Attributor] Fix AANoUndef identification.

Rebase

Aug 29 2020, 12:20 PM · Restricted Project
okura committed rG1364d856f4bf: [Attributor][NFC] Do not manifest noundef for positions to be changed to undef (authored by okura).
[Attributor][NFC] Do not manifest noundef for positions to be changed to undef
Aug 29 2020, 11:50 AM
okura closed D86835: [Attributor][NFC] Do not manifest noundef for positions to be changed to undef.
Aug 29 2020, 11:50 AM · Restricted Project
okura updated the diff for D86737: [Attributor] Fix AANoUndef identification.

Reflect change in D86835

Aug 29 2020, 11:22 AM · Restricted Project
okura added inline comments to D86737: [Attributor] Fix AANoUndef identification.
Aug 29 2020, 3:01 AM · Restricted Project
okura requested review of D86835: [Attributor][NFC] Do not manifest noundef for positions to be changed to undef.
Aug 29 2020, 2:48 AM · Restricted Project
okura added inline comments to D86737: [Attributor] Fix AANoUndef identification.
Aug 29 2020, 2:32 AM · Restricted Project

Aug 27 2020

okura requested review of D86737: [Attributor] Fix AANoUndef identification.
Aug 27 2020, 2:15 PM · Restricted Project
okura abandoned D86396: [Attributor] Change AANoUndef not to deduce noundef for dead returned positions.
Aug 27 2020, 2:04 PM · Restricted Project
okura committed rG50ebd1afa9d7: [Attributor] Do not manifest noundef for dead positions (authored by okura).
[Attributor] Do not manifest noundef for dead positions
Aug 27 2020, 2:02 PM
okura closed D86565: [Attributor] Do not manifest noundef for dead positions.
Aug 27 2020, 2:02 PM · Restricted Project
okura updated the diff for D86565: [Attributor] Do not manifest noundef for dead positions.

Delete AAIsDead query before manifestation because other patches (D86635, D86734) make it possible to query new AAs in manifest.

Aug 27 2020, 1:28 PM · Restricted Project
okura committed rG58d257b2904b: [Attributor] Do not add AA to dependency graph after the update stage (authored by okura).
[Attributor] Do not add AA to dependency graph after the update stage
Aug 27 2020, 1:18 PM
okura closed D86734: [Attributor] Do not add AA to dependency graph after the update stage.
Aug 27 2020, 1:18 PM · Restricted Project
okura added a comment to D86734: [Attributor] Do not add AA to dependency graph after the update stage.

This is accepted, I'll go with this.

Aug 27 2020, 1:14 PM · Restricted Project
okura added a comment to D86734: [Attributor] Do not add AA to dependency graph after the update stage.

Another way to achieve the same goal is to remove the assertion in manifestAttributes.
I'm not sure which is better.

Aug 27 2020, 1:11 PM · Restricted Project
okura requested review of D86734: [Attributor] Do not add AA to dependency graph after the update stage.
Aug 27 2020, 1:07 PM · Restricted Project
okura committed rGc5e6872ec6e5: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage (authored by okura).
[Attributor] Guarantee getAAFor not to update AA in the manifestation stage
Aug 27 2020, 12:10 PM
okura closed D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
Aug 27 2020, 12:09 PM · Restricted Project
okura updated the diff for D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
  • delete debug print
  • add a comment
Aug 27 2020, 11:05 AM · Restricted Project
okura added inline comments to D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
Aug 27 2020, 11:00 AM · Restricted Project
okura added inline comments to D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
Aug 27 2020, 10:33 AM · Restricted Project
okura retitled D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage from [Attributor] Add getter of abstract attributes for the manifestation stage to [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
Aug 27 2020, 10:18 AM · Restricted Project
okura updated the diff for D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
  • make use of the phase flag
Aug 27 2020, 10:14 AM · Restricted Project
okura committed rG7a68f0f1e00b: [Attributor] Add a phase flag to Attributor (authored by okura).
[Attributor] Add a phase flag to Attributor
Aug 27 2020, 9:27 AM
okura closed D86678: [Attributor] Add a phase flag to Attributor.
Aug 27 2020, 9:27 AM · Restricted Project
okura updated the diff for D86678: [Attributor] Add a phase flag to Attributor.
  • use scoped enum
  • move status change into Attributor::run
Aug 27 2020, 1:15 AM · Restricted Project
okura added a comment to D86678: [Attributor] Add a phase flag to Attributor.

Thank you for creating this. I was thinking of something like this rather than having multiple flags.
In D86587 I iterate on functions multiple times and I delete AAs early after manifesting them.
(Manifest happens multiple times).
I think most of the state change should happen in the ::run function.

Aug 27 2020, 12:51 AM · Restricted Project
okura committed rG6c25eca6142c: [Attributor] Add flag for undef value to the state of AAPotentialValues (authored by okura).
[Attributor] Add flag for undef value to the state of AAPotentialValues
Aug 27 2020, 12:46 AM
okura closed D85592: [Attributor] Add flag for undef value to the state of AAPotentialValues.
Aug 27 2020, 12:46 AM · Restricted Project
okura added a comment to D86678: [Attributor] Add a phase flag to Attributor.

Patch is missing description.

Aug 27 2020, 12:38 AM · Restricted Project
okura updated the summary of D86678: [Attributor] Add a phase flag to Attributor.
Aug 27 2020, 12:37 AM · Restricted Project
okura updated the diff for D85592: [Attributor] Add flag for undef value to the state of AAPotentialValues.
  • fix initialization at callsite argument position (value-simplify.ll is affected)
  • add tests
Aug 27 2020, 12:28 AM · Restricted Project

Aug 26 2020

okura requested review of D86678: [Attributor] Add a phase flag to Attributor.
Aug 26 2020, 10:27 PM · Restricted Project
okura added a comment to D85592: [Attributor] Add flag for undef value to the state of AAPotentialValues.

What happens if you have something like

int foo(int c0, int c1, int c2, int c3) {
   int undef;
   int x0 = c0 ? 0 : 1;
   int x1 = c1 ? x0 : undef;
   int y2 = c2 ? 0 : 7;
   int z3 = c3 ? x1 : y2;
   return z3 < 7;
}

int bar(int c0, int c1 ) {
   int undef;
   int x0 = c0 ? 0 : 1;
   int x1 = c1 ? x0 : undef;
   return x1 == 7;
}
int bar(int c0, int c1 ) {
   int undef;
   int x0 = c0 ? 0 : undef;
   int x1 = c1 ? x0 : 1;
   return x1 == 7;
}
Aug 26 2020, 1:15 PM · Restricted Project
okura added a comment to D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.

I think rather than creating a new api function, it would be more robust if we had a flag as member of the attributor.
It would be similar to SeedingPeriod flag that I have added.

Simply we would make it true in the Attributor::manifestAttributes function and then we would have a assertion in Attributor::updateAA

Thank you for the suggestion. I'm thinking about the same approach. I totally agree with @kuter. It is slightly hard for us to guarantee Attributor not to update AAs during manifestation by adding a new API.
Adding a flag that indicates which stage of the process (e.g. the update stage or the manifestation stage) we are in is better, I think.
@jdoerfert How do you think about this?

Aug 26 2020, 12:52 PM · Restricted Project
okura added a comment to D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.

Some AAs use checkForAll... in manifest, and getAAFor is used in the function.
I think we need to add a new parameter like bool DuringManifest to them in a follow-up.

Aug 26 2020, 10:50 AM · Restricted Project
okura updated the diff for D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
  • rename getter getAADuringManifestFor
  • replace some existing getAAFor in manifest with this
Aug 26 2020, 10:40 AM · Restricted Project
okura added inline comments to D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
Aug 26 2020, 10:01 AM · Restricted Project
okura added a comment to D86565: [Attributor] Do not manifest noundef for dead positions.

Are you going to move the AAIsDead query to the update?

No, I'm going to allow to query (initialize) new AA in the manifestation stage. That will save us from querying AAIsDead before the manifestation stage.

Aug 26 2020, 9:13 AM · Restricted Project
okura requested review of D86635: [Attributor] Guarantee getAAFor not to update AA in the manifestation stage.
Aug 26 2020, 9:09 AM · Restricted Project
okura added a comment to D86565: [Attributor] Do not manifest noundef for dead positions.

Are you going to move the AAIsDead query to the update?

Aug 26 2020, 7:14 AM · Restricted Project
okura added a comment to D86396: [Attributor] Change AANoUndef not to deduce noundef for dead returned positions.

When I fix the identification of AANoUndef in identifyDefaultAbstractAttributes, I noticed that noundef should not be deduced for dead argument and dead call site argument position too. (I found wrong transformation in e.g. callbacks.ll)
Not to deduce for dead positions, we should not indicate optimistic fixpoint in initialize because once fixpoint is indicated we cannot change the state. However, it weakens the deduction significantly.
So I want to suggest that we check not only noundef but also liveness in AAUndefinedBehavior.

I don't understand the comment.
Should we check in the manifest of AANoUndef if the position is dead and not manifest it?

I investigated the problem seen in the module slice patch again. And I realize now that checking liveness in manifestation is sufficient to settle the problem.
I misunderstood we need more things to do so. I was overthinking, sorry.

Aug 26 2020, 6:10 AM · Restricted Project
okura abandoned D86018: [Attributor] fix AAValueConstantRange and IntegerRangeState implementation.

This was split into some patches.

Aug 26 2020, 3:41 AM · Restricted Project
okura retitled D86565: [Attributor] Do not manifest noundef for dead positions from [Attributor][FIX] Do not deduce noundef for dead positions to [Attributor] Do not manifest noundef for dead positions.
Aug 26 2020, 3:17 AM · Restricted Project
okura committed rG30507137986a: [Attributor] Provide an edge-based interface in AAIsDead (authored by okura).
[Attributor] Provide an edge-based interface in AAIsDead
Aug 26 2020, 1:13 AM
okura closed D85547: [Attributor] Provide an edge-based interface in AAIsDead.
Aug 26 2020, 1:13 AM · Restricted Project
okura updated the diff for D84665: [Attributor][WIP] Implement AAReachability.

address comments

Aug 26 2020, 12:55 AM · Restricted Project

Aug 25 2020

okura added inline comments to D84665: [Attributor][WIP] Implement AAReachability.
Aug 25 2020, 11:27 PM · Restricted Project
okura updated the diff for D85547: [Attributor] Provide an edge-based interface in AAIsDead.
  • fix nit
Aug 25 2020, 3:52 PM · Restricted Project
okura added a comment to D86565: [Attributor] Do not manifest noundef for dead positions.

LGTM, one minor note. The test will be part of the module slice patch, I'm fairly certain this cannot be tested right now but it makes sense.

Sorry, I was wrong. CheckBBLivenessOnly should be false because if it is true we cannot catch the assumed liveness of e.g. returned position.
When I changed it to true, a new AAIsDead was registered in manifestation, and segfault happened. So I register them in initialize.

Don't do that but query them in the update instead.

I have difficulty in doing that because segfault happens when a fixpoint is indicated in initialize and updateImpl is not called even once.

TBH, I think we need to remove the assertion that you see (it should not be a segfault). And replace it with code that causes a pessimistic fixpoint for all attributes created after we are done with the update stage. They can initialize but that is it.

Aug 25 2020, 3:44 PM · Restricted Project
okura added a comment to D86565: [Attributor] Do not manifest noundef for dead positions.

LGTM, one minor note. The test will be part of the module slice patch, I'm fairly certain this cannot be tested right now but it makes sense.

Sorry, I was wrong. CheckBBLivenessOnly should be false because if it is true we cannot catch the assumed liveness of e.g. returned position.
When I changed it to true, a new AAIsDead was registered in manifestation, and segfault happened. So I register them in initialize.

Don't do that but query them in the update instead.

I have difficulty in doing that because segfault happens when a fixpoint is indicated in initialize and updateImpl is not called even once.

Aug 25 2020, 3:32 PM · Restricted Project
okura updated the diff for D86565: [Attributor] Do not manifest noundef for dead positions.
  • change CheckBBLivenessOnly to true
  • add affected tests
  • add new tests
Aug 25 2020, 2:44 PM · Restricted Project
okura added a comment to D86565: [Attributor] Do not manifest noundef for dead positions.

LGTM, one minor note. The test will be part of the module slice patch, I'm fairly certain this cannot be tested right now but it makes sense.

Aug 25 2020, 2:42 PM · Restricted Project
okura requested review of D86565: [Attributor] Do not manifest noundef for dead positions.
Aug 25 2020, 11:55 AM · Restricted Project
okura added a comment to D86396: [Attributor] Change AANoUndef not to deduce noundef for dead returned positions.

When I fix the identification of AANoUndef in identifyDefaultAbstractAttributes, I noticed that noundef should not be deduced for dead argument and dead call site argument position too. (I found wrong transformation in e.g. callbacks.ll)
Not to deduce for dead positions, we should not indicate optimistic fixpoint in initialize because once fixpoint is indicated we cannot change the state. However, it weakens the deduction significantly.
So I want to suggest that we check not only noundef but also liveness in AAUndefinedBehavior.

Aug 25 2020, 10:13 AM · Restricted Project
okura committed rG05390440a225: [Attributor][NFC] Clang format (authored by okura).
[Attributor][NFC] Clang format
Aug 25 2020, 3:33 AM

Aug 24 2020

okura added a comment to D85592: [Attributor] Add flag for undef value to the state of AAPotentialValues.

I am not sure if the following scenario is possible, but if it is it might be problematic when undef is unified with multiple values. E.g. we found that we have the following potential values 0, 1, undef. If we now assume this is 0, 1, we might simplify and %x, 3 to %x. But that is wrong, if %x is undef. Note that simplifications that result in a constant should be fine either way. As I said, not sure if the potential values could be used like that (possibly in the future).

It doesn't seem to be a problem now. Two results from the IRC discussion:

  1. We need a test for the above situation, to make sure we don't regress this.
  2. We should make sure when we merge the possible values with undef properly, e.g., if you intersect two sets of possible values {0,1,undef} and {0, 7} then we should get {0, 7}.

I'm not sure we have to take care of intersection. Currently, there is PotentialValueState::intersectWith but is not used anywhere. I am not able to come up with a case we need it, and I think it should be deleted.

Aug 24 2020, 3:16 PM · Restricted Project
okura updated the diff for D84665: [Attributor][WIP] Implement AAReachability.
  • fix according to interface change
Aug 24 2020, 2:31 PM · Restricted Project
okura updated the diff for D85547: [Attributor] Provide an edge-based interface in AAIsDead.
  • change whole interface
Aug 24 2020, 2:19 PM · Restricted Project
okura added inline comments to D86349: [Attributor] Fix IntegerRangeState::unionKnown.
Aug 24 2020, 6:25 AM · Restricted Project

Aug 22 2020

okura added inline comments to D86319: [Attributor] Introduce module slice..
Aug 22 2020, 5:31 AM · Restricted Project
okura requested review of D86396: [Attributor] Change AANoUndef not to deduce noundef for dead returned positions.
Aug 22 2020, 5:27 AM · Restricted Project

Aug 21 2020

okura committed rGe21a22a7a8b7: [Attributor] fix AANoUndef initialization (authored by okura).
[Attributor] fix AANoUndef initialization
Aug 21 2020, 1:21 PM
okura closed D86361: [Attributor] fix AANoUndef initialization.
Aug 21 2020, 1:21 PM · Restricted Project
okura updated the diff for D86361: [Attributor] fix AANoUndef initialization.
  • delete unnecessary format change
Aug 21 2020, 12:52 PM · Restricted Project
okura updated the diff for D86361: [Attributor] fix AANoUndef initialization.
  • change to check IR position
Aug 21 2020, 12:20 PM · Restricted Project
okura requested review of D86361: [Attributor] fix AANoUndef initialization.
Aug 21 2020, 11:16 AM · Restricted Project
okura added inline comments to D86349: [Attributor] Fix IntegerRangeState::unionKnown.
Aug 21 2020, 6:30 AM · Restricted Project
okura requested review of D86349: [Attributor] Fix IntegerRangeState::unionKnown.
Aug 21 2020, 6:28 AM · Restricted Project

Aug 20 2020

okura committed rG835cfa5defb4: [Attributor] Handle CallBase case in AAValueConstantRange::initialize (authored by okura).
[Attributor] Handle CallBase case in AAValueConstantRange::initialize
Aug 20 2020, 4:16 AM
okura closed D86196: [Attributor] Handle CallBase case in AAValueConstantRange::initialize.
Aug 20 2020, 4:16 AM · Restricted Project

Aug 19 2020

okura added a comment to D86145: [Attributor] Simplify comparison against constant null pointer.

I think the logic is correct too and we need comments for this.
IMHO, putting the conditional into helper function would improve readability.

Aug 19 2020, 6:14 AM · Restricted Project
okura requested review of D86196: [Attributor] Handle CallBase case in AAValueConstantRange::initialize.
Aug 19 2020, 12:02 AM · Restricted Project

Aug 18 2020

okura committed rG21e4b9b204b4: [Attributor][NFC] Add tests to range.ll (authored by okura).
[Attributor][NFC] Add tests to range.ll
Aug 18 2020, 11:03 PM
okura closed D86128: [Attributor][NFC] Add tests to range.ll.
Aug 18 2020, 11:02 PM · Restricted Project
okura added inline comments to D86128: [Attributor][NFC] Add tests to range.ll.
Aug 18 2020, 11:32 AM · Restricted Project
okura committed rG5e361e2aa4f6: [Attributor] Deduce noundef attribute (authored by okura).
[Attributor] Deduce noundef attribute
Aug 18 2020, 2:11 AM