Page MenuHomePhabricator

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

Authored by nickdesaulniers on Tue, Apr 13, 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.Tue, Apr 13, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Apr 13, 3:27 PM
echristo accepted this revision.Fri, Apr 16, 11:32 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Fri, Apr 16, 11:32 AM
MaskRay accepted this revision.Fri, Apr 16, 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.