LLVM: lib/CodeGen/TargetPassConfig.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

53#include

54#include

55#include

56

57using namespace llvm;

58

61 cl::desc("Enable interprocedural register allocation "

62 "to reduce load/store at procedure calls."));

64 cl::desc("Disable Post Regalloc Scheduler"));

66 cl::desc("Disable branch folding"));

68 cl::desc("Disable tail duplication"));

70 cl::desc("Disable pre-register allocation tail duplication"));

74 cl::Hidden, cl::desc("Collect probability-driven block placement stats"));

76 cl::desc("Disable Stack Slot Coloring"));

78 cl::desc("Disable Machine Dead Code Elimination"));

80 cl::desc("Disable Early If-conversion"));

82 cl::desc("Disable Machine LICM"));

84 cl::desc("Disable Machine Common Subexpression Elimination"));

87 cl::desc("Enable optimized register allocation compilation path."));

90 cl::desc("Disable Machine LICM"));

92 cl::desc("Disable Machine Sinking"));

95 cl::desc("Disable PostRA Machine Sinking"));

97 cl::desc("Disable Loop Strength Reduction Pass"));

101 cl::desc("Disable Codegen Prepare"));

103 cl::desc("Disable Copy Propagation pass"));

107 "disable-atexit-based-global-dtor-lowering", cl::Hidden,

108 cl::desc("For MachO, disable atexit()-based global destructor lowering"));

110 "enable-implicit-null-checks",

111 cl::desc("Fold null checks into faulting memory operations"),

114 cl::desc("Disable MergeICmps Pass"),

118 cl::desc("Print LLVM IR input to isel pass"));

121 cl::desc("Verify generated machine code"));

124 cl::desc("Debugify MIR before and Strip debug after "

125 "each pass except those known to be unsafe "

126 "when debug info is present"));

128 "debugify-check-and-strip-all-safe", cl::Hidden,

130 "Debugify MIR before, by checking and stripping the debug info after, "

131 "each pass except those known to be unsafe when debug info is "

132 "present"));

133

135 "enable-machine-outliner", cl::desc("Enable the machine outliner"),

138 "Run on all functions guaranteed to be beneficial"),

139 clEnumValN(RunOutliner::NeverOutline, "never",

140 "Disable all outlining"),

141

142 clEnumValN(RunOutliner::AlwaysOutline, "", "")));

144 "enable-global-merge-func", cl::Hidden,

145 cl::desc("Enable global merge functions that are based on hash function"));

146

147

148

150 cl::desc("Disable the CFI fixup pass"));

151

152

153

156 cl::desc("Enable the \"fast\" instruction selector"));

157

160 cl::desc("Enable the \"global\" instruction selector"));

161

162

163

166 cl::desc("Print machine instrs after ISel"));

167

170 cl::desc("Enable abort calls when \"global\" instruction selection "

171 "fails to lower/select an instruction"),

173 clEnumValN(GlobalISelAbortMode::Disable, "0", "Disable the abort"),

174 clEnumValN(GlobalISelAbortMode::Enable, "1", "Enable the abort"),

175 clEnumValN(GlobalISelAbortMode::DisableWithDiag, "2",

176 "Disable the abort but emit a diagnostic on failure")));

177

178

179

182 cl::desc("Disable MIRProfileLoader before RegAlloc"));

183

184

187 cl::desc("Disable MIRProfileLoader before BlockPlacement"));

188

192

195 cl::desc("Flow Sensitive profile remapping file name."), cl::Hidden);

196

197

198

199

200

201

205 "Run MachineScheduler post regalloc (independent of preRA sched)"));

206

207

209 cl::desc("Run live interval analysis earlier in the pipeline"));

210

212 "disable-replace-with-vec-lib", cl::Hidden,

213 cl::desc("Disable replace with vector math call pass"));

214

215

216

217

222

225 cl::desc("Resume compilation after a specific pass"),

227

230 cl::desc("Resume compilation before a specific pass"),

232

235 cl::desc("Stop compilation after a specific pass"),

237

240 cl::desc("Stop compilation before a specific pass"),

242

243

245 "enable-split-machine-functions", cl::Hidden,

246 cl::desc("Split out cold blocks from machine functions based on profile "

247 "information."));

248

249

252 cl::desc("Disable the expand reduction intrinsics pass from running"));

253

254

257 cl::desc("Disable the select-optimization pass from running"));

258

259

262 cl::desc("Enable garbage-collecting empty basic blocks"));

263

264

265

266

267

269 bool Override) {

270 if (Override)

272 return PassID;

273}

274

275

276

277

278

279

280

281

282

283

284

285

286

291

294

297

300

303

306

309

312

315

318

321

324

327

330

331 return TargetID;

332}

333

334

335

339 const std::optional &PGOOpt = TM->getPGOOption();

341 return std::string();

342 return PGOOpt->ProfileFile;

343}

344

345

346

350 const std::optional &PGOOpt = TM->getPGOOption();

352 return std::string();

353 return PGOOpt->ProfileRemappingFile;

354}

355

356

357

358

359

361 "Target Pass Configuration", false, false)

363

364namespace {

365

369

371 : TargetPassID(TargetPassID), InsertedPassID(InsertedPassID) {}

372

374 assert(InsertedPassID.isValid() && "Illegal Pass ID!");

378 assert(NP && "Pass ID not registered");

379 return NP;

380 }

381};

382

383}

384

385namespace llvm {

386

388

390public:

391

392

393

394

395

396

397

399

400

401

403};

404

405}

406

407

410}

411

414 return nullptr;

415

418 if (!PI)

420 Twine("\" pass is not registered."));

421 return PI;

422}

423

427}

428

429static std::pair<StringRef, unsigned>

432 std::tie(Name, InstanceNumStr) = PassName.split(',');

433

434 unsigned InstanceNum = 0;

435 if (!InstanceNumStr.empty() && InstanceNumStr.getAsInteger(10, InstanceNum))

437

438 return std::make_pair(Name, InstanceNum);

439}

440

441void TargetPassConfig::setStartStopPasses() {

443 std::tie(StartBeforeName, StartBeforeInstanceNum) =

445

447 std::tie(StartAfterName, StartAfterInstanceNum) =

449

451 std::tie(StopBeforeName, StopBeforeInstanceNum)

453

455 std::tie(StopAfterName, StopAfterInstanceNum)

457

462 if (StartBefore && StartAfter)

465 if (StopBefore && StopAfter)

468 Started = (StartAfter == nullptr) && (StartBefore == nullptr);

469}

470

473

474#define SET_OPTION(Option) \

475 if (Option.getNumOccurrences()) \

476 Opt.Option = Option;

477

489

490#define SET_BOOLEAN_OPTION(Option) Opt.Option = Option;

491

510

511 return Opt;

512}

513

516

517

519

520#define DISABLE_PASS(Option, Name) \

521 if (Option && P.contains(#Name)) \

522 return false;

537

538 return true;

539 });

540}

541

544 auto [StartBefore, StartBeforeInstanceNum] =

546 auto [StartAfter, StartAfterInstanceNum] =

548 auto [StopBefore, StopBeforeInstanceNum] =

550 auto [StopAfter, StopAfterInstanceNum] =

552

553 if (!StartBefore.empty() && !StartAfter.empty())

554 return make_error(

556 std::make_error_code(std::errc::invalid_argument));

557 if (!StopBefore.empty() && !StopAfter.empty())

558 return make_error(

560 std::make_error_code(std::errc::invalid_argument));

561

563 Result.StartPass = StartBefore.empty() ? StartAfter : StartBefore;

564 Result.StopPass = StopBefore.empty() ? StopAfter : StopBefore;

565 Result.StartInstanceNum =

566 StartBefore.empty() ? StartAfterInstanceNum : StartBeforeInstanceNum;

567 Result.StopInstanceNum =

568 StopBefore.empty() ? StopAfterInstanceNum : StopBeforeInstanceNum;

569 Result.StartAfter = !StartAfter.empty();

570 Result.StopAfter = !StopAfter.empty();

571 Result.StartInstanceNum += Result.StartInstanceNum == 0;

572 Result.StopInstanceNum += Result.StopInstanceNum == 0;

573 return Result;

574}

575

576

577

581

582

583

585

586

589

592 else {

593

595 }

596

599

602

603 setStartStopPasses();

604}

605

608}

609

610

614 TargetPassID != InsertedPassID.getID()) ||

617 "Insert a pass after itself!");

619}

620

621

622

623

624

628}

629

632 report_fatal_error("Trying to construct TargetPassConfig without a target "

633 "machine. Scheduling a CodeGen pass without a target "

634 "triple set?");

635}

636

639}

640

644}

645

648 return std::string();

649 std::string Res;

654 bool IsFirst = true;

655 for (int Idx = 0; Idx < 4; ++Idx)

656 if (!PassNames[Idx]->empty()) {

657 if (!IsFirst)

658 Res += " and ";

659 IsFirst = false;

660 Res += OptNames[Idx];

661 }

662 return Res;

663}

664

665

668 Opt = Val;

669}

670

674}

675

680 return ID;

681 return I->second;

682}

683

689}

690

691

692

693

694

695

698

699

700

701

702

704

705 if (StartBefore == PassID && StartBeforeCount++ == StartBeforeInstanceNum)

706 Started = true;

707 if (StopBefore == PassID && StopBeforeCount++ == StopBeforeInstanceNum)

708 Stopped = true;

709 if (Started && !Stopped) {

710 if (AddingMachinePasses) {

711

712 std::string Banner =

713 std::string("After ") + std::string(P->getPassName());

717 } else {

719 }

720

721

723 if (IP.TargetPassID == PassID)

724 addPass(IP.getInsertedPass());

725 } else {

726 delete P;

727 }

728

729 if (StopAfter == PassID && StopAfterCount++ == StopAfterInstanceNum)

730 Stopped = true;

731

732 if (StartAfter == PassID && StartAfterCount++ == StartAfterInstanceNum)

733 Started = true;

734 if (Stopped && !Started)

735 report_fatal_error("Cannot stop compilation after pass that is not run");

736}

737

738

739

740

741

742

747 return nullptr;

748

752 else {

754 if (P)

756 }

758 addPass(P);

759

760 return FinalID;

761}

762

766}

767

771}

772

775#ifdef EXPENSIVE_CHECKS

778#endif

781}

782

785}

786

789}

790

793}

794

796 if (AllowDebugify && DebugifyIsSafe &&

800}

801

803 if (DebugifyIsSafe) {

809 }

811}

812

813

814

816

817

820

822

823

824

825

829

830

836 }

837

838

839

840

841

845 }

846

847

848

851

852

853

857

858

860

861

864

867

870

871

873

874

875

876

878

879

880

883

884

887

890}

891

892

893

896 assert(MCAI && "No MCAsmInfo");

899

900

901

902

903

904

906 [[fallthrough]];

912 break;

914

915

916

919 break;

921

922

923

924

927 break;

930

931

933 break;

934 }

935}

936

937

938

942}

943

944

945

948

949

952

955

957

958

959

962

965 dbgs(), "\n\n*** Final LLVM Code input to ISel ***\n"));

966

967

968

971}

972

974

976

977

979 SelectorType Selector;

980

982 Selector = SelectorType::FastISel;

986 Selector = SelectorType::GlobalISel;

989 Selector = SelectorType::FastISel;

990 else

991 Selector = SelectorType::SelectionDAG;

992

993

994 if (Selector == SelectorType::FastISel) {

997 } else if (Selector == SelectorType::GlobalISel) {

1000 }

1001

1002

1003

1004

1005

1006

1007

1008

1009

1010

1013 DebugifyIsSafe = false;

1014

1015

1016 if (Selector == SelectorType::GlobalISel) {

1017 SaveAndRestore SavedAddingMachinePasses(AddingMachinePasses, true);

1019 return true;

1020

1022

1024 return true;

1025

1026

1027

1029

1031 return true;

1032

1034

1036 return true;

1037

1038

1041

1042

1043

1045 return true;

1046

1048 return true;

1049

1050

1051

1053

1054

1056

1057 return false;

1058}

1059

1063

1072

1074}

1075

1076

1081 cl::desc("Register allocator to use"));

1082

1083

1084

1085

1086

1087

1088

1089

1090

1091

1092

1093

1094

1095

1096

1097

1098

1099

1100

1102 AddingMachinePasses = true;

1103

1104

1107 } else {

1108

1109

1111 }

1112

1115

1116

1118

1119

1120

1121

1122 DebugifyIsSafe = false;

1123

1124

1125

1133 nullptr));

1134 }

1135

