Page MenuHomePhabricator

anton-afanasyev (Anton Afanasyev)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 30 2018, 2:53 PM (38 w, 1 d)

Recent Activity

Yesterday

anton-afanasyev added inline comments to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.
Mon, Jun 24, 4:25 AM · Restricted Project, Restricted Project
anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Changed comment

Mon, Jun 24, 4:24 AM · Restricted Project, Restricted Project

Sun, Jun 23

anton-afanasyev added inline comments to D56772: [MIR] Add simple PRE pass to MachineCSE.
Sun, Jun 23, 2:59 PM · Restricted Project

Fri, Jun 21

anton-afanasyev added inline comments to D56772: [MIR] Add simple PRE pass to MachineCSE.
Fri, Jun 21, 8:19 AM · Restricted Project
anton-afanasyev added a comment to rL362901: [MIR] Add simple PRE pass to MachineCSE.

@anton-afanasyev: FYI, we're still seeing this and it presents itself as a miscompile.
We're still working on getting a test case but it's proving to be very difficult.

Fri, Jun 21, 7:02 AM
anton-afanasyev added a comment to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Also, first "Frontend" section contains "ParseTemplate" and "PerformPendingInstantiations" sections.

Fri, Jun 21, 6:39 AM · Restricted Project, Restricted Project
anton-afanasyev added a comment to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Hm, i started writing previous comment before you posted your last comment, so i didn't see the last update.
This looks less intrusive, yes, but two observations:

  1. You now have two "Frontend" sections - first one being for lexing time
  2. That lexing section is not within the "Frontend" section, even though it is for sure part of frontend of the compiler. Like i said, i'm not sure what the right solution here is.
Fri, Jun 21, 6:27 AM · Restricted Project, Restricted Project
anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Hi @lebedev.ri, I've turned back to the solution with one TimeTraceScope for "Frontend" inside BackendConsumer::HandleTranslationUnit(), since it looks more robust. This admits several (two for now) "Frontend" sections, but I see no problem with this. Other solutions have to rely on BackendConsumer and ASTConsumer calling correct relations, which are not guaranteed (though it is looking correct for now).

Fri, Jun 21, 5:35 AM · Restricted Project, Restricted Project

Wed, Jun 19

anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Updated, changed test

Wed, Jun 19, 2:29 PM · Restricted Project, Restricted Project

Tue, Jun 18

anton-afanasyev added inline comments to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.
Tue, Jun 18, 4:16 PM · Restricted Project, Restricted Project
anton-afanasyev added a comment to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Hmm, i'm only now noticing how fraglie this looks.
How do we know that clang::ParseAST will only ever be called with BackendConsumer ASTConsumer?
How do we know that BackendConsumer will only ever be ASTConsumer from clang::ParseAST?

Tue, Jun 18, 4:12 PM · Restricted Project, Restricted Project
anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Updated

Tue, Jun 18, 3:22 PM · Restricted Project, Restricted Project
anton-afanasyev added inline comments to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.
Tue, Jun 18, 3:22 PM · Restricted Project, Restricted Project
anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Updated

Tue, Jun 18, 3:07 PM · Restricted Project, Restricted Project
anton-afanasyev added inline comments to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.
Tue, Jun 18, 3:07 PM · Restricted Project, Restricted Project
anton-afanasyev added inline comments to D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.
Tue, Jun 18, 4:10 AM · Restricted Project, Restricted Project
anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Updated

Tue, Jun 18, 4:10 AM · Restricted Project, Restricted Project

Fri, Jun 14

anton-afanasyev updated the diff for D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.

Small fix

Fri, Jun 14, 3:44 AM · Restricted Project, Restricted Project
anton-afanasyev created D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks.
Fri, Jun 14, 3:38 AM · Restricted Project, Restricted Project

Wed, Jun 12

anton-afanasyev added a comment to rL362901: [MIR] Add simple PRE pass to MachineCSE.

@anton-afanasyev:
The test failures occur in Halide generated code, with the HVX backend. They are not public.
r363164 does not fix the tests; it does change an erroneous output to another erroneous one.

Wed, Jun 12, 2:38 PM
anton-afanasyev added a comment to rL362901: [MIR] Add simple PRE pass to MachineCSE.

@asbirlea Btw, this fix was commited for the issue noted here: https://reviews.llvm.org/D56772#1537772

Wed, Jun 12, 1:29 PM
anton-afanasyev added a comment to rL362901: [MIR] Add simple PRE pass to MachineCSE.

FYI, we're seeing test failures due to this revision. Currently trying to isolate a testcase, but it may be challenging to minimize if the failures are due to a miscompile.

Wed, Jun 12, 1:00 PM
anton-afanasyev closed D56772: [MIR] Add simple PRE pass to MachineCSE.

Last issue fixed by this revision: https://reviews.llvm.org/D63148

Wed, Jun 12, 6:53 AM · Restricted Project
anton-afanasyev committed rG339b39b77337: [MIR] Skip hoisting to basic block which may throw exception or return (authored by anton-afanasyev).
[MIR] Skip hoisting to basic block which may throw exception or return
Wed, Jun 12, 6:50 AM
anton-afanasyev committed rL363164: [MIR] Skip hoisting to basic block which may throw exception or return.
[MIR] Skip hoisting to basic block which may throw exception or return
Wed, Jun 12, 6:48 AM
anton-afanasyev closed D63148: [MIR] Skip hoisting to throwable or return machine basic blocks.
Wed, Jun 12, 6:48 AM · Restricted Project

Tue, Jun 11

anton-afanasyev updated the diff for D63148: [MIR] Skip hoisting to throwable or return machine basic blocks.

Update description

Tue, Jun 11, 11:43 AM · Restricted Project
anton-afanasyev updated the diff for D63148: [MIR] Skip hoisting to throwable or return machine basic blocks.

Add test

Tue, Jun 11, 10:47 AM · Restricted Project
anton-afanasyev added a comment to D63148: [MIR] Skip hoisting to throwable or return machine basic blocks.

Missing a test

Tue, Jun 11, 10:47 AM · Restricted Project
anton-afanasyev added a comment to D56772: [MIR] Add simple PRE pass to MachineCSE.

Hi @john.brawn , here is the fix, could you please look to it: https://reviews.llvm.org/D63148

Tue, Jun 11, 10:08 AM · Restricted Project
anton-afanasyev created D63148: [MIR] Skip hoisting to throwable or return machine basic blocks.
Tue, Jun 11, 10:05 AM · Restricted Project
anton-afanasyev added a comment to D56772: [MIR] Add simple PRE pass to MachineCSE.

The issue actually is not with this instruction, but it's related to exception handling. Hoisted instruction is inserted before getFirstTerminator(), but there could be EH_LABEL's which are not terminators, but could change control flow.

Tue, Jun 11, 8:23 AM · Restricted Project
anton-afanasyev added a comment to D56772: [MIR] Add simple PRE pass to MachineCSE.

This is causing incorrect code generation for this piece of IR:

target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-arm-none-eabi"

@var = hidden local_unnamed_addr global i32 0, align 4
@_ZTIi = external dso_local constant i8*
declare dso_local void @_Z2fnv() local_unnamed_addr #1
declare dso_local i32 @__gxx_personality_v0(...)
declare i32 @llvm.eh.typeid.for(i8*) #2
declare dso_local i8* @__cxa_begin_catch(i8*) local_unnamed_addr
declare dso_local void @__cxa_end_catch() local_unnamed_addr

define hidden i32 @_Z7examplev() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
  invoke void @_Z2fnv()
          to label %try.cont unwind label %lpad

lpad:                                             ; preds = %entry
  %0 = landingpad { i8*, i32 }
          catch i8* bitcast (i8** @_ZTIi to i8*)
          catch i8* null
  %1 = extractvalue { i8*, i32 } %0, 0
  %2 = extractvalue { i8*, i32 } %0, 1
  %3 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*))
  %matches = icmp eq i32 %2, %3
  %4 = tail call i8* @__cxa_begin_catch(i8* %1)
  %5 = load i32, i32* @var, align 4
  br i1 %matches, label %catch1, label %catch

catch1:                                           ; preds = %lpad
  %or3 = or i32 %5, 4
  store i32 %or3, i32* @var, align 4
  tail call void @__cxa_end_catch()
  br label %try.cont

try.cont:                                         ; preds = %entry, %catch1, %catch
  %6 = load i32, i32* @var, align 4
  ret i32 %6

catch:                                            ; preds = %lpad
  %or = or i32 %5, 8
  store i32 %or, i32* @var, align 4
  tail call void @__cxa_end_catch()
  br label %try.cont
}

As part of the accesses to var an ADRP instruction is being generated and MachineCSE is hoisting it to the entry block, but it gets hoisted to after the call to fn so when we catch an exception the ADRP hasn't been executed so the loads and stores use an undefined base register.

Tue, Jun 11, 4:44 AM · Restricted Project
anton-afanasyev committed rG7599da571886: [Support][Test] Time profiler: add regression test (authored by anton-afanasyev).
[Support][Test] Time profiler: add regression test
Tue, Jun 11, 1:24 AM
anton-afanasyev committed rL363036: [Support][Test] Time profiler: add regression test.
[Support][Test] Time profiler: add regression test
Tue, Jun 11, 1:24 AM

Sun, Jun 9

anton-afanasyev closed D56772: [MIR] Add simple PRE pass to MachineCSE.

Closed by commit https://reviews.llvm.org/rL362901

Sun, Jun 9, 6:33 AM · Restricted Project
anton-afanasyev committed rG623d9ba068e6: [MIR] Add simple PRE pass to MachineCSE (authored by anton-afanasyev).
[MIR] Add simple PRE pass to MachineCSE
Sun, Jun 9, 5:14 AM
anton-afanasyev committed rL362901: [MIR] Add simple PRE pass to MachineCSE.
[MIR] Add simple PRE pass to MachineCSE
Sun, Jun 9, 5:14 AM

Fri, Jun 7

anton-afanasyev added a comment to D61914: [Support][Test] Time profiler: add regression test.

cfe/trunk/test/Driver/check-time-trace.cpp appears to fail on Darwin. Did you mean to pass the target explicitly ?

Fri, Jun 7, 2:01 PM · Restricted Project, Restricted Project
anton-afanasyev committed rG07e3f3d9e467: Revert "[Support][Test] Time profiler: add regression test" (authored by anton-afanasyev).
Revert "[Support][Test] Time profiler: add regression test"
Fri, Jun 7, 11:38 AM
anton-afanasyev added a reverting change for rG44282a60c90f: [Support][Test] Time profiler: add regression test: rG07e3f3d9e467: Revert "[Support][Test] Time profiler: add regression test".
Fri, Jun 7, 11:38 AM
anton-afanasyev committed rL362824: Revert "[Support][Test] Time profiler: add regression test".
Revert "[Support][Test] Time profiler: add regression test"
Fri, Jun 7, 11:33 AM
anton-afanasyev committed rG44282a60c90f: [Support][Test] Time profiler: add regression test (authored by anton-afanasyev).
[Support][Test] Time profiler: add regression test
Fri, Jun 7, 11:12 AM
anton-afanasyev committed rL362821: [Support][Test] Time profiler: add regression test.
[Support][Test] Time profiler: add regression test
Fri, Jun 7, 11:12 AM
anton-afanasyev committed rGf2ddd608367b: [Support][Test] Time profiler: add regression test (authored by anton-afanasyev).
[Support][Test] Time profiler: add regression test
Fri, Jun 7, 5:57 AM
anton-afanasyev committed rL362792: [Support][Test] Time profiler: add regression test.
[Support][Test] Time profiler: add regression test
Fri, Jun 7, 5:57 AM
anton-afanasyev closed D61914: [Support][Test] Time profiler: add regression test.
Fri, Jun 7, 5:57 AM · Restricted Project, Restricted Project
anton-afanasyev added a comment to D61914: [Support][Test] Time profiler: add regression test.

Could you please move the test to a more approriate location? (ie. clang/trunk/test/Driver/)

Fri, Jun 7, 4:13 AM · Restricted Project, Restricted Project
anton-afanasyev updated the diff for D61914: [Support][Test] Time profiler: add regression test.

Updated

Fri, Jun 7, 4:13 AM · Restricted Project, Restricted Project

Mon, Jun 3

anton-afanasyev abandoned D62067: [Support] Time profiler: support new PassManager.
Mon, Jun 3, 8:15 AM · Restricted Project

Fri, May 31

anton-afanasyev accepted D62666: ftime-trace: Trace loop passes.

LGTM, thanks.

Fri, May 31, 1:01 AM · Restricted Project

Tue, May 28

Herald added a reviewer for D4449: Add a dereferencable attribute: deadalnix.
Tue, May 28, 1:59 AM

Mon, May 27

anton-afanasyev added a comment to rL361356: [MIR] Add simple PRE pass to MachineCSE.

Hi @anil9 . Yes, you are right -- it's my change being causing the stage 2 failure. I'm working on fix. Should I revert it meanwhile?

Yeah I think reverting will help since the buildbots are in failed stage for more than 24 hours and a planned outage is coming.

Thanks!

Mon, May 27, 12:55 AM
anton-afanasyev added a comment to rL361746: Revert r361356: "[MIR] Add simple PRE pass to MachineCSE".

Yes, thank you, it was planned, sorry for pending this.

Mon, May 27, 12:55 AM

May 23 2019

anton-afanasyev added a comment to rL361356: [MIR] Add simple PRE pass to MachineCSE.

Hi,

Your changeset might be causing failures on this buildbot http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage?numbuilds=100
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/18248
Most of the stage 2 changes are still failing consistently, could you please, take a look.
Given the machine is going for a planned outage on Friday I may not be able to sort the exact cause so I am letting you earlier.
Thanks.

May 23 2019, 11:34 PM

May 22 2019

anton-afanasyev committed rGdf00c6a54f27: [MIR] Add simple PRE pass to MachineCSE (authored by anton-afanasyev).
[MIR] Add simple PRE pass to MachineCSE
May 22 2019, 12:40 AM
anton-afanasyev committed rL361356: [MIR] Add simple PRE pass to MachineCSE.
[MIR] Add simple PRE pass to MachineCSE
May 22 2019, 12:39 AM

May 21 2019

anton-afanasyev added a comment to D62067: [Support] Time profiler: support new PassManager.

I might have fallen a bit out of the loop, but can you tell me a bit more details about the use case here? There is no in-tree support for new-PM backend passes currently, is this for an out-of-tree user?
What about all the other IRUnit nestings beyond function passes in module pipelines?

Those questions aside, I'm not happy with the implementation. It uses global state, which is bad on its own, but in a way that isn't remotely threadsafe. It also cannot be easily made threadsafe without bigger redesign. Therefore, this isn't going to work in the new PM.

In the new PassManager we have a quite nice instrumentation infrastructure, which is perfectly suited to hook tracers such as this one into the pipeline execution. I suggest implementing -ftime-trace on top of that infrastructure. That being said, it appears as if there's quite some overlap between this tracer and the pass timing things. Why is the existing mechanism insufficient? Is the difference really just the output format? In which case, why not make that customizable instead of rolling out a second timing instrumentation?

May 21 2019, 3:48 PM · Restricted Project

May 20 2019

anton-afanasyev added a reviewer for D62067: [Support] Time profiler: support new PassManager: lebedev.ri.
May 20 2019, 1:32 AM · Restricted Project

May 17 2019

anton-afanasyev added a comment to D62067: [Support] Time profiler: support new PassManager.

I know this is in line with what is done in old-pm, but i find the middle-end names to be very useless.
In particular, why is the actual optimization pass name is always in the description, and the actual timeslice name is always the same generic "Opt???"?
IMHO the actual optimization pass name should be the Name, not Detail.

May 17 2019, 8:55 AM · Restricted Project
anton-afanasyev created D62067: [Support] Time profiler: support new PassManager.
May 17 2019, 8:22 AM · Restricted Project
anton-afanasyev added a reviewer for D61914: [Support][Test] Time profiler: add regression test: aganea.
May 17 2019, 1:02 AM · Restricted Project, Restricted Project

May 15 2019

anton-afanasyev accepted D61945: ftime-trace as a CoreOption.

LGTM, thanks!

May 15 2019, 7:10 AM · Restricted Project, Restricted Project

May 14 2019

anton-afanasyev created D61914: [Support][Test] Time profiler: add regression test.
May 14 2019, 1:05 PM · Restricted Project, Restricted Project

May 11 2019

anton-afanasyev accepted D61822: make -ftime-trace also print template arguments.

LGTM
Thanks!

May 11 2019, 9:54 AM · Restricted Project

May 3 2019

anton-afanasyev reopened D56772: [MIR] Add simple PRE pass to MachineCSE.
May 3 2019, 7:52 AM · Restricted Project
anton-afanasyev committed rG6d08b8dbaef2: Revert "[MIR] Add simple PRE pass to MachineCSE" (authored by anton-afanasyev).
Revert "[MIR] Add simple PRE pass to MachineCSE"
May 3 2019, 5:38 AM
anton-afanasyev added a reverting change for rG9c20156de39b: [MIR] Add simple PRE pass to MachineCSE: rG6d08b8dbaef2: Revert "[MIR] Add simple PRE pass to MachineCSE".
May 3 2019, 5:37 AM
anton-afanasyev committed rL359875: Revert "[MIR] Add simple PRE pass to MachineCSE".
Revert "[MIR] Add simple PRE pass to MachineCSE"
May 3 2019, 5:34 AM
anton-afanasyev committed rG9c20156de39b: [MIR] Add simple PRE pass to MachineCSE (authored by anton-afanasyev).
[MIR] Add simple PRE pass to MachineCSE
May 3 2019, 3:29 AM
anton-afanasyev committed rL359870: [MIR] Add simple PRE pass to MachineCSE.
[MIR] Add simple PRE pass to MachineCSE
May 3 2019, 3:29 AM
anton-afanasyev closed D56772: [MIR] Add simple PRE pass to MachineCSE.
May 3 2019, 3:29 AM · Restricted Project
anton-afanasyev updated the diff for D56772: [MIR] Add simple PRE pass to MachineCSE.

Update, clang-format

May 3 2019, 2:56 AM · Restricted Project

Apr 30 2019

anton-afanasyev added inline comments to D56772: [MIR] Add simple PRE pass to MachineCSE.
Apr 30 2019, 8:16 AM · Restricted Project
anton-afanasyev updated the diff for D56772: [MIR] Add simple PRE pass to MachineCSE.

Small fix and tests update

Apr 30 2019, 7:53 AM · Restricted Project
anton-afanasyev added inline comments to D56772: [MIR] Add simple PRE pass to MachineCSE.
Apr 30 2019, 6:26 AM · Restricted Project

Apr 24 2019

anton-afanasyev updated the diff for D56772: [MIR] Add simple PRE pass to MachineCSE.

Rebase. Please, review this.

Apr 24 2019, 3:08 AM · Restricted Project

Apr 17 2019

anton-afanasyev accepted D60804: [Support] Add JSON streaming output API, faster where the heavy value types aren't needed..

Looks great, thank you!

Apr 17 2019, 1:28 PM · Restricted Project

Apr 16 2019

anton-afanasyev committed rG3a00b020aab0: Time profiler: optimize json output time (authored by anton-afanasyev).
Time profiler: optimize json output time
Apr 16 2019, 1:36 PM
anton-afanasyev committed rL358522: Time profiler: optimize json output time.
Time profiler: optimize json output time
Apr 16 2019, 1:36 PM
anton-afanasyev closed D60792: Time profiler: optimize json output time.
Apr 16 2019, 1:36 PM · Restricted Project
anton-afanasyev updated the diff for D60792: Time profiler: optimize json output time.

Update

Apr 16 2019, 1:35 PM · Restricted Project
anton-afanasyev added inline comments to D60609: Use native llvm JSON library for time profiler output.
Apr 16 2019, 1:35 PM · Restricted Project
anton-afanasyev updated the diff for D60792: Time profiler: optimize json output time.

Updated assertion

Apr 16 2019, 1:21 PM · Restricted Project
anton-afanasyev added inline comments to D60792: Time profiler: optimize json output time.
Apr 16 2019, 1:21 PM · Restricted Project
anton-afanasyev updated the diff for D60792: Time profiler: optimize json output time.

Updated

Apr 16 2019, 1:07 PM · Restricted Project
anton-afanasyev updated the diff for D60792: Time profiler: optimize json output time.

Updated, clang-format

Apr 16 2019, 1:07 PM · Restricted Project
anton-afanasyev created D60792: Time profiler: optimize json output time.
Apr 16 2019, 12:52 PM · Restricted Project
anton-afanasyev committed rG765f01838155: [Support][JSON] Add reserve() to json Array (authored by anton-afanasyev).
[Support][JSON] Add reserve() to json Array
Apr 16 2019, 12:43 PM
anton-afanasyev committed rL358520: [Support][JSON] Add reserve() to json Array.
[Support][JSON] Add reserve() to json Array
Apr 16 2019, 12:43 PM
anton-afanasyev closed D60788: [Support][JSON] Add reserve() to json Array.
Apr 16 2019, 12:43 PM · Restricted Project
anton-afanasyev added a comment to D60788: [Support][JSON] Add reserve() to json Array.

As i have previously discussed in IRC with @sammccall this change needs motivational numbers.
Just copying them (+methodology) from https://reviews.llvm.org/D60609#inline-538565 sounds good.
-5.5% sounds rather great to me.

Apr 16 2019, 12:14 PM · Restricted Project
anton-afanasyev updated the summary of D60788: [Support][JSON] Add reserve() to json Array.
Apr 16 2019, 12:09 PM · Restricted Project
anton-afanasyev added inline comments to D60609: Use native llvm JSON library for time profiler output.
Apr 16 2019, 11:39 AM · Restricted Project
anton-afanasyev added inline comments to D60609: Use native llvm JSON library for time profiler output.
Apr 16 2019, 11:30 AM · Restricted Project
anton-afanasyev added inline comments to D60609: Use native llvm JSON library for time profiler output.
Apr 16 2019, 11:15 AM · Restricted Project
anton-afanasyev created D60788: [Support][JSON] Add reserve() to json Array.
Apr 16 2019, 11:11 AM · Restricted Project
anton-afanasyev added inline comments to D60609: Use native llvm JSON library for time profiler output.
Apr 16 2019, 10:55 AM · Restricted Project
anton-afanasyev added inline comments to D60609: Use native llvm JSON library for time profiler output.
Apr 16 2019, 10:46 AM · Restricted Project
anton-afanasyev added a comment to D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps.

Patch by @thakis for BE passes tracing: https://reviews.llvm.org/D60782

Apr 16 2019, 10:28 AM · Restricted Project, Restricted Project