Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable optimization was not working #1123

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Jun 5, 2024

Issue #, if available:

__asm__ __volatile__("" ::: "memory") doesn't prevent GCC 7.5.0 to optimize those functions on arm64, and result in a test failure

Description of changes:

Use another way to disable optimization.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

return aws_mem_acquire(allocator, size);
}

AWS_NO_INLINE void *s_alloc_2(struct aws_allocator *allocator, size_t size) {
AWS_PREVENT_OPTIMIZATION;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we use this anywhere else? should we just update this macro?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not used anywhere else, and it's working differently than the previous way, we need two macros now one for start disable and another one for end.

But, yeah, it's only used here, so, just got rid of the macro instead.

@TingDaoK TingDaoK enabled auto-merge (squash) June 5, 2024 20:08
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.07%. Comparing base (d2d5da4) to head (494c2af).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1123   +/-   ##
=======================================
  Coverage   83.07%   83.07%           
=======================================
  Files          56       56           
  Lines        5756     5756           
=======================================
  Hits         4782     4782           
  Misses        974      974           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TingDaoK TingDaoK merged commit 4f874ce into main Jun 5, 2024
52 checks passed
@TingDaoK TingDaoK deleted the expilicly-disable-optimization branch June 5, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants