Page MenuHomePhabricator

quic_aankit (Ankit)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 23 2019, 1:01 PM (201 w, 5 d)

Recent Activity

May 1 2023

quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

In addition to Michael's comment, I'd like to suggest several comments:

  1. This patch "undo" LICM within loop interchange in order to form a tightly nest loopnest. This sounds like a phase ordering problem, i.e., you could just place loop interchange before LICM and then you'll be able to interchange the loopnest. If it is a phase ordering problem then I'm not sure if it makes perfect sense to undo pass A within pass B, because things could quickly get messy if we choose to develop in this way.
  1. Also, have you considered the "loopnest" version of loop passes? For example if you use the loopnest invariant code motion (LNICM) pass instead of LICM pass in the pipeline, you'll not hoist z[j] into int tmp = z[j] (in the example from your summary), because LNICM will only do hoisting if a variable is invariant across the entire loopnest.
  1. In D53027, support for inner-only reductions is removed because of miscompilation of certain cases, as well as profitability concerns since interchange would move loads and stores from the outer loop into the inner loop. Have you thought about addressing these problems?

One possible miscompilation, as mentioned in https://reviews.llvm.org/D53027#1272786, is that it would miscompile if we interchange the following code, given that y is a global variable.

for (unsigned i = 0; i < N; i++) {
  y = 0;
  for (unsigned j = 0; j < N; j++) {
    A[i][j] += 1;
    y += A[i][j];
  }
}
May 1 2023, 4:40 PM · Restricted Project, Restricted Project, Restricted Project
quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

Summarize the algorithm in the description, in particular what a "removablePHIs" is and what distinguishes a inner-only reduction from an inner reduction?

May 1 2023, 4:31 PM · Restricted Project, Restricted Project, Restricted Project

Apr 11 2023

quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

@fhahn @efriedma @Meinersbur @congzhe @bmahjour @kparzysz Can you please help review this patch?

Apr 11 2023, 1:31 PM · Restricted Project, Restricted Project, Restricted Project

Apr 6 2023

quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

Ping!

Apr 6 2023, 11:42 AM · Restricted Project, Restricted Project, Restricted Project
quic_aankit added a reviewer for D144226: [Loop-Interchange] Allow inner-loop only reductions: kparzysz.
Apr 6 2023, 11:42 AM · Restricted Project, Restricted Project, Restricted Project

Mar 23 2023

quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

Ping! Thank you @efriedma for adding more reviewers

Mar 23 2023, 11:24 PM · Restricted Project, Restricted Project, Restricted Project

Mar 16 2023

quic_aankit updated subscribers of D144226: [Loop-Interchange] Allow inner-loop only reductions.

@fhahn @eli.friedman Can you please review this patch?

Mar 16 2023, 11:10 AM · Restricted Project, Restricted Project, Restricted Project

Mar 7 2023

quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

@fhahn Ping!

Mar 7 2023, 7:49 AM · Restricted Project, Restricted Project, Restricted Project

Feb 28 2023

quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

Ping

Feb 28 2023, 7:39 AM · Restricted Project, Restricted Project, Restricted Project

Feb 16 2023

quic_aankit updated the summary of D144226: [Loop-Interchange] Allow inner-loop only reductions.
Feb 16 2023, 3:40 PM · Restricted Project, Restricted Project, Restricted Project
quic_aankit retitled D144226: [Loop-Interchange] Allow inner-loop only reductions from Allow inner-loop only reductions to [Loop-Interchange] Allow inner-loop only reductions.
Feb 16 2023, 3:36 PM · Restricted Project, Restricted Project, Restricted Project
quic_aankit added a comment to D144226: [Loop-Interchange] Allow inner-loop only reductions.

@fhahn I used the lit-test from your patch from here: https://reviews.llvm.org/D53027?vs=on&id=168822#toc

Feb 16 2023, 3:33 PM · Restricted Project, Restricted Project, Restricted Project
quic_aankit requested review of D144226: [Loop-Interchange] Allow inner-loop only reductions.
Feb 16 2023, 3:30 PM · Restricted Project, Restricted Project, Restricted Project

Sep 13 2021

quic_aankit updated the diff for D109403: Few bug fixes in HexagonVectorCombine.
Sep 13 2021, 12:45 PM · Restricted Project
quic_aankit updated the diff for D109403: Few bug fixes in HexagonVectorCombine.
Sep 13 2021, 12:41 PM · Restricted Project
quic_aankit updated the diff for D109403: Few bug fixes in HexagonVectorCombine.
Sep 13 2021, 12:11 PM · Restricted Project

Sep 10 2021

