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

Missing memoperands prevents ARM load/store folding in a few cases #7901

Closed
stoklund mannequin opened this issue Jun 30, 2010 · 5 comments
Closed

Missing memoperands prevents ARM load/store folding in a few cases #7901

stoklund mannequin opened this issue Jun 30, 2010 · 5 comments
Labels
backend:ARM bugzilla Issues migrated from bugzilla

Comments

@stoklund
Copy link
Mannequin

stoklund mannequin commented Jun 30, 2010

Bugzilla Link 7529
Resolution FIXED
Resolved on Jul 12, 2010 11:44
Version trunk
OS All
CC @asl

Extended Description

Revision 107114 changed the ARMLoadStoreOptimizer pass to not touch loads and stores with missing memoperands. When there is no memoperand to say otherwise, the memory access could be unaligned or volatile.

This caused a small change in code generation - 0.2% of ldms and 0.1% of stms lost across the nightly test suite.

We should check why those loads and stores had no memoperands, and if we are missing some possible optimizations.

@llvmbot
Copy link
Member

llvmbot commented Jul 3, 2010

I've looked into this. The main issue is when the register allocator folded reloads from fixed slots the loads ended up with alignment 1. That's because by default all fixed slots have alignment of 1. This is overly conservative. DAG combiner will infer the correct alignments from stack pointer alignments and frame offset. But at register allocation time we are simply taking the frame object's alignments.

I think the right fix is to make sure the fixed objects have the inferred alignments when they are created. Does anyone see a problem with that?

@llvmbot
Copy link
Member

llvmbot commented Jul 6, 2010

Fixed: 107591. Jakob, please verify.

@stoklund
Copy link
Mannequin Author

stoklund mannequin commented Jul 6, 2010

I think your patch in 107591 is definitely correct, and it should provide more ldm/stm folding, but the original 107114 only changed the behavior for loads and stores without any memoperands.

107591 doesn't add memoperands to to loads and stores that don't have any, right?

@llvmbot
Copy link
Member

llvmbot commented Jul 8, 2010

Right. I think that's the right behavior.

I looked a few changes due to 107114. They all look like they are related to remat of loads from fixed slots. Are there other missing cases?

@stoklund
Copy link
Mannequin Author

stoklund mannequin commented Jul 12, 2010

I think that is al

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
daniel-grumberg pushed a commit to daniel-grumberg/llvm-project that referenced this issue Dec 20, 2023
…as-driver-cache-launcher-test-fix

[clang][CAS] Fix the "CAS/driver-cache-launcher.c" test
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:ARM bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant