Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/ARM/ARMConstantIslandPass.cpp
Show First 20 Lines • Show All 417 Lines • ▼ Show 20 Lines | bool ARMConstantIslands::runOnMachineFunction(MachineFunction &mf) { | ||||
if (isThumb2 && !STI->prefers32BitThumb()) | if (isThumb2 && !STI->prefers32BitThumb()) | ||||
MadeChange |= optimizeThumb2Instructions(); | MadeChange |= optimizeThumb2Instructions(); | ||||
// Shrink 32-bit branch instructions. | // Shrink 32-bit branch instructions. | ||||
if (isThumb && STI->hasV8MBaselineOps()) | if (isThumb && STI->hasV8MBaselineOps()) | ||||
MadeChange |= optimizeThumb2Branches(); | MadeChange |= optimizeThumb2Branches(); | ||||
// Optimize jump tables using TBB / TBH. | // Optimize jump tables using TBB / TBH. | ||||
if (GenerateTBB) | if (GenerateTBB && !STI->genExecuteOnly()) | ||||
MadeChange |= optimizeThumb2JumpTables(); | MadeChange |= optimizeThumb2JumpTables(); | ||||
// After a while, this might be made debug-only, but it is not expensive. | // After a while, this might be made debug-only, but it is not expensive. | ||||
verify(); | verify(); | ||||
// If LR has been forced spilled and no far jump (i.e. BL) has been issued, | // If LR has been forced spilled and no far jump (i.e. BL) has been issued, | ||||
// undo the spill / restore of LR if possible. | // undo the spill / restore of LR if possible. | ||||
if (isThumb && !HasFarJump && AFI->isLRSpilledForFarJump()) | if (isThumb && !HasFarJump && AFI->isLRSpilledForFarJump()) | ||||
▲ Show 20 Lines • Show All 1,824 Lines • Show Last 20 Lines |