anemet (Adam Nemet)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 21 2014, 12:07 PM (208 w, 2 d)

Recent Activity

Mon, Jul 16

anemet accepted D49348: Harden/relax clang/test/CodeGen/opt-record-MIR.c test.

LGTM, thanks!

Mon, Jul 16, 8:00 PM

May 17 2018

anemet accepted D38768: Add remarks describing when a pass changes the IR instruction count of a module.

Mostly nits. LGTM with the requested changes.

May 17 2018, 4:18 PM

May 7 2018

anemet added a comment to D38768: Add remarks describing when a pass changes the IR instruction count of a module.

Mostly small things except for the question on whether we should only compute this when the remark is actually enabled.

May 7 2018, 4:32 PM

Apr 17 2018

anemet accepted D45752: [gold] Add support for optimization remarks.

Looks pretty straight-forward.

Apr 17 2018, 10:02 PM

Mar 20 2018

anemet added a comment to D43219: [PartialInlining] Fix Crash from holding a reference to a destructed ORE.

While it's preferred to use ORE as an analysis pass, sometimes that's hard (e.g because it's a function pass, or simply because it's hard to thread the ORE instance through the many layers). In these cases it's fine to construct one inline. When remarks are requested this will amount to repopulating BFI for the function as the ORE instance is created.

Mar 20 2018, 8:06 PM

Mar 13 2018

anemet added a comment to D41465: [LTO] Support filtering by hotness threshold.

@inglorion, I am inclined to recommit this unless I hear from you in a few days:

Mar 13 2018, 8:08 AM

Mar 12 2018

anemet committed rL327359: [LTO] Return proper error object rather than null LTOModule.
[LTO] Return proper error object rather than null LTOModule
Mar 12 2018, 9:40 PM

Mar 7 2018

anemet added a comment to D41465: [LTO] Support filtering by hotness threshold.

@inglorion Is this from a bot, I didn't see any failures? A bit more info would be helpful.

Mar 7 2018, 11:23 PM

Mar 6 2018

anemet committed rL326874: Disable tests from r326852 on Darwin.
Disable tests from r326852 on Darwin
Mar 6 2018, 9:36 PM
anemet committed rCRT326874: Disable tests from r326852 on Darwin.
Disable tests from r326852 on Darwin
Mar 6 2018, 9:36 PM

Feb 26 2018

anemet committed rL326169: Make test agnostic to cost model.
Make test agnostic to cost model
Feb 26 2018, 9:44 PM
anemet committed rC326168: Attempt to fix greendragon bot after r326141.
Attempt to fix greendragon bot after r326141
Feb 26 2018, 8:52 PM
anemet committed rL326168: Attempt to fix greendragon bot after r326141.
Attempt to fix greendragon bot after r326141
Feb 26 2018, 8:52 PM
anemet committed rL326127: [opt-viewer] Kill parser processes before moving onto rendering.
[opt-viewer] Kill parser processes before moving onto rendering
Feb 26 2018, 1:18 PM
anemet committed rL326126: opt-diff: Support splitting to multiple output files.
opt-diff: Support splitting to multiple output files
Feb 26 2018, 1:18 PM
anemet committed rL326125: [opt-viewer] Set title for the source pages.
[opt-viewer] Set title for the source pages
Feb 26 2018, 1:18 PM
anemet committed rL326124: opt-viewer: also find thinlto opt.yaml files.
opt-viewer: also find thinlto opt.yaml files
Feb 26 2018, 1:18 PM
anemet committed rL326123: opt-viewer: output index first.
opt-viewer: output index first
Feb 26 2018, 1:18 PM
anemet committed rC326108: [Driver] Forward opt-remark hotness threshold to LTO.
[Driver] Forward opt-remark hotness threshold to LTO
Feb 26 2018, 10:40 AM
anemet committed rL326108: [Driver] Forward opt-remark hotness threshold to LTO.
[Driver] Forward opt-remark hotness threshold to LTO
Feb 26 2018, 10:40 AM
anemet committed rL326107: [LTO] Support filtering by hotness threshold.
[LTO] Support filtering by hotness threshold
Feb 26 2018, 10:40 AM
anemet closed D41465: [LTO] Support filtering by hotness threshold.
Feb 26 2018, 10:40 AM

Feb 24 2018

anemet committed rL326037: Revert "StructurizeCFG: Test for branch divergence correctly".
Revert "StructurizeCFG: Test for branch divergence correctly"
Feb 24 2018, 9:32 AM

Feb 21 2018

anemet added a comment to D43079: [TTI CostModel] change default cost of FP ops to 1 (PR36280).

Seeing such major swings, my preference would be to revert and put the new version up for review (I think that your hack works). Then commit the new combined version after a few days so that the perf bots got a chance to recover. What do you think?

Ok, this was too ambitious. Reverted at rL325658 and reopened:
https://bugs.llvm.org/show_bug.cgi?id=36280

Feb 21 2018, 10:15 AM

Feb 20 2018

anemet added a comment to D43079: [TTI CostModel] change default cost of FP ops to 1 (PR36280).

Please revert until these things get worked out so that we can properly track performance. We are seeing many regressions including 17% on 444.namd and 12% on 482.sphinx3 in SPECfp 2006.

Hi Adam -

Rather than reverting for all targets, can we just hack ARM/AArch with patches like this (if we can add at least one test to show what changed, that would be better of course) :

Index: lib/Target/ARM/ARMTargetTransformInfo.cpp
===================================================================
--- lib/Target/ARM/ARMTargetTransformInfo.cpp	(revision 325579)
+++ lib/Target/ARM/ARMTargetTransformInfo.cpp	(working copy)
@@ -514,6 +514,13 @@
   int Cost = BaseT::getArithmeticInstrCost(Opcode, Ty, Op1Info, Op2Info,
                                            Opd1PropInfo, Opd2PropInfo);
 
+  // Assume that floating point arithmetic operations cost twice as much as
+  // integer operations.
+  // FIXME: This is a win on several perf benchmarks running on CPU model ???,
+  // but there are no regression tests that show why or how this is good.
+  if (Ty->isFPOrFPVectorTy())
+    Cost *= 2;
+
   // This is somewhat of a hack. The problem that we are facing is that SROA
   // creates a sequence of shift, and, or instructions to construct values.
   // These sequences are recognized by the ISel and have zero-cost. Not so for
Feb 20 2018, 5:28 PM
anemet added a comment to D43079: [TTI CostModel] change default cost of FP ops to 1 (PR36280).

Hi Sanjay,

The patch caused regressions in the LLVM benchmarks and in Spec2k/Spec2k6 benchmarks on AArch64 Cortex-A53:

SingleSource/Benchmarks/Misc/matmul_f64_4x4: 49%
MultiSource/Benchmarks/TSVC/LoopRerolling-flt/LoopRerolling-flt: 5.32%
CFP2000/188.ammp/188.ammp: 3.58%
CFP2000/177.mesa/177.mesa: 2.48%
CFP2006/444.namd/444.namd: 2.49%

The regression of SingleSource/Benchmarks/Misc/matmul_f64_4x4 can also be seen on the public bot: http://lnt.llvm.org/db_default/v4/nts/90636
It is 128.85%.

The main difference in generated code is FMUL(FP, scalar) instead of FMUL(SIMD, scalar):

fmul d20, d16, d2

instead of

fmul v17.2d, v1.2d, v5.2d

This also caused code size increase: 6.04% in SingleSource/Benchmarks/Misc/matmul_f64_4x4

I am working on a reproducer.

Thanks. We knew this change was likely to cause perf regressions based on some of the x86 diffs, so having those reductions will help tune the models in general and specifically for AArch64.

Ie, we should be able to solve the AArch64 problems with AArch64-specific cost model changes rather than reverting this. For example as @fhahn mentioned, we might want to make the int-to-FP ratio 3:2 for some cores. Another possibility is overriding the fmul/fsub/fadd AArch64 costs to be more realistic (as we also probably have to do for x86).

Feb 20 2018, 4:34 PM

Feb 12 2018

anemet committed rL324958: Revert "[LSR] Avoid UB overflow when examining reuse opportunities".
Revert "[LSR] Avoid UB overflow when examining reuse opportunities"
Feb 12 2018, 2:44 PM

Jan 20 2018

anemet requested changes to D42331: [cmake] Remove LLVM_HAVE_OPT_VIEWER_MODULES from LLVMConfig.

This is used by Swift. Providing a macro instead of a static value may be a better solution. If you are willing to do that I am OK with that but I have a strong objection against simply removing this.

Jan 20 2018, 9:30 AM

Jan 9 2018

anemet added a comment to D41465: [LTO] Support filtering by hotness threshold.

Ping

Jan 9 2018, 9:41 PM

Jan 5 2018

anemet accepted D41784: Fix some issues with opt-viewer tests, plus disable them on Windows.

LGTM too. Thanks for getting back to this!

Jan 5 2018, 1:42 PM

Jan 2 2018

anemet accepted D41611: [opt-viewer] Check for pygments.lexer.c_cpp.

LGTM. Thanks!

Jan 2 2018, 9:20 AM

Dec 20 2017

anemet created D41465: [LTO] Support filtering by hotness threshold.
Dec 20 2017, 2:10 PM
anemet committed rL321206: [opt-viewer] Also demangle indirect-call promotion targets.
[opt-viewer] Also demangle indirect-call promotion targets
Dec 20 2017, 11:09 AM

Dec 14 2017

anemet committed rL320729: [opt-viewer] Render utf-8 characters properly in the generated HTML.
[opt-viewer] Render utf-8 characters properly in the generated HTML
Dec 14 2017, 10:56 AM
anemet added a comment to D38289: [opt-viewer] Don't Decode HTML bytes for Python 2.

I had to further tweak this in rL320725. Let me know if you see any issues.

Dec 14 2017, 10:45 AM
anemet committed rL320725: [opt-viewer] Support unicode characters in function names.
[opt-viewer] Support unicode characters in function names
Dec 14 2017, 10:43 AM

Dec 6 2017

anemet committed rL319979: [LV] Interleaved access vectorization: fix computing new alias info.
[LV] Interleaved access vectorization: fix computing new alias info
Dec 6 2017, 2:43 PM
anemet closed D40617: [LV] Interleaved access vectorization: fix computing new alias info by committing rL319979: [LV] Interleaved access vectorization: fix computing new alias info.
Dec 6 2017, 2:43 PM
anemet added inline comments to D40617: [LV] Interleaved access vectorization: fix computing new alias info.
Dec 6 2017, 1:10 PM
anemet added a comment to D40617: [LV] Interleaved access vectorization: fix computing new alias info.

@hfinkel, @mkuper, could you guys look at this please. We are experiencing a serious miscompile due to this bug. Thanks!

Dec 6 2017, 8:59 AM
anemet committed rL319902: [opt-viewer] Suppress noisy Swift remarks.
[opt-viewer] Suppress noisy Swift remarks
Dec 6 2017, 8:51 AM

Dec 1 2017

anemet committed rL319581: [opt-remarks] If hotness threshold is set, ignore remarks without hotness.
[opt-remarks] If hotness threshold is set, ignore remarks without hotness
Dec 1 2017, 12:42 PM
anemet added a comment to D34082: [Frontend] 'Show hotness' can be used with a sampling profile.

Sorted these out in rL319576, rL319577 and rL319578.

Dec 1 2017, 12:03 PM
anemet committed rC319578: Fix the second part of the broken comment from r306079.
Fix the second part of the broken comment from r306079
Dec 1 2017, 12:00 PM
anemet committed rC319577: Fix opt-remark with hotness testcase for sample-based PGO.
Fix opt-remark with hotness testcase for sample-based PGO
Dec 1 2017, 12:00 PM
anemet committed rC319576: Partially fix comment in test broken in r306079 and r306948.
Partially fix comment in test broken in r306079 and r306948
Dec 1 2017, 12:00 PM
anemet committed rL319578: Fix the second part of the broken comment from r306079.
Fix the second part of the broken comment from r306079
Dec 1 2017, 12:00 PM
anemet committed rL319577: Fix opt-remark with hotness testcase for sample-based PGO.
Fix opt-remark with hotness testcase for sample-based PGO
Dec 1 2017, 12:00 PM
anemet committed rL319576: Partially fix comment in test broken in r306079 and r306948.
Partially fix comment in test broken in r306079 and r306948
Dec 1 2017, 12:00 PM
anemet added a comment to D34082: [Frontend] 'Show hotness' can be used with a sampling profile.

Looks like it's a test problem. When I tweak the sample profile file according to https://clang.llvm.org/docs/UsersManual.html#sample-profile-text-format, I do get hotness on the remarks.

Dec 1 2017, 11:11 AM
anemet updated subscribers of D34082: [Frontend] 'Show hotness' can be used with a sampling profile.

@modocache, @davide, are you guys sure this feature is working? The test does not actually check whether hotness is included in the remarks and when I run it manually they are missing. In D40678, I am filtering out remarks with no hotness when any threshold is set all the remarks are filtered out in this new test.

Dec 1 2017, 10:31 AM
anemet committed rL319562: Revert "[opt-remarks] If hotness threshold is set, ignore remarks without….
Revert "[opt-remarks] If hotness threshold is set, ignore remarks without…
Dec 1 2017, 10:13 AM
anemet committed rL319556: [opt-remarks] If hotness threshold is set, ignore remarks without hotness.
[opt-remarks] If hotness threshold is set, ignore remarks without hotness
Dec 1 2017, 9:02 AM
anemet closed D40678: [opt-remarks] If hotness threshold is set, ignore remarks without hotness by committing rL319556: [opt-remarks] If hotness threshold is set, ignore remarks without hotness.
Dec 1 2017, 9:02 AM
anemet added a comment to D40678: [opt-remarks] If hotness threshold is set, ignore remarks without hotness.

Thanks, @davide!

Dec 1 2017, 8:42 AM

Nov 30 2017

anemet committed rL319511: [cmake] Expose opt-viewer availability.
[cmake] Expose opt-viewer availability
Nov 30 2017, 5:45 PM
anemet created D40678: [opt-remarks] If hotness threshold is set, ignore remarks without hotness.
Nov 30 2017, 2:27 PM

Nov 29 2017

anemet created D40617: [LV] Interleaved access vectorization: fix computing new alias info.
Nov 29 2017, 11:10 AM
anemet committed rL319324: Add opt-viewer testing.
Add opt-viewer testing
Nov 29 2017, 9:08 AM

Nov 28 2017

anemet committed rL319262: Revert "Add opt-viewer testing".
Revert "Add opt-viewer testing"
Nov 28 2017, 4:11 PM
anemet committed rL319242: Remove this test.
Remove this test
Nov 28 2017, 2:40 PM
anemet committed rL319235: Demote this opt remark to DEBUG..
Demote this opt remark to DEBUG.
Nov 28 2017, 2:11 PM
anemet added inline comments to D38722: Added Remarks for Loop Versioning LICM Pass.
Nov 28 2017, 11:10 AM
anemet committed rL319188: Add opt-viewer testing.
Add opt-viewer testing
Nov 28 2017, 9:27 AM

Nov 27 2017

anemet committed rL319146: Revert "Add opt-viewer testing".
Revert "Add opt-viewer testing"
Nov 27 2017, 10:23 PM
anemet committed rL319073: Add opt-viewer testing.
Add opt-viewer testing
Nov 27 2017, 11:00 AM
anemet committed rL319072: [opt-viewer] Fix option name.
[opt-viewer] Fix option name
Nov 27 2017, 11:00 AM
anemet closed D40202: Add opt-viewer testing by committing rL319073: Add opt-viewer testing.
Nov 27 2017, 11:00 AM
anemet updated the diff for D40202: Add opt-viewer testing.

Thanks, Chris! This moves the cmake bits to config-ix.cmake.

Nov 27 2017, 10:03 AM

Nov 17 2017

anemet created D40202: Add opt-viewer testing.
Nov 17 2017, 5:22 PM

Nov 15 2017

anemet committed rL318307: [SLP] Added more missed optimization remarks.
[SLP] Added more missed optimization remarks
Nov 15 2017, 9:06 AM
anemet closed D38367: [SLP] Added more missed optimiazation remarks by committing rL318307: [SLP] Added more missed optimization remarks.
Nov 15 2017, 9:05 AM

Nov 14 2017

anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

I get two failures, can you please take a look?

Nov 14 2017, 3:31 PM
anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

Thanks for your time, anemet. I've just fixed these issues you told.
Can you please commit this patch? I haven't got r+w access.

Sure, will do after lunch.

This does not apply cleanly for me. There are 4 rejects in SLPVectorizer.cpp. Can you please rebase the patch?

Nov 14 2017, 3:18 PM
anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

Thanks for your time, anemet. I've just fixed these issues you told.
Can you please commit this patch? I haven't got r+w access.

Sure, will do after lunch.

Nov 14 2017, 1:14 PM
anemet committed rL318170: Adjust test after r318159.
Adjust test after r318159
Nov 14 2017, 11:03 AM
anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

Thanks for your time, anemet. I've just fixed these issues you told.
Can you please commit this patch? I haven't got r+w access.

Nov 14 2017, 11:03 AM
anemet accepted D38367: [SLP] Added more missed optimiazation remarks.

This looks great with some minor nits (go ahead and commit after fixing them). Thanks for your work! And sorry about the delay.