1136

1137

1140 else

1142

1143

1145

1147

1149

1150

1154 }

1155

1156

1157

1160

1161

1164

1165

1167

1168

1170

1173

1174

1175

1176

1181 else

1183 }

1184

1185

1187

1188

1191

1192

1194

1197

1199

1201

1202

1204

1205

1206

1208

1213

1217 bool RunOnAllFunctions =

1219 bool AddOutliner =

1221 if (AddOutliner)

1223 }

1224

1227

1231

1232

1233

1234

1235

1236

1240 if (!ProfileFile.empty()) {

1245 } else {

1246

1247

1249 << "Using AutoFDO without FSDiscriminator for MFS may regress "

1250 "performance.\n";

1251 }

1252 }

1254 }

1255

1256

1263 }

1265 }

1266

1268

1271

1273

1274

1276

1277 AddingMachinePasses = false;

1278}

1279

1280

1282

1284

1285

1286

1288

1289

1290

1292

1293

1294

1296

1297

1298

1299

1300

1302

1303

1304

1305

1307

1310

1312

1314

1315

1317}

1318

1319

1320

1321

1322

1329 }

1331}

1332

1333

1334

1336

1339 "pick register allocator based on -O option",

1341

1345}

1346

1347

1348

1349

1350

1351

1352

1353

1354

1356 if (Optimized)

1358 else

1360}

1361

1362

1363

1364

1365

1366

1367

1368

1369

1370

1372

1375

1378 return Ctor();

1379

1380

1382}

1383

1387}

1388

1392 report_fatal_error("Must use fast (default) register allocator for unoptimized regalloc.");

1393

1395

1396

1397

1399 return true;

1400}

1401

1403

1405

1406

1408

1409

1411

1412

1413

1415 return true;

1416}

1417

1418

1419

1421 return RegAlloc.getNumOccurrences() == 0;

1422}

1423

1424

1425

1429

1431}

1432

1433

1434

1435

1438

1440

1442

1443

1444

1445

1446

1447

1448

1449

1450

1451

1452

1455

1456

1459

1460

1463

1466

1467

1468

1469

1471

1472

1474

1476

1478

1479

1480

1482

1483

1484

1486

1487

1488

1489

1491 }

1492}

1493

1494

1495

1496

1497

1498

1500

1502

1503

1505

1506

1507

1508

1509

1512

1513

1515}

1516

1517

1520 return true;

1521}

1522

1523

1532 nullptr));

1533 }

1535

1538 }

1539}

1540

1541

1542

1543

1546}

1547

1550}

1551

1553 return true;

1554}

1555

1557 return std::make_unique();

1558}

This is the interface for LLVM's primary stateless and local alias analysis.

#define clEnumValN(ENUMVAL, FLAGNAME, DESC)

Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx

This file defines the DenseMap class.

This file contains an interface for creating legacy passes to print out IR in various granularities.

ppc ctr loops PowerPC CTR Loops Verify

PassInstrumentationCallbacks PIC

This file defines the Pass Instrumentation classes that provide instrumentation points into the pass ...

#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

This file provides utility classes that use RAII to save and restore values.

This is the interface for a metadata-based scoped no-alias analysis.

This file defines the SmallVector class.

static const char StopAfterOptName[]

static cl::opt< bool > DisableExpandReductions("disable-expand-reductions", cl::init(false), cl::Hidden, cl::desc("Disable the expand reduction intrinsics pass from running"))

Disable the expand reductions pass for testing.

static cl::opt< bool > EnableImplicitNullChecks("enable-implicit-null-checks", cl::desc("Fold null checks into faulting memory operations"), cl::init(false), cl::Hidden)

static cl::opt< bool > DisableMachineSink("disable-machine-sink", cl::Hidden, cl::desc("Disable Machine Sinking"))

static cl::opt< cl::boolOrDefault > DebugifyAndStripAll("debugify-and-strip-all-safe", cl::Hidden, cl::desc("Debugify MIR before and Strip debug after " "each pass except those known to be unsafe " "when debug info is present"))

static llvm::once_flag InitializeDefaultRegisterAllocatorFlag

A dummy default pass factory indicates whether the register allocator is overridden on the command li...

static cl::opt< bool > DisableAtExitBasedGlobalDtorLowering("disable-atexit-based-global-dtor-lowering", cl::Hidden, cl::desc("For MachO, disable atexit()-based global destructor lowering"))

static cl::opt< RegisterRegAlloc::FunctionPassCtor, false, RegisterPassParser< RegisterRegAlloc > > RegAlloc("regalloc", cl::Hidden, cl::init(&useDefaultRegisterAllocator), cl::desc("Register allocator to use"))

static cl::opt< bool > PrintISelInput("print-isel-input", cl::Hidden, cl::desc("Print LLVM IR input to isel pass"))

static FunctionPass * useDefaultRegisterAllocator()

-regalloc=... command line option.

static cl::opt< bool > DisablePostRASched("disable-post-ra", cl::Hidden, cl::desc("Disable Post Regalloc Scheduler"))

static cl::opt< bool > EnableBlockPlacementStats("enable-block-placement-stats", cl::Hidden, cl::desc("Collect probability-driven block placement stats"))

static cl::opt< bool > DisableMachineDCE("disable-machine-dce", cl::Hidden, cl::desc("Disable Machine Dead Code Elimination"))

static std::string getFSRemappingFile(const TargetMachine *TM)

static const char StopBeforeOptName[]

static AnalysisID getPassIDFromName(StringRef PassName)

static cl::opt< bool > DisableEarlyIfConversion("disable-early-ifcvt", cl::Hidden, cl::desc("Disable Early If-conversion"))

static cl::opt< bool > DisableReplaceWithVecLib("disable-replace-with-vec-lib", cl::Hidden, cl::desc("Disable replace with vector math call pass"))

static cl::opt< bool > EnableMachineFunctionSplitter("enable-split-machine-functions", cl::Hidden, cl::desc("Split out cold blocks from machine functions based on profile " "information."))

Enable the machine function splitter pass.

static IdentifyingPassPtr overridePass(AnalysisID StandardID, IdentifyingPassPtr TargetID)

Allow standard passes to be disabled by the command line, regardless of who is adding the pass.

static std::pair< StringRef, unsigned > getPassNameAndInstanceNum(StringRef PassName)

static cl::opt< bool > PrintAfterISel("print-after-isel", cl::init(false), cl::Hidden, cl::desc("Print machine instrs after ISel"))

static cl::opt< cl::boolOrDefault > VerifyMachineCode("verify-machineinstrs", cl::Hidden, cl::desc("Verify generated machine code"))

static cl::opt< bool > DisablePartialLibcallInlining("disable-partial-libcall-inlining", cl::Hidden, cl::desc("Disable Partial Libcall Inlining"))

#define SET_BOOLEAN_OPTION(Option)

static cl::opt< std::string > StartAfterOpt(StringRef(StartAfterOptName), cl::desc("Resume compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)

static cl::opt< bool > DisableBlockPlacement("disable-block-placement", cl::Hidden, cl::desc("Disable probability-driven block placement"))

static cl::opt< bool > DisableRAFSProfileLoader("disable-ra-fsprofile-loader", cl::init(false), cl::Hidden, cl::desc("Disable MIRProfileLoader before RegAlloc"))

static cl::opt< std::string > StopAfterOpt(StringRef(StopAfterOptName), cl::desc("Stop compilation after a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)

static void initializeDefaultRegisterAllocatorOnce()

static cl::opt< bool > DisableSelectOptimize("disable-select-optimize", cl::init(true), cl::Hidden, cl::desc("Disable the select-optimization pass from running"))

Disable the select optimization pass.

static cl::opt< std::string > FSRemappingFile("fs-remapping-file", cl::init(""), cl::value_desc("filename"), cl::desc("Flow Sensitive profile remapping file name."), cl::Hidden)

static cl::opt< bool > DisableCFIFixup("disable-cfi-fixup", cl::Hidden, cl::desc("Disable the CFI fixup pass"))

static cl::opt< bool > DisablePostRAMachineLICM("disable-postra-machine-licm", cl::Hidden, cl::desc("Disable Machine LICM"))

static const char StartBeforeOptName[]

static const PassInfo * getPassInfo(StringRef PassName)

static cl::opt< bool > EarlyLiveIntervals("early-live-intervals", cl::Hidden, cl::desc("Run live interval analysis earlier in the pipeline"))

static cl::opt< bool > DisableMachineLICM("disable-machine-licm", cl::Hidden, cl::desc("Disable Machine LICM"))

static cl::opt< cl::boolOrDefault > EnableGlobalISelOption("global-isel", cl::Hidden, cl::desc("Enable the \"global\" instruction selector"))

static cl::opt< bool > DisableTailDuplicate("disable-tail-duplicate", cl::Hidden, cl::desc("Disable tail duplication"))

static cl::opt< bool > DisablePostRAMachineSink("disable-postra-machine-sink", cl::Hidden, cl::desc("Disable PostRA Machine Sinking"))

static const char StartAfterOptName[]

Option names for limiting the codegen pipeline.

static cl::opt< bool > EnableIPRA("enable-ipra", cl::init(false), cl::Hidden, cl::desc("Enable interprocedural register allocation " "to reduce load/store at procedure calls."))

static cl::opt< bool > DisableCGP("disable-cgp", cl::Hidden, cl::desc("Disable Codegen Prepare"))

static std::string getFSProfileFile(const TargetMachine *TM)

static cl::opt< std::string > StartBeforeOpt(StringRef(StartBeforeOptName), cl::desc("Resume compilation before a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)

static IdentifyingPassPtr applyDisable(IdentifyingPassPtr PassID, bool Override)

Allow standard passes to be disabled by command line options.

static cl::opt< bool > GCEmptyBlocks("gc-empty-basic-blocks", cl::init(false), cl::Hidden, cl::desc("Enable garbage-collecting empty basic blocks"))

Enable garbage-collecting empty basic blocks.

static cl::opt< GlobalISelAbortMode > EnableGlobalISelAbort("global-isel-abort", cl::Hidden, cl::desc("Enable abort calls when \"global\" instruction selection " "fails to lower/select an instruction"), cl::values(clEnumValN(GlobalISelAbortMode::Disable, "0", "Disable the abort"), clEnumValN(GlobalISelAbortMode::Enable, "1", "Enable the abort"), clEnumValN(GlobalISelAbortMode::DisableWithDiag, "2", "Disable the abort but emit a diagnostic on failure")))

static cl::opt< bool > DisableEarlyTailDup("disable-early-taildup", cl::Hidden, cl::desc("Disable pre-register allocation tail duplication"))

static cl::opt< bool > DisableConstantHoisting("disable-constant-hoisting", cl::Hidden, cl::desc("Disable ConstantHoisting"))

static cl::opt< cl::boolOrDefault > EnableFastISelOption("fast-isel", cl::Hidden, cl::desc("Enable the \"fast\" instruction selector"))

static cl::opt< bool > DisableSSC("disable-ssc", cl::Hidden, cl::desc("Disable Stack Slot Coloring"))

static cl::opt< bool > EnableGlobalMergeFunc("enable-global-merge-func", cl::Hidden, cl::desc("Enable global merge functions that are based on hash function"))

static cl::opt< bool > DisableBranchFold("disable-branch-fold", cl::Hidden, cl::desc("Disable branch folding"))

#define DISABLE_PASS(Option, Name)

static RegisterRegAlloc defaultRegAlloc("default", "pick register allocator based on -O option", useDefaultRegisterAllocator)

static cl::opt< std::string > StopBeforeOpt(StringRef(StopBeforeOptName), cl::desc("Stop compilation before a specific pass"), cl::value_desc("pass-name"), cl::init(""), cl::Hidden)

static cl::opt< bool > DisableMachineCSE("disable-machine-cse", cl::Hidden, cl::desc("Disable Machine Common Subexpression Elimination"))

static cl::opt< bool > DisableLayoutFSProfileLoader("disable-layout-fsprofile-loader", cl::init(false), cl::Hidden, cl::desc("Disable MIRProfileLoader before BlockPlacement"))

static cl::opt< bool > MISchedPostRA("misched-postra", cl::Hidden, cl::desc("Run MachineScheduler post regalloc (independent of preRA sched)"))

static cl::opt< bool > DisableMergeICmps("disable-mergeicmps", cl::desc("Disable MergeICmps Pass"), cl::init(false), cl::Hidden)

static cl::opt< RunOutliner > EnableMachineOutliner("enable-machine-outliner", cl::desc("Enable the machine outliner"), cl::Hidden, cl::ValueOptional, cl::init(RunOutliner::TargetDefault), cl::values(clEnumValN(RunOutliner::AlwaysOutline, "always", "Run on all functions guaranteed to be beneficial"), clEnumValN(RunOutliner::NeverOutline, "never", "Disable all outlining"), clEnumValN(RunOutliner::AlwaysOutline, "", "")))

static cl::opt< bool > DisableCopyProp("disable-copyprop", cl::Hidden, cl::desc("Disable Copy Propagation pass"))

static cl::opt< cl::boolOrDefault > OptimizeRegAlloc("optimize-regalloc", cl::Hidden, cl::desc("Enable optimized register allocation compilation path."))

static cl::opt< bool > DisableLSR("disable-lsr", cl::Hidden, cl::desc("Disable Loop Strength Reduction Pass"))

static cl::opt< std::string > FSProfileFile("fs-profile-file", cl::init(""), cl::value_desc("filename"), cl::desc("Flow Sensitive profile file name."), cl::Hidden)

static cl::opt< cl::boolOrDefault > DebugifyCheckAndStripAll("debugify-check-and-strip-all-safe", cl::Hidden, cl::desc("Debugify MIR before, by checking and stripping the debug info after, " "each pass except those known to be unsafe when debug info is " "present"))

#define SET_OPTION(Option)

Target-Independent Code Generator Pass Configuration Options pass.

This pass exposes codegen information to IR-level passes.

This is the interface for a metadata-based TBAA.

Defines the virtual file system interface vfs::FileSystem.

static const char PassName[]

virtual TargetPassConfig * createPassConfig(PassManagerBase &PM) override

Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...

This pass is required by interprocedural register allocation.

Tagged union holding either a T or a Error.

This is a fast-path instruction selection class that generates poor code and doesn't support illegal ...

FunctionPass class - This class is used to implement most global optimizations.

Discriminated union of Pass ID types.

Pass * getInstance() const

ImmutablePass class - This class is used to provide information that does not need to be run.

This class is intended to be used as a base class for asm properties and features specific to the tar...

ExceptionHandling getExceptionHandlingType() const

DenseMap< AnalysisID, IdentifyingPassPtr > TargetPasses

SmallVector< InsertedPass, 4 > InsertedPasses

Store the pairs of <AnalysisID, AnalysisID> of which the second pass is inserted after each instance ...

PassInfo class - An instance of this class exists for every pass known by the system,...

const void * getTypeInfo() const

getTypeInfo - Return the id object for the pass... TODO : Rename

PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...

static PassRegistry * getPassRegistry()

getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...

const PassInfo * getPassInfo(const void *TI) const

getPassInfo - Look up a pass' corresponding PassInfo, indexed by the pass' type identifier (&MyPass::...

Pass interface - Implemented by all 'passes'.

static Pass * createPass(AnalysisID ID)

AnalysisID getPassID() const

getPassID - Return the PassID number that corresponds to this pass.

RegisterPassParser class - Handle the addition of new machine passes.

static FunctionPassCtor getDefault()

static void setDefault(FunctionPassCtor C)

FunctionPass *(*)() FunctionPassCtor

This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...

reference emplace_back(ArgTypes &&... Args)

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

StringRef - Represent a constant reference to a string, i.e.

bool getAsInteger(unsigned Radix, T &Result) const

Parse the current string as an integer of the specified radix.

constexpr bool empty() const

empty - Check if the string is empty.

Primary interface to the complete machine description for the target machine.

CodeGenOptLevel getOptLevel() const

Returns the optimization level: None, Less, Default, or Aggressive.

const Triple & getTargetTriple() const

void setFastISel(bool Enable)

const MemoryBuffer * getBBSectionsFuncListBuf() const

Get the list of functions and basic block ids that need unique sections.

bool useEmulatedTLS() const

Returns true if this target uses emulated TLS.

virtual bool targetSchedulesPostRAScheduling() const

True if subtarget inserts the final scheduling pass on its own.

bool requiresStructuredCFG() const

virtual bool isMachineVerifierClean() const

Returns true if the target is expected to pass all machine verifier checks.

void setGlobalISel(bool Enable)

TargetIRAnalysis getTargetIRAnalysis() const

Get a TargetIRAnalysis appropriate for the target.

bool getO0WantsFastISel()

void setO0WantsFastISel(bool Enable)

virtual bool useIPRA() const

True if the target wants to use interprocedural register allocation by default.

llvm::BasicBlockSection getBBSectionsType() const

If basic blocks should be emitted into their own section, corresponding to -fbasic-block-sections.

const MCAsmInfo * getMCAsmInfo() const

Return target specific asm information.

unsigned EnableMachineOutliner

Enables the MachineOutliner pass.

GlobalISelAbortMode GlobalISelAbort

EnableGlobalISelAbort - Control abort behaviour when global instruction selection fails to lower/sele...

unsigned EnableCFIFixup

Enable the CFIFixup pass.

unsigned SupportsDefaultOutlining

Set if the target supports default outlining behaviour.

unsigned EnableMachineFunctionSplitter

Enables the MachineFunctionSplitter pass.

unsigned EnableIPRA

This flag enables InterProcedural Register Allocation (IPRA).

unsigned EnableGlobalISel

EnableGlobalISel - This flag enables global instruction selection.

Target-Independent Code Generator Pass Configuration Options.

bool usingDefaultRegAlloc() const

Return true if the default global register allocator is in use and has not be overriden on the comman...

bool requiresCodeGenSCCOrder() const

void addCheckDebugPass()

Add a pass to check synthesized debug info for MIR.

virtual void addPreLegalizeMachineIR()

This method may be implemented by targets that want to run passes immediately before legalization.

void addPrintPass(const std::string &Banner)

Add a pass to print the machine function if printing is enabled.

virtual void addPreEmitPass2()

Targets may add passes immediately before machine code is emitted in this callback.

virtual std::unique_ptr< CSEConfigBase > getCSEConfig() const

Returns the CSEConfig object to use for the current optimization level.

bool EnableLoopTermFold

Enable LoopTermFold immediately after LSR.

void printAndVerify(const std::string &Banner)

printAndVerify - Add a pass to dump then verify the machine function, if those steps are enabled.

static bool hasLimitedCodeGenPipeline()

Returns true if one of the -start-after, -start-before, -stop-after or -stop-before options is set.

static Expected< StartStopInfo > getStartStopInfo(PassInstrumentationCallbacks &PIC)

Returns pass name in -stop-before or -stop-after NOTE: New pass manager migration only.

~TargetPassConfig() override

virtual void addCodeGenPrepare()

Add pass to prepare the LLVM IR for code generation.

void insertPass(AnalysisID TargetPassID, IdentifyingPassPtr InsertedPassID)

Insert InsertedPassID pass after TargetPassID pass.

void addMachinePostPasses(const std::string &Banner)

Add standard passes after a pass that has just been added.

virtual void addPreSched2()

This method may be implemented by targets that want to run passes after prolog-epilog insertion and b...

virtual bool isGISelCSEEnabled() const

Check whether continuous CSE should be enabled in GISel passes.

virtual bool addILPOpts()

Add passes that optimize instruction level parallelism for out-of-order targets.

virtual void addPostRegAlloc()

This method may be implemented by targets that want to run passes after register allocation pass pipe...

void addDebugifyPass()

Add a pass to add synthesized debug info to the MIR.

virtual bool addInstSelector()

addInstSelector - This method should install an instruction selector pass, which converts from LLVM c...

CodeGenOptLevel getOptLevel() const

virtual bool addPreISel()

Methods with trivial inline returns are convenient points in the common codegen pass pipeline where t...

void setOpt(bool &Opt, bool Val)

virtual void addBlockPlacement()

Add standard basic block placement passes.

virtual FunctionPass * createRegAllocPass(bool Optimized)

addMachinePasses helper to create the target-selected or overriden regalloc pass.

virtual void addPostBBSections()

This pass may be implemented by targets that want to run passes immediately after basic block section...

virtual void addOptimizedRegAlloc()

addOptimizedRegAlloc - Add passes related to register allocation.

virtual bool addRegAssignAndRewriteFast()

Add core register allocator passes which do the actual register assignment and rewriting.

virtual void addPreEmitPass()

This pass may be implemented by targets that want to run passes immediately before machine code is em...

bool isGlobalISelAbortEnabled() const

Check whether or not GlobalISel should abort on error.

bool getOptimizeRegAlloc() const

Return true if the optimized regalloc pipeline is enabled.

bool isCustomizedRegAlloc()

Return true if register allocator is specified by -regalloc=override.

virtual void addPreRegBankSelect()

This method may be implemented by targets that want to run passes immediately before the register ban...

virtual bool reportDiagnosticWhenGlobalISelFallback() const

Check whether or not a diagnostic should be emitted when GlobalISel uses the fallback path.

virtual bool addPreRewrite()

addPreRewrite - Add passes to the optimized register allocation pipeline after register allocation is...

virtual bool addRegBankSelect()

This method should install a register bank selector pass, which assigns register banks to virtual reg...

void setRequiresCodeGenSCCOrder(bool Enable=true)

virtual void addMachineLateOptimization()

Add passes that optimize machine instructions after register allocation.

virtual void addMachinePasses()

Add the complete, standard set of LLVM CodeGen passes.

virtual void addIRPasses()

Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...

virtual void addPreGlobalInstructionSelect()

This method may be implemented by targets that want to run passes immediately before the (global) ins...

virtual void addFastRegAlloc()

addFastRegAlloc - Add the minimum set of target-independent passes that are required for fast registe...

virtual bool addLegalizeMachineIR()

This method should install a legalize pass, which converts the instruction sequence into one that can...

virtual void addMachineSSAOptimization()

addMachineSSAOptimization - Add standard passes that optimize machine instructions in SSA form.

void substitutePass(AnalysisID StandardID, IdentifyingPassPtr TargetID)

Allow the target to override a specific pass without overriding the pass pipeline.

virtual bool addRegAssignAndRewriteOptimized()

virtual bool addGlobalInstructionSelect()

This method should install a (global) instruction selector pass, which converts possibly generic inst...

virtual void addPreRegAlloc()

This method may be implemented by targets that want to run passes immediately before register allocat...

static std::string getLimitedCodeGenPipelineReason()

If hasLimitedCodeGenPipeline is true, this method returns a string with the name of the options that ...

AnalysisID addPass(AnalysisID PassID)

Utilities for targets to add passes to the pass manager.

void addPassesToHandleExceptions()

Add passes to lower exception handling for the code generator.

void addStripDebugPass()

Add a pass to remove debug info from the MIR.

bool isPassSubstitutedOrOverridden(AnalysisID ID) const

Return true if the pass has been substituted by the target or overridden on the command line.

bool addCoreISelPasses()

Add the actual instruction selection passes.

virtual void addISelPrepare()

Add common passes that perform LLVM IR to IR transforms in preparation for instruction selection.

static bool willCompleteCodeGenPipeline()

Returns true if none of the -stop-before and -stop-after options is set.

void addMachinePrePasses(bool AllowDebugify=true)

Add standard passes before a pass that's about to be added.

virtual bool addGCPasses()

addGCPasses - Add late codegen passes that analyze code for garbage collection.

virtual bool addIRTranslator()

This method should install an IR translator pass, which converts from LLVM code to machine instructio...

void addVerifyPass(const std::string &Banner)

Add a pass to perform basic verification of the machine function if verification is enabled.

virtual FunctionPass * createTargetRegisterAllocator(bool Optimized)

createTargetRegisterAllocator - Create the register allocator pass for this target at the current opt...

virtual bool addPostFastRegAllocRewrite()

addPostFastRegAllocRewrite - Add passes to the optimized register allocation pipeline after fast regi...

IdentifyingPassPtr getPassSubstitution(AnalysisID StandardID) const

Return the pass substituted for StandardID by the target.

bool addISelPasses()

High level function that adds all passes necessary to go from llvm IR representation to the MI repres...

virtual void addPostRewrite()

Add passes to be run immediately after virtual registers are rewritten to physical registers.

bool isOSBinFormatMachO() const

Tests whether the environment is MachO.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

static raw_ostream & warning()

Convenience method for printing "warning: " to stderr.

int getNumOccurrences() const

PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...

virtual void add(Pass *P)=0

Add a pass to the queue of passes to run.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

ValuesClass values(OptsTy... Options)

Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...

initializer< Ty > init(const Ty &Val)

This is an optimization pass for GlobalISel generic memory operations.

FunctionPass * createFastRegisterAllocator()

FastRegisterAllocation Pass - This pass register allocates as fast as possible.

char & EarlyMachineLICMID

This pass performs loop invariant code motion on machine instructions.

char & GCMachineCodeAnalysisID

GCMachineCodeAnalysis - Target-independent pass to mark safe points in machine code.

char & FEntryInserterID

This pass inserts FEntry calls.

FunctionPass * createUnreachableBlockEliminationPass()

createUnreachableBlockEliminationPass - The LLVM code generator does not work well with unreachable b...

FunctionPass * createSjLjEHPreparePass(const TargetMachine *TM)

createSjLjEHPreparePass - This pass adapts exception handling code to use the GCC-style builtin setjm...

char & GCLoweringID

GCLowering Pass - Used by gc.root to perform its default lowering operations.

void registerCodeGenCallback(PassInstrumentationCallbacks &PIC, TargetMachine &)

char & RegisterCoalescerID

RegisterCoalescer - This pass merges live ranges to eliminate copies.

ModulePass * createGlobalMergeFuncPass()

This pass performs merging similar functions globally.

FunctionPass * createGreedyRegisterAllocator()

Greedy register allocation pass - This pass implements a global register allocator for optimized buil...

MachineFunctionPass * createBasicBlockPathCloningPass()

FunctionPass * createConstantHoistingPass()

FunctionPass * createSafeStackPass()

This pass splits the stack into a safe stack and an unsafe stack to protect against stack-based overf...

char & MachineSinkingID

MachineSinking - This pass performs sinking on machine instructions.

@ SjLj

setjmp/longjmp based exceptions

@ ZOS

z/OS MVS Exception Handling.

@ None

No exception support.

@ AIX

AIX Exception Handling.

@ DwarfCFI

DWARF-like instruction based exceptions.

@ WinEH

Windows Exception Handling.

@ Wasm

WebAssembly Exception Handling.

FunctionPass * createSelectOptimizePass()

This pass converts conditional moves to conditional jumps when profitable.

FunctionPass * createWasmEHPass()

createWasmEHPass - This pass adapts exception handling code to use WebAssembly's exception handling s...

char & FixupStatepointCallerSavedID

The pass fixups statepoint machine instruction to replace usage of caller saved registers with stack ...

MachineFunctionPass * createBasicBlockSectionsPass()

createBasicBlockSections Pass - This pass assigns sections to machine basic blocks and is enabled wit...

FunctionPass * createPostInlineEntryExitInstrumenterPass()

MachineFunctionPass * createPrologEpilogInserterPass()

MachineFunctionPass * createGCEmptyBasicBlocksPass()

createGCEmptyBasicblocksPass - Empty basic blocks (basic blocks without real code) appear as the resu...

FunctionPass * createCallBrPass()

ModulePass * createStripDebugMachineModulePass(bool OnlyDebugified)

Creates MIR Strip Debug pass.

char & TailDuplicateLegacyID

TailDuplicate - Duplicate blocks with unconditional branches into tails of their predecessors.

char & ExpandPostRAPseudosID

ExpandPostRAPseudos - This pass expands pseudo instructions after register allocation.

char & PatchableFunctionID

This pass implements the "patchable-function" attribute.

FunctionPass * createScalarizeMaskedMemIntrinLegacyPass()

ModulePass * createLowerEmuTLSPass()

LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all TLS variables for the emulated ...

char & PostRASchedulerID

PostRAScheduler - This pass performs post register allocation scheduling.

char & RemoveLoadsIntoFakeUsesID

RemoveLoadsIntoFakeUses pass.

FunctionPass * createStackProtectorPass()

createStackProtectorPass - This pass adds stack protectors to functions.

Pass * createLoopTermFoldPass()

char & MachineSchedulerID

MachineScheduler - This pass schedules machine instructions.

char & PostMachineSchedulerID

PostMachineScheduler - This pass schedules machine instructions postRA.

char & PeepholeOptimizerLegacyID

PeepholeOptimizer - This pass performs peephole optimizations - like extension and comparison elimina...

char & LiveDebugValuesID

LiveDebugValues pass.

char & PrologEpilogCodeInserterID

PrologEpilogCodeInserter - This pass inserts prolog and epilog code, and eliminates abstract frame re...

FunctionPass * createExpandLargeFpConvertPass()

char & EarlyIfConverterLegacyID

EarlyIfConverter - This pass performs if-conversion on SSA form by inserting cmov instructions.

ImmutablePass * createBasicBlockSectionsProfileReaderWrapperPass(const MemoryBuffer *Buf)

char & MachineLoopInfoID

MachineLoopInfo - This pass is a loop analysis pass.

cl::opt< bool > EnableFSDiscriminator

char & ShadowStackGCLoweringID

ShadowStackGCLowering - Implements the custom lowering mechanism used by the shadow stack GC.

MachineFunctionPass * createStackFrameLayoutAnalysisPass()

StackFramePrinter pass - This pass prints out the machine function's stack frame to the given stream ...

FunctionPass * createMIRAddFSDiscriminatorsPass(sampleprof::FSDiscriminatorPass P)

Add Flow Sensitive Discriminators.

char & MachineSanitizerBinaryMetadataID

char & ImplicitNullChecksID

ImplicitNullChecks - This pass folds null pointer checks into nearby memory operations.

ModulePass * createPreISelIntrinsicLoweringPass()

This pass lowers the @llvm.load.relative and @llvm.objc.

void initializeAAResultsWrapperPassPass(PassRegistry &)

char & ShrinkWrapID

ShrinkWrap pass. Look for the best place to insert save and restore.

char & MachineLateInstrsCleanupID

MachineLateInstrsCleanup - This pass removes redundant identical instructions after register allocati...

ImmutablePass * createScopedNoAliasAAWrapperPass()

FunctionPass * createExpandMemCmpLegacyPass()

ModulePass * createLowerGlobalDtorsLegacyPass()

FunctionPass * createLowerInvokePass()

FunctionPass * createRegUsageInfoCollector()

This pass is executed POST-RA to collect which physical registers are preserved by given machine func...

raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.

char & XRayInstrumentationID

This pass inserts the XRay instrumentation sleds if they are supported by the target platform.

char & OptimizePHIsLegacyID

OptimizePHIs - This pass optimizes machine instruction PHIs to take advantage of opportunities create...

void report_fatal_error(Error Err, bool gen_crash_diag=true)

Report a serious error, calling any installed error handler.

char & StackMapLivenessID

StackMapLiveness - This pass analyses the register live-out set of stackmap/patchpoint intrinsics and...

char & FuncletLayoutID

This pass lays out funclets contiguously.

FunctionPass * createCodeGenPrepareLegacyPass()

createCodeGenPrepareLegacyPass - Transform the code to expose more pattern matching during instructio...

char & RemoveRedundantDebugValuesID

RemoveRedundantDebugValues pass.

FunctionPass * createBasicAAWrapperPass()

char & DetectDeadLanesID

This pass adds dead/undef flags after analyzing subregister lanes.

char & PostRAMachineSinkingID

This pass perform post-ra machine sink for COPY instructions.

FunctionPass * createDwarfEHPass(CodeGenOptLevel OptLevel)

createDwarfEHPass - This pass mulches exception handling code into a form adapted to code generation.

FunctionPass * createRegAllocScoringPass()

When learning an eviction policy, extract score(reward) information, otherwise this does nothing.

CodeGenOptLevel

Code generation optimization level.

ModulePass * createMachineOutlinerPass(bool RunOnAllFunctions=true)

This pass performs outlining on machine instructions directly before printing assembly.

char & StackSlotColoringID

StackSlotColoring - This pass performs stack slot coloring.

FunctionPass * createExpandLargeDivRemPass()

Pass * createMergeICmpsLegacyPass()

char & ProcessImplicitDefsID

ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs.

ModulePass * createCheckDebugMachineModulePass()

Creates MIR Check Debug pass.

ImmutablePass * createTargetTransformInfoWrapperPass(TargetIRAnalysis TIRA)

Create an analysis pass wrapper around a TTI object.

ImmutablePass * createTypeBasedAAWrapperPass()

FunctionPass * createMIRProfileLoaderPass(std::string File, std::string RemappingFile, sampleprof::FSDiscriminatorPass P, IntrusiveRefCntPtr< vfs::FileSystem > FS)

Read Flow Sensitive Profile.

FunctionPass * createCFIFixup()

Creates CFI Fixup pass.

FunctionPass * createVerifierPass(bool FatalErrors=true)

void initializeBasicAAWrapperPassPass(PassRegistry &)

MachineFunctionPass * createMachineFunctionPrinterPass(raw_ostream &OS, const std::string &Banner="")

MachineFunctionPrinter pass - This pass prints out the machine function to the given stream as a debu...

char & MachineCSELegacyID

MachineCSE - This pass performs global CSE on machine instructions.

Pass * createLoopStrengthReducePass()

char & LiveVariablesID

LiveVariables pass - This pass computes the set of blocks in which each variable is life and sets mac...

char & EarlyTailDuplicateLegacyID

Duplicate blocks with unconditional branches into tails of their predecessors.

FunctionPass * createExpandReductionsPass()

This pass expands the reduction intrinsics into sequences of shuffles.

MachineFunctionPass * createMachineFunctionSplitterPass()

createMachineFunctionSplitterPass - This pass splits machine functions using profile information.

void call_once(once_flag &flag, Function &&F, Args &&... ArgList)

Execute the function specified as a parameter once.

MachineFunctionPass * createResetMachineFunctionPass(bool EmitFallbackDiag, bool AbortOnFailedISel)

This pass resets a MachineFunction when it has the FailedISel property as if it was just created.

char & StackColoringLegacyID

StackSlotColoring - This pass performs stack coloring and merging.

char & VirtRegRewriterID

VirtRegRewriter pass.

FunctionPass * createReplaceWithVeclibLegacyPass()

char & FinalizeISelID

This pass expands pseudo-instructions, reserves registers and adjusts machine frame information.

FunctionPass * createRegUsageInfoPropPass()

Return a MachineFunction pass that identifies call sites and propagates register usage information of...

FunctionPass * createPartiallyInlineLibCallsPass()

char & UnreachableMachineBlockElimID

UnreachableMachineBlockElimination - This pass removes unreachable machine basic blocks.

char & MachineBlockPlacementID

MachineBlockPlacement - This pass places basic blocks based on branch probabilities.

char & TwoAddressInstructionPassID

TwoAddressInstruction - This pass reduces two-address instructions to use two operands.

Pass * createCanonicalizeFreezeInLoopsPass()

char & LocalStackSlotAllocationID

LocalStackSlotAllocation - This pass assigns local frame indices to stack slots relative to one anoth...

char & BranchFolderPassID

BranchFolding - This pass performs machine code CFG based optimizations to delete branches to branche...

char & PHIEliminationID

PHIElimination - This pass eliminates machine instruction PHI nodes by inserting copy instructions.

Pass * createObjCARCContractPass()

ModulePass * createDebugifyMachineModulePass()

Creates MIR Debugify pass.

FunctionPass * createPrintFunctionPass(raw_ostream &OS, const std::string &Banner="")

Create and return a pass that prints functions to the specified raw_ostream as they are processed.

char & RenameIndependentSubregsID

This pass detects subregister lanes in a virtual register that are used independently of other lanes ...

char & MachineLICMID

This pass performs loop invariant code motion on machine instructions.

char & MachineBlockPlacementStatsID

MachineBlockPlacementStats - This pass collects statistics about the basic block placement using bran...

char & LiveIntervalsID

LiveIntervals - This analysis keeps track of the live ranges of virtual and physical registers.

char & MachineCopyPropagationID

MachineCopyPropagation - This pass performs copy propagation on machine instructions.

char & DeadMachineInstructionElimID

DeadMachineInstructionElim - This pass removes dead machine instructions.

void initializeCodeGen(PassRegistry &)

Initialize all passes linked into the CodeGen library.

FunctionPass * createMachineVerifierPass(const std::string &Banner)

createMachineVerifierPass - This pass verifies cenerated machine code instructions for correctness.

FunctionPass * createWinEHPass(bool DemoteCatchSwitchPHIOnly=false)

createWinEHPass - Prepares personality functions used by MSVC on Windows, in addition to the Itanium ...

CGPassBuilderOption getCGPassBuilderOption()

IdentifyingPassPtr InsertedPassID

Pass * getInsertedPass() const

InsertedPass(AnalysisID TargetPassID, IdentifyingPassPtr InsertedPassID)

This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...

void registerShouldRunOptionalPassCallback(CallableT C)

A utility class that uses RAII to save and restore the value of a variable.

The llvm::once_flag structure.