Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lib/CodeGen/TailDuplicator.cpp
Show First 20 Lines • Show All 597 Lines • ▼ Show 20 Lines | if (PreRegAlloc && MI.isReturn()) | ||||
return false; | return false; | ||||
// Avoid duplicating calls before register allocation. Calls presents a | // Avoid duplicating calls before register allocation. Calls presents a | ||||
// barrier to register allocation so duplicating them may end up increasing | // barrier to register allocation so duplicating them may end up increasing | ||||
// spills. | // spills. | ||||
if (PreRegAlloc && MI.isCall()) | if (PreRegAlloc && MI.isCall()) | ||||
return false; | return false; | ||||
if (!MI.isPHI() && !MI.isDebugValue()) | if (!MI.isPHI() && !MI.isMetaInstruction()) | ||||
InstrCount += 1; | InstrCount += 1; | ||||
if (InstrCount > MaxDuplicateCount) | if (InstrCount > MaxDuplicateCount) | ||||
return false; | return false; | ||||
} | } | ||||
// Check if any of the successors of TailBB has a PHI node in which the | // Check if any of the successors of TailBB has a PHI node in which the | ||||
// value corresponding to TailBB uses a subregister. | // value corresponding to TailBB uses a subregister. | ||||
// If a phi node uses a register paired with a subregister, the actual | // If a phi node uses a register paired with a subregister, the actual | ||||
▲ Show 20 Lines • Show All 381 Lines • Show Last 20 Lines |