Nov 14 2017, 10:19 AM
anemet committed rL318160: Adjust test after r318159.
Adjust test after r318159
Nov 14 2017, 9:12 AM
anemet committed rL318159: [llvm-profdata] Report if profile data file is IR- or FE-level.
[llvm-profdata] Report if profile data file is IR- or FE-level
Nov 14 2017, 8:59 AM
anemet closed D39997: [llvm-profdata] Report if profile data file is IR- or FE-level by committing rL318159: [llvm-profdata] Report if profile data file is IR- or FE-level.
Nov 14 2017, 8:59 AM

Nov 13 2017

anemet created D39997: [llvm-profdata] Report if profile data file is IR- or FE-level.
Nov 13 2017, 9:49 PM
anemet committed rL318136: [opt-viewer] Truncate long remark text in source view.
[opt-viewer] Truncate long remark text in source view
Nov 13 2017, 8:49 PM
anemet committed rL318135: [opt-viewer] With hotness only show max 1000 entries on the index page.
[opt-viewer] With hotness only show max 1000 entries on the index page
Nov 13 2017, 8:39 PM

Nov 6 2017

anemet abandoned D37921: Proof of Concept: Allow ORE.emit to take a closure to delay building the remark object.

This was committed a while ago.

Nov 6 2017, 2:19 PM

Nov 3 2017

anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

Also by any chance, did you run this on some real code base? Some of these may trigger quite a bit and I want to make sure they are not on the top of the list. You can use opt-viewer/opt-stats.py to get a sense how frequently your remark is generated.

Yep, I did, it did not produced much noise on our applications.
I've just compiled ~100 random files from LLVM, opt-stats.py says only slp-vectorizer/InequableTypes is in top 10 remarks with 3% of all remarks (that is ~2000 out of 68000). I suppose it's okay.

Nov 3 2017, 12:24 PM
anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

Also by any chance, did you run this on some real code base? Some of these may trigger quite a bit and I want to make sure they are not on the top of the list. You can use opt-viewer/opt-stats.py to get a sense how frequently your remark is generated.

Nov 3 2017, 9:49 AM
anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

I will look at the rest of the patch in more detail later unless Florian beats me to it. Thanks for tackling this!

Nov 3 2017, 9:45 AM
anemet added a comment to D38367: [SLP] Added more missed optimiazation remarks.

Please use the new closure API to emit remarks.

Nov 3 2017, 8:55 AM

Oct 13 2017

anemet added a comment to D38886: Try to avoid prefetches from disrupting folding of loads..

It's unintuitive why you need to fix this at the IR level. Both the load and the prefetch should be uses of address and there should be no dependence between them.

Oct 13 2017, 10:37 AM

Oct 12 2017

anemet committed rL315643: Handle/assert on DK_Remark.
Handle/assert on DK_Remark
Oct 12 2017, 4:57 PM
anemet committed rL315642: Add DK_Remark to SMDiagnostic.
Add DK_Remark to SMDiagnostic
Oct 12 2017, 4:56 PM
anemet closed D38865: Add DK_Remark to SMDiagnostic by committing rL315642: Add DK_Remark to SMDiagnostic.
Oct 12 2017, 4:56 PM
anemet added a comment to D38865: Add DK_Remark to SMDiagnostic.

Seems reasonable to me. I don't know anything about the MIR parser's use of diagnostics, though.

Oct 12 2017, 4:54 PM
anemet created D38865: Add DK_Remark to SMDiagnostic.
Oct 12 2017, 4:48 PM

Oct 11 2017

anemet added inline comments to D38768: Add remarks describing when a pass changes the IR instruction count of a module.
Oct 11 2017, 11:52 AM
anemet updated subscribers of D38722: Added Remarks for Loop Versioning LICM Pass.
Oct 11 2017, 8:58 AM

Oct 10 2017

anemet accepted D38285: Convert OptimizationRemarkEmitter old emit() calls to new closure parameterized emit() calls.

LGTM. Thanks!

Oct 10 2017, 8:46 PM
anemet added a comment to D38722: Added Remarks for Loop Versioning LICM Pass.

Thanks for working on this!

Oct 10 2017, 9:05 AM
anemet accepted D38289: [opt-viewer] Don't Decode HTML bytes for Python 2.

Sorry about the delay! I remembered something similar also for Python2 so I wanted to doublecheck. Turns out that was https://reviews.llvm.org/D29802 which is unrelated.

Oct 10 2017, 9:00 AM