This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Change the preferred alignment for char and short
ClosedPublic

Authored by evandro on Jun 15 2016, 3:01 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

evandro updated this revision to Diff 60915.Jun 15 2016, 3:01 PM
evandro retitled this revision from to [AArch64] Change the preferred alignment for char and short.
evandro updated this object.
evandro added a reviewer: t.p.northover.
evandro set the repository for this revision to rL LLVM.

What about code size?

And what CPU did you run the tests on? As far as I know the larger cores don't care about alignment as long as a cache line isn't crossed (which it won't be for the natural alignment).

What about code size?

I observed an insignificant (<0.01%) increase in the code size.

evandro added a comment.EditedJun 16 2016, 8:51 AM

And what CPU did you run the tests on? As far as I know the larger cores don't care about alignment as long as a cache line isn't crossed (which it won't be for the natural alignment).

That's the problem that I noticed, especially with some variables being aggressively accessed in wider chunks (often by library code) crossing cache lines.

Though I'd expect that 64-bit alignment would be the preferred alignment in AArch64, any difference from 32-bit alignment was overall too small to notice.

I tested these changes only on Cortex A57 and Exynos M1 and both benefit from this preferred alignment (depending on the benchmark, A57 more so than M1).

Tests?

Will add a test when updating the patch or before committing it.

evandro updated this revision to Diff 61308.Jun 20 2016, 2:17 PM
evandro edited edge metadata.

Added a test case.

This revision was automatically updated to reflect the committed changes.

Hi Evandro,
Who approved this patch?

Also, we're seeing a ~1.8% regression in SPEC2006/perlbench on Kryo. Runs for the other SPEC2006 benchmarks are in flight. What workloads did you use for testing?

Chad

Also, we're seeing a ~1.8% regression in SPEC2006/perlbench on Kryo. Runs for the other SPEC2006 benchmarks are in flight. What workloads did you use for testing?

I haven't approved yet, nor I've seen Tim do it. I think we better revert it for now until further clarifications come to light.

cheers,
--renato

I haven't approved yet, nor I've seen Tim do it. I think we better revert it for now until further clarifications come to light.

Sounds reasonable to me. Would you like to revert or shall I, Renato?

Meetings all day, feel free to revert, pelase.

Folks,

I took it that Tim approved this patch when he said in an email: "I'm happy for you to go ahead."

I took it that Tim approved this patch when he said in an email: "I'm happy for you to go ahead."

Sorry Evandro, I forgot about that email, now I remembered.

Still, this was a contentious issue, and it did have some bad reactions. I think we need more testing and benchmarking.

At least now we have more data to discuss it on.

cheers,
--renato

I tested on both M1 and A57 using SPEC CPU2000 and proprietary benchmarks. I noticed minor regressions and significant improvements on both targets

By all means, let us discuss it further before reverting this patch.

I tested on both M1 and A57 using SPEC CPU2000 and proprietary benchmarks. I noticed minor regressions and significant improvements on both targets

I've reverted the commits in r274766-r274768. Sorry about that, Evandro. I didn't know Tim approved via email. We should have Kryo numbers shortly, if you can wait.

evandro added a comment.EditedJul 7 2016, 11:30 AM

I've reverted the commits in r274766-r274768. Sorry about that, Evandro. I didn't know Tim approved via email. We should have Kryo numbers shortly, if you can wait.

You don't just revert a two weeks old patch BEFORE tests for one target are in and BEFORE comparing its results with other targets.

The burden of proof now lied with you to revert the patch, but your reverting it put the burden back on me.

Make no mistake, I do not appreciate that.

My apologies Evandro. I know we have a policy that approved patches on the list are also valid, and that this review not being in the "approve" status doesn't count. I should have searched the list for more information.

Chad, maybe re-instate the patch and discuss this on the list would be the best way forward now.

cheers,
--renato

I've reverted the commits in r274766-r274768. Sorry about that, Evandro. I didn't know Tim approved via email. We should have Kryo numbers shortly, if you can wait.

You don't just revert a two weeks old patch BEFORE tests for one target are in and BEFORE comparing its results with other targets.

Please understand the reason I reverted the patch was because I didn't see formal approval. That alone is justification enough.

I apologize I missed Tim's email; I did search the list for an informal LGTM, but I found nothing.

Make no mistake, I do not appreciate that.

Understandable.. Evandro, please make the assumption that everyone is trying to do the right thing. I've seen patches committed without proper approval on too many occasion; I sincerely apologize if you we're caught in the crossfire.

The final results for Spec2006 on Kryo were a net gain of 0.2% geomean, so thank you. That being said, I'll go ahead a recommit the patches.

Chad

@mcrosier,

Indeed, too many assumptions were made here. However, we can certainly agree that not waiting even 15min for a reply of the author of the patch, myself, was precipitated. Hopefully, in the future, we'll be able to avoid such actions on anecdotal information.

I'm glad to learn that the results show benefits on Kryo too.

Thanks for reinstating the patches.

I think some of the confusion here may have been due to the fact that llvm-commits wasn't added as a subscriber to the review. Since it wasn't on the list, few people were probably aware of the patch or its approval. Glad everything is resolved now!