mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The opaque layer is responsible for knowing where that specific attribute is stored. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -149,7 +149,7 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
|
||||
TLInfo = &getAnalysis<TargetLibraryInfo>();
|
||||
DT = getAnalysisIfAvailable<DominatorTree>();
|
||||
PFI = getAnalysisIfAvailable<ProfileInfo>();
|
||||
OptSize = F.getFnAttributes().hasOptimizeForSizeAttr();
|
||||
OptSize = F.getFnAttributes().hasAttribute(Attributes::OptimizeForSize);
|
||||
|
||||
/// This optimization identifies DIV instructions that can be
|
||||
/// profitably bypassed and carried out with a shorter, faster divide.
|
||||
@@ -715,7 +715,8 @@ bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
|
||||
// See llvm::isInTailCallPosition().
|
||||
const Function *F = BB->getParent();
|
||||
Attributes CallerRetAttr = F->getAttributes().getRetAttributes();
|
||||
if (CallerRetAttr.hasZExtAttr() || CallerRetAttr.hasSExtAttr())
|
||||
if (CallerRetAttr.hasAttribute(Attributes::ZExt) ||
|
||||
CallerRetAttr.hasAttribute(Attributes::SExt))
|
||||
return false;
|
||||
|
||||
// Make sure there are no instructions between the PHI and return, or that the
|
||||
|
||||
Reference in New Issue
Block a user