mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Remove the `hasFnAttr' method from Function.
The hasFnAttr method has been replaced by querying the Attributes explicitly. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -196,7 +196,7 @@ void CodeMetrics::analyzeFunction(Function *F, const TargetData *TD) {
|
||||
// as volatile if they are live across a setjmp call, and they probably
|
||||
// won't do this in callers.
|
||||
exposesReturnsTwice = F->callsFunctionThatReturnsTwice() &&
|
||||
!F->hasFnAttr(Attribute::ReturnsTwice);
|
||||
!F->getFnAttributes().hasReturnsTwiceAttr();
|
||||
|
||||
// Look at the size of the callee.
|
||||
for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
|
||||
|
@@ -128,7 +128,7 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
|
||||
public:
|
||||
CallAnalyzer(const TargetData *TD, Function &Callee, int Threshold)
|
||||
: TD(TD), F(Callee), Threshold(Threshold), Cost(0),
|
||||
AlwaysInline(F.hasFnAttr(Attribute::AlwaysInline)),
|
||||
AlwaysInline(F.getFnAttributes().hasAlwaysInlineAttr()),
|
||||
IsCallerRecursive(false), IsRecursiveCall(false),
|
||||
ExposesReturnsTwice(false), HasDynamicAlloca(false), AllocatedSize(0),
|
||||
NumInstructions(0), NumVectorInstructions(0),
|
||||
@@ -613,7 +613,7 @@ bool CallAnalyzer::visitStore(StoreInst &I) {
|
||||
|
||||
bool CallAnalyzer::visitCallSite(CallSite CS) {
|
||||
if (CS.isCall() && cast<CallInst>(CS.getInstruction())->canReturnTwice() &&
|
||||
!F.hasFnAttr(Attribute::ReturnsTwice)) {
|
||||
!F.getFnAttributes().hasReturnsTwiceAttr()) {
|
||||
// This aborts the entire analysis.
|
||||
ExposesReturnsTwice = true;
|
||||
return false;
|
||||
@@ -1043,7 +1043,7 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, Function *Callee,
|
||||
// something else. Don't inline functions marked noinline or call sites
|
||||
// marked noinline.
|
||||
if (!Callee || Callee->mayBeOverridden() ||
|
||||
Callee->hasFnAttr(Attribute::NoInline) || CS.isNoInline())
|
||||
Callee->getFnAttributes().hasNoInlineAttr() || CS.isNoInline())
|
||||
return llvm::InlineCost::getNever();
|
||||
|
||||
DEBUG(llvm::dbgs() << " Analyzing call of " << Callee->getName()
|
||||
|
@@ -327,7 +327,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs,
|
||||
return 0;
|
||||
|
||||
if (LIOffs+NewLoadByteSize > MemLocEnd &&
|
||||
LI->getParent()->getParent()->hasFnAttr(Attribute::AddressSafety)) {
|
||||
LI->getParent()->getParent()->getFnAttributes().hasAddressSafetyAttr()){
|
||||
// We will be reading past the location accessed by the original program.
|
||||
// While this is safe in a regular build, Address Safety analysis tools
|
||||
// may start reporting false warnings. So, don't do widening.
|
||||
|
Reference in New Issue
Block a user