diff options
author | Evandro Menezes <e.menezes@samsung.com> | 2019-04-04 22:40:06 +0000 |
---|---|---|
committer | Evandro Menezes <e.menezes@samsung.com> | 2019-04-04 22:40:06 +0000 |
commit | 85bd3978ae4e1c16fa8fa4bc27d0393d1d2265ea (patch) | |
tree | a34b115e832741a6bbc24703da317621c657a8bf /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 665b6b30ddeae26a3d215659f703bbe8a47cba77 (diff) | |
download | llvm-85bd3978ae4e1c16fa8fa4bc27d0393d1d2265ea.zip llvm-85bd3978ae4e1c16fa8fa4bc27d0393d1d2265ea.tar.gz llvm-85bd3978ae4e1c16fa8fa4bc27d0393d1d2265ea.tar.bz2 |
[IR] Refactor attribute methods in Function class (NFC)
Rename the functions that query the optimization kind attributes.
Differential revision: https://reviews.llvm.org/D60287
llvm-svn: 357731
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 265aeab..b1806ad 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -1813,7 +1813,7 @@ MachineBlockPlacement::findBestLoopTop(const MachineLoop &L, // i.e. when the layout predecessor does not fallthrough to the loop header. // In practice this never happens though: there always seems to be a preheader // that can fallthrough and that is also placed before the header. - if (F->getFunction().optForSize()) + if (F->getFunction().hasOptSize()) return L.getHeader(); // Check that the header hasn't been fused with a preheader block due to @@ -2561,8 +2561,8 @@ void MachineBlockPlacement::alignBlocks() { // exclusively on the loop info here so that we can align backedges in // unnatural CFGs and backedges that were introduced purely because of the // loop rotations done during this layout pass. - if (F->getFunction().optForMinSize() || - (F->getFunction().optForSize() && !TLI->alignLoopsWithOptSize())) + if (F->getFunction().hasMinSize() || + (F->getFunction().hasOptSize() && !TLI->alignLoopsWithOptSize())) return; BlockChain &FunctionChain = *BlockToChain[&F->front()]; if (FunctionChain.begin() == FunctionChain.end()) @@ -2837,7 +2837,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) { if (allowTailDupPlacement()) { MPDT = &getAnalysis<MachinePostDominatorTree>(); - if (MF.getFunction().optForSize()) + if (MF.getFunction().hasOptSize()) TailDupSize = 1; bool PreRegAlloc = false; TailDup.initMF(MF, PreRegAlloc, MBPI, /* LayoutMode */ true, TailDupSize); |