-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TargetInstrInfo] enable foldMemoryOperand for InlineAsm (#70743)
foldMemoryOperand looks at pairs of instructions (generally a load to virt reg then use of the virtreg, or def of a virtreg then a store) and attempts to combine them. This can reduce register pressure. A prior commit added the ability to mark such a MachineOperand as foldable. In terms of INLINEASM, this means that "rm" was used (rather than just "r") to denote that the INLINEASM may use a memory operand rather than a register operand. This effectively undoes decisions made by the instruction selection framework. Callers will be added in the register allocation frameworks. This has been tested with all of the above (which will come as follow up patches). Thanks to @topperc who suggested this at last years LLVM US Dev Meeting and @qcolombet who confirmed this was the right approach. Link: #20571
- Loading branch information
1 parent
f99a020
commit 99ee2db
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99ee2db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bisect says that this is failing many ARM tests (see below). I'm going to do a revert. :-(
99ee2db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this was reverted in 42204c9.
The test passes for me BEFORE your revert.
The stack trace you posted doesn't reference code I added; even if inlining were the case I don't see how
TargetLoweringBase::findRepresentativeClass
were to call into anything I added or changed.Wouldn't the presubmit or postsubmit tests have caught this if it was truly something that I regressed? That only you have been able to reproduce this far makes me curious about your environment, not my patch.
99ee2db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#72910
99ee2db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could have been an unrelated patch that caused it and your patch tickled it just enough to make it fail consistently. I ran bisect on my branch and this was the first patch that caused the failure.