This is an archive of the discontinued LLVM Phabricator instance.

[TargetLowering] move "o" and "X" constraint handling to base class
ClosedPublic

Authored by nickdesaulniers on Apr 13 2021, 3:27 PM.

Details

Summary

These constraints are machine agnostic; there's no reason to handle
these per-arch. If arches don't support these constraints, then they
will fail elsewhere during instruction selection. We don't need virtual
calls to look these up; TargetLowering::getInlineAsmMemConstraint should
only be overridden by architectures with additional unique memory
constraints.

Diff Detail

Event Timeline

nickdesaulniers requested review of this revision.Apr 13 2021, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2021, 3:27 PM
echristo accepted this revision.Apr 16 2021, 11:32 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Apr 16 2021, 11:32 AM
MaskRay accepted this revision.Apr 16 2021, 1:05 PM

LGTM. 'o' and 'X' are generic in GCC: https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html#Simple-Constraints
Many of the less used constraints don't have an implementation in LLVM. We add them on an as-needed basis.