mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-18 10:24:45 +00:00
CodeGen: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) Also, add `Function::getFnStackAlignment()`, and canonicalize: getAttributes().getStackAlignment(AttributeSet::FunctionIndex) => getFnStackAlignment() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -217,8 +217,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
|
||||
DominatorTreeWrapperPass *DTWP =
|
||||
getAnalysisIfAvailable<DominatorTreeWrapperPass>();
|
||||
DT = DTWP ? &DTWP->getDomTree() : nullptr;
|
||||
OptSize = F.getAttributes().hasAttribute(AttributeSet::FunctionIndex,
|
||||
Attribute::OptimizeForSize);
|
||||
OptSize = F.hasFnAttribute(Attribute::OptimizeForSize);
|
||||
|
||||
/// This optimization identifies DIV instructions that can be
|
||||
/// profitably bypassed and carried out with a shorter, faster divide.
|
||||
|
Reference in New Issue
Block a user