================
@@ -102,21 +238,128 @@ mlir::LogicalResult CIRGenFunction::emitAsmStmt(const
AsmStmt &s) {
// in addition to meeting the conditions listed above.
bool readOnly = true, readNone = true;
- if (s.getNumInputs() != 0 || s.getNumOutputs() != 0) {
+ if (s.getNumInputs() != 0) {
assert(!cir::MissingFeatures::asmInputOperands());
- assert(!cir::MissingFeatures::asmOutputOperands());
- cgm.errorNYI(s.getAsmLoc(), "asm with operands");
+ cgm.errorNYI(srcLoc, "asm with input operands");
}
+ for (unsigned i = 0, e = s.getNumOutputs(); i != e; i++) {
+ TargetInfo::ConstraintInfo &info = outputConstraintInfos[i];
+
+ // Simplify the output constraint.
+ std::string outputConstraint(s.getOutputConstraint(i));
----------------
andykaylor wrote:
Would it be beneficial to declare this string outside the loop and clear it
each iteration? I'm not sure how `std::string` is constructed.
https://github.com/llvm/llvm-project/pull/176006
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits