Index: llvm/utils/TableGen/AsmWriterEmitter.cpp =================================================================== --- llvm/utils/TableGen/AsmWriterEmitter.cpp +++ llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -457,9 +457,14 @@ StringRef ClassName = AsmWriter->getValueAsString("AsmWriterClassName"); bool PassSubtarget = AsmWriter->getValueAsInt("PassSubtarget"); + // This function has some huge switch statements that causing excessive + // compile time in LLVM profile instrumenation build. This print function + // usually is not frequently called in compilation. Here we disable the + // profile instrumenation for this function. O << "/// printInstruction - This method is automatically generated by " "tablegen\n" "/// from the instruction set description.\n" + "__attribute__((no_profile_instrument_function))\n" "void " << Target.getName() << ClassName << "::printInstruction(const MCInst *MI, uint64_t Address, "