diff options
author | Arthur Eubanks <aeubanks@google.com> | 2023-09-14 14:10:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 14:10:14 -0700 |
commit | 0a1aa6cda2758b0926a95f87d39ffefb1cb90200 (patch) | |
tree | 766dc35b70235864f287a9f0a2cef45d487203ad /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | ae84b160d2fe61a7211817262ce717a17d27c0ae (diff) | |
download | llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.zip llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.tar.gz llvm-0a1aa6cda2758b0926a95f87d39ffefb1cb90200.tar.bz2 |
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.
This matches other nearby enums.
For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 912e9ec..24f0197 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -3376,7 +3376,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) { TargetPassConfig *PassConfig = &getAnalysis<TargetPassConfig>(); // For aggressive optimization, we can adjust some thresholds to be less // conservative. - if (PassConfig->getOptLevel() >= CodeGenOpt::Aggressive) { + if (PassConfig->getOptLevel() >= CodeGenOptLevel::Aggressive) { // At O3 we should be more willing to copy blocks for tail duplication. This // increases size pressure, so we only do it at O3 // Do this unless only the regular threshold is explicitly set. @@ -3388,7 +3388,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) { // If there's no threshold provided through options, query the target // information for a threshold instead. if (TailDupPlacementThreshold.getNumOccurrences() == 0 && - (PassConfig->getOptLevel() < CodeGenOpt::Aggressive || + (PassConfig->getOptLevel() < CodeGenOptLevel::Aggressive || TailDupPlacementAggressiveThreshold.getNumOccurrences() == 0)) TailDupSize = TII->getTailDuplicateSize(PassConfig->getOptLevel()); |