quic_aankit updated the diff for D109623: [Hexagon] Handle Bitcast of i64/i128 -> v64i1/v128i1.
Sep 10 2021, 3:44 PM · Restricted Project
quic_aankit updated the diff for D109623: [Hexagon] Handle Bitcast of i64/i128 -> v64i1/v128i1.
Sep 10 2021, 12:57 PM · Restricted Project
quic_aankit requested review of D109623: [Hexagon] Handle Bitcast of i64/i128 -> v64i1/v128i1.
Sep 10 2021, 12:00 PM · Restricted Project

Sep 7 2021

quic_aankit updated the diff for D109403: Few bug fixes in HexagonVectorCombine.
Sep 7 2021, 7:42 PM · Restricted Project
quic_aankit added a comment to D109403: Few bug fixes in HexagonVectorCombine.
Sep 7 2021, 5:06 PM · Restricted Project
quic_aankit requested review of D109403: Few bug fixes in HexagonVectorCombine.
Sep 7 2021, 5:01 PM · Restricted Project

Feb 2 2021

quic_aankit abandoned D95909: Use Vsplat.b|h if splat value not ConstantNode.
Feb 2 2021, 5:37 PM · Restricted Project
quic_aankit requested review of D95909: Use Vsplat.b|h if splat value not ConstantNode.
Feb 2 2021, 5:01 PM · Restricted Project

Jan 7 2021

quic_aankit added a comment to D93929: [NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline.

@asbirlea I remember that HexagonVLCR pass has a dependency on LCSSA and LoopSimplifyPass. Is there any way we can run these passes too at LoopOptimizerEndEP? If not maybe use another EP for legacy PM? I'm not sure if the below code would run these passes in the correct order as well

PB.registerOptimizerLastEPCallback(
    [=](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
      LoopPassManager LPM(DebugPassManager);
      FunctionPassManager FPM(DebugPassManager);
      LPM.addPass(HexagonVectorLoopCarriedReusePass());
      FPM.addPass(LoopSimplifyPass());
      FPM.addPass(LCSSAPass());
      FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM)));
      MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
    });

@pranavb Can you comment more on this?

LCSSA should be preserved by all loop passes under the new PM. LCSSA and LoopSimplify are run before any loop pass: https://github.com/llvm/llvm-project/blob/8dddcc762dd98d53b9406b36e92f62502834187c/llvm/include/llvm/Transforms/Scalar/LoopPassManager.h#L406. Although I don't think passes are required preserve loop simplify form.

Jan 7 2021, 4:55 PM · Restricted Project
quic_aankit updated subscribers of D93929: [NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline.

@asbirlea I remember that HexagonVLCR pass has a dependency on LCSSA and LoopSimplifyPass. Is there any way we can run these passes too at LoopOptimizerEndEP? If not maybe use another EP for legacy PM? I'm not sure if the below code would run these passes in the correct order as well

Jan 7 2021, 4:17 PM · Restricted Project

Nov 17 2020

quic_aankit added a comment to D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

I think this, and similar recent commits, are causing the shared library builds to fail some tests if this code gets linked into libLLVM.so: https://bugs.llvm.org/show_bug.cgi?id=48181. I assume it might actually a bug in ld (GNU Binutils for Ubuntu 2.34), as I don't understand the linker behavior there?

Nov 17 2020, 5:01 PM · Restricted Project, Restricted Project

Sep 30 2020

quic_aankit added a comment to D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

Makes sense. Removed the default value

Sep 30 2020, 11:27 AM · Restricted Project, Restricted Project
quic_aankit updated the diff for D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

@aeubanks Thanks for the review. Can you also commit the patch on my behalf?

Sep 30 2020, 11:27 AM · Restricted Project, Restricted Project
quic_aankit updated the diff for D88138: [NPM] Add target specific hook to add passes for New Pass Manager.
Sep 30 2020, 9:49 AM · Restricted Project, Restricted Project
quic_aankit added inline comments to D88138: [NPM] Add target specific hook to add passes for New Pass Manager.
Sep 30 2020, 12:34 AM · Restricted Project, Restricted Project
quic_aankit updated the diff for D88138: [NPM] Add target specific hook to add passes for New Pass Manager.
Sep 30 2020, 12:34 AM · Restricted Project, Restricted Project

Sep 29 2020

quic_aankit updated the diff for D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

@aeubanks PTAL

Sep 29 2020, 4:48 PM · Restricted Project, Restricted Project

Sep 25 2020

quic_aankit added a comment to D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

I think I'm still missing how exactly this will fit into the pipeline. As in where is registerPassBuilderCallbacks() going to be called?

Perhaps EmitAssemblyHelper::EmitAssemblyWithNewPassManager in BackendUtil.cpp. PassBuilder actually has TM as a member, so maybe from somewhere inside of PassBuilder itself, but I'm not sure whether that's the right thing to do.

Anywhere adjustPassManager() is called should have a corresponding call to registerPassBuilderCallbacks() in the NPM path. So yes EmitAssemblyHelper::EmitAssemblyWithNewPassManager() in BackendUtil.cpp, but also since opt.cpp calls adjustPassManager(), the corresponding NPM path in NewPMDriver.cpp should also call registerPassBuilderCallbacks(). Both places have access to a TM.

This should be done either before or in this patch, or else we can't test it and make sure it works.

Sep 25 2020, 12:23 PM · Restricted Project, Restricted Project

Sep 24 2020

quic_aankit updated the diff for D88138: [NPM] Add target specific hook to add passes for New Pass Manager.
Sep 24 2020, 11:49 PM · Restricted Project, Restricted Project
quic_aankit added a comment to D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

I think I'm still missing how exactly this will fit into the pipeline. As in where is registerPassBuilderCallbacks() going to be called?

And a test like llvm/test/CodeGen/AMDGPU/opt-pipeline.ll for the new pass manager route would be nice to make sure this actually works.
something like RUN: opt -passes='default<O0>' -mtriple=... -disable-output -disable-verify -debug-pass-manager. Maybe checking all the normal passes isn't necessary like in the existing opt-pipeline.ll isn't necessary, just need to check that the custom passes (e.g. HexagonVectorLoopCarriedReusePass) are actually added.

Sep 24 2020, 11:42 PM · Restricted Project, Restricted Project
quic_aankit updated the diff for D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

Added HexagonVectorLoopCarriedReusePass to registerPassBuilderCallbacks

Sep 24 2020, 10:18 PM · Restricted Project, Restricted Project
quic_aankit added a comment to D88138: [NPM] Add target specific hook to add passes for New Pass Manager.

Makes sense, but do you have an example usage of this?

Sep 24 2020, 12:28 AM · Restricted Project, Restricted Project

Sep 23 2020

quic_aankit requested review of D88138: [NPM] Add target specific hook to add passes for New Pass Manager.
Sep 23 2020, 12:13 AM · Restricted Project, Restricted Project

Sep 18 2020

quic_aankit added a comment to D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.

Is there any existing test case for this pass with the legacy pass manager? If so, you might want to add one with the new pass manager too.

All the existing testcases use opt to run the pass. The pass is not run integrated in the main list of passes for any -Ox level.

That's what I meant. For each legacy pass manager test "RUN: opt -hexagon-vlcr ...", you can add a corresponding new pass manager test "RUN: opt -passes=hexagon-vlcr". This way, we will have the same test coverage with both the legacy and new pass managers.

Hi pzheng, I could not figure out a way to register a target specific pass in opt? I can see that llvm/lib/Passes/PassRegistry.def is the registry for target independent passes. Can you point me to an example/API which can help me in registering this pass so that I can use it -passes option in opt?

I am not sure if there is a better place to register the pass other than PassRegistry.def. Maybe someone who knows can comment on this.

Hi pzheng, testing target specific passes using opt+NPM is not currently supported and the work is still work-in-progress. Can we land this without modifying the testcases for now?

Hi @quic_aankit, just to be clear, you tried registering the pass in PassRegistry.def, but still couldn't get "opt -passes=hexagon-vlcr" to work, right? If so, I am fine with leaving out the tests for now, but we should probably mention in the commit message that tests are still to be ported.

Sep 18 2020, 4:08 PM · Restricted Project

Sep 17 2020

quic_aankit added a comment to D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.

Is there any existing test case for this pass with the legacy pass manager? If so, you might want to add one with the new pass manager too.

All the existing testcases use opt to run the pass. The pass is not run integrated in the main list of passes for any -Ox level.

That's what I meant. For each legacy pass manager test "RUN: opt -hexagon-vlcr ...", you can add a corresponding new pass manager test "RUN: opt -passes=hexagon-vlcr". This way, we will have the same test coverage with both the legacy and new pass managers.

Hi pzheng, I could not figure out a way to register a target specific pass in opt? I can see that llvm/lib/Passes/PassRegistry.def is the registry for target independent passes. Can you point me to an example/API which can help me in registering this pass so that I can use it -passes option in opt?

I am not sure if there is a better place to register the pass other than PassRegistry.def. Maybe someone who knows can comment on this.

Sep 17 2020, 2:21 PM · Restricted Project

Sep 14 2020

quic_aankit added a comment to D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.

Is there any existing test case for this pass with the legacy pass manager? If so, you might want to add one with the new pass manager too.

All the existing testcases use opt to run the pass. The pass is not run integrated in the main list of passes for any -Ox level.

That's what I meant. For each legacy pass manager test "RUN: opt -hexagon-vlcr ...", you can add a corresponding new pass manager test "RUN: opt -passes=hexagon-vlcr". This way, we will have the same test coverage with both the legacy and new pass managers.

Sep 14 2020, 9:01 AM · Restricted Project

Sep 8 2020

quic_aankit added a comment to D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.

Is there any existing test case for this pass with the legacy pass manager? If so, you might want to add one with the new pass manager too.

Sep 8 2020, 11:12 AM · Restricted Project

Sep 3 2020

quic_aankit updated the diff for D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.

Ran clang-format on the patch

Sep 3 2020, 2:40 PM · Restricted Project
quic_aankit added inline comments to D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.
Sep 3 2020, 2:39 PM · Restricted Project

Sep 1 2020

quic_aankit requested review of D86955: [Hexagon] Make HexagonVLCR compatibile with New PM.
Sep 1 2020, 9:33 AM · Restricted Project

Aug 25 2020

quic_aankit updated the diff for D86482: Fix ty function in HexagonISelLowering.
Aug 25 2020, 12:12 PM · Restricted Project
quic_aankit updated the diff for D86482: Fix ty function in HexagonISelLowering.
The testcase throws the below error without the patch:
Aug 25 2020, 12:03 PM · Restricted Project

Aug 24 2020

quic_aankit requested review of D86482: Fix ty function in HexagonISelLowering.
Aug 24 2020, 12:25 PM · Restricted Project

Dec 18 2019

quic_aankit updated the diff for D65326: Fix for a dangling point bug in DeadStoreElimination pass.

Hi @fhahn, I've updated the patch to handle the failure with MSVC. Using iterator with pop_back was causing problems on windows.

Dec 18 2019, 10:44 PM · Restricted Project

Dec 5 2019

quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

Hi @fhahn , the commit caused a buildbot failure.
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/20911
Can you please revert the patch for now while I investigate the issue?

Dec 5 2019, 11:11 AM · Restricted Project
quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

I'm trying to get access to commit the patch, but it would be great if you can get someone to commit it.

Dec 5 2019, 8:55 AM · Restricted Project

Dec 3 2019

quic_aankit added inline comments to D65326: Fix for a dangling point bug in DeadStoreElimination pass.
Dec 3 2019, 6:04 AM · Restricted Project
quic_aankit updated the diff for D65326: Fix for a dangling point bug in DeadStoreElimination pass.
Dec 3 2019, 6:03 AM · Restricted Project

Nov 28 2019

quic_aankit updated the diff for D65326: Fix for a dangling point bug in DeadStoreElimination pass.

Hi @fhahn , I've updated the patch to address your comments

Nov 28 2019, 9:27 PM · Restricted Project
quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

Reverse ping.

Are you still looking to submit this patch? If so, it would be great to not wait too long with responding, otherwise the reviewers will have to re-familiarize themselves with the patch and the comment history.

Nov 28 2019, 4:27 PM · Restricted Project

Oct 25 2019

quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

@fhahn Gentle reminder

Oct 25 2019, 12:39 PM · Restricted Project

Oct 14 2019

quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

@fhahn Ping

Oct 14 2019, 2:00 AM · Restricted Project

Oct 1 2019

quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

@fhahn Gentle reminder

Oct 1 2019, 1:47 AM · Restricted Project

Sep 16 2019

quic_aankit added inline comments to D65326: Fix for a dangling point bug in DeadStoreElimination pass.
Sep 16 2019, 7:19 AM · Restricted Project
quic_aankit updated the diff for D65326: Fix for a dangling point bug in DeadStoreElimination pass.

Hi fhahn, sorry for the delay. I've addressed your comments. However, I was unable to add a test where multiple entries are removed from the mapping in a single deleteDeadInstructions call. The method you suggested does not work because deleting a function that may throw is not a legal operation. In the testcase that I have since it is a new function call "_Znwj", we are able to remove the call.

Sep 16 2019, 7:07 AM · Restricted Project

Aug 5 2019

quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

@fhahn @efriedma @bcahoon Please review

Aug 5 2019, 8:22 AM · Restricted Project

Jul 31 2019

quic_aankit added a reviewer for D65326: Fix for a dangling point bug in DeadStoreElimination pass: efriedma.
Jul 31 2019, 7:54 AM · Restricted Project

Jul 30 2019

quic_aankit added a comment to D65326: Fix for a dangling point bug in DeadStoreElimination pass.

I think SetVector would be more suitable and lead to slightly simpler code (http://llvm.org/doxygen/classllvm_1_1SetVector.html)

Also, could you upload the patch with more context? (git show HEAD -U999999)

Jul 30 2019, 2:05 AM · Restricted Project
quic_aankit updated the diff for D65326: Fix for a dangling point bug in DeadStoreElimination pass.
Jul 30 2019, 1:56 AM · Restricted Project
quic_aankit updated the diff for D65326: Fix for a dangling point bug in DeadStoreElimination pass.

Uploading patch with more context

Jul 30 2019, 1:16 AM · Restricted Project

Jul 26 2019

quic_aankit created D65326: Fix for a dangling point bug in DeadStoreElimination pass.
Jul 26 2019, 3:38 AM · Restricted Project