Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/MC/MCObjectStreamer.cpp
Show First 20 Lines • Show All 379 Lines • ▼ Show 20 Lines | void MCObjectStreamer::emitInstructionImpl(const MCInst &Inst, | ||||
Sec->setHasInstructions(true); | Sec->setHasInstructions(true); | ||||
// Now that a machine instruction has been assembled into this section, make | // Now that a machine instruction has been assembled into this section, make | ||||
// a line entry for any .loc directive that has been seen. | // a line entry for any .loc directive that has been seen. | ||||
MCDwarfLineEntry::Make(this, getCurrentSectionOnly()); | MCDwarfLineEntry::Make(this, getCurrentSectionOnly()); | ||||
// If this instruction doesn't need relaxation, just emit it as data. | // If this instruction doesn't need relaxation, just emit it as data. | ||||
MCAssembler &Assembler = getAssembler(); | MCAssembler &Assembler = getAssembler(); | ||||
if (!Assembler.getBackend().mayNeedRelaxation(Inst, STI)) { | MCAsmBackend &Backend = Assembler.getBackend(); | ||||
if (!(Backend.mayNeedRelaxation(Inst, STI) || | |||||
Backend.allowEnhancedRelaxation())) { | |||||
EmitInstToData(Inst, STI); | EmitInstToData(Inst, STI); | ||||
return; | return; | ||||
} | } | ||||
// Otherwise, relax and emit it as data if either: | // Otherwise, relax and emit it as data if either: | ||||
// - The RelaxAll flag was passed | // - The RelaxAll flag was passed | ||||
// - Bundling is enabled and this instruction is inside a bundle-locked | // - Bundling is enabled and this instruction is inside a bundle-locked | ||||
// group. We want to emit all such instructions into the same data | // group. We want to emit all such instructions into the same data | ||||
▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines |