[X86][Haswell][SchedModel] Add architecture specific scheduling models.
[oota-llvm.git] / lib / IR / Mangler.cpp
index bfed3e39f4edb8448001a3d538c79554ae75778b..575141aed85bdf1f74d9283607a278375fd325bc 100644 (file)
@@ -72,6 +72,9 @@ static void AddFastCallStdCallSuffix(raw_ostream &OS, const Function *F,
   unsigned ArgWords = 0;
   for (Function::const_arg_iterator AI = F->arg_begin(), AE = F->arg_end();
        AI != AE; ++AI) {
+    // Skip arguments in registers to handle typical fastcall lowering.
+    if (F->getAttributes().hasAttribute(AI->getArgNo() + 1, Attribute::InReg))
+      continue;
     Type *Ty = AI->getType();
     // 'Dereference' type in case of byval or inalloca parameter attribute.
     if (AI->hasByValOrInAllocaAttr())