mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -503,7 +503,7 @@ bool AliasAnalysis::canInstructionRangeModify(const Instruction &I1,
|
||||
bool llvm::isNoAliasCall(const Value *V) {
|
||||
if (isa<CallInst>(V) || isa<InvokeInst>(V))
|
||||
return ImmutableCallSite(cast<Instruction>(V))
|
||||
.paramHasAttr(0, Attributes::NoAlias);
|
||||
.paramHasAttr(0, Attribute::NoAlias);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -196,7 +196,7 @@ void CodeMetrics::analyzeFunction(Function *F, const DataLayout *TD) {
|
||||
// as volatile if they are live across a setjmp call, and they probably
|
||||
// won't do this in callers.
|
||||
exposesReturnsTwice = F->callsFunctionThatReturnsTwice() &&
|
||||
!F->getFnAttributes().hasAttribute(Attributes::ReturnsTwice);
|
||||
!F->getFnAttributes().hasAttribute(Attribute::ReturnsTwice);
|
||||
|
||||
// Look at the size of the callee.
|
||||
for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
|
||||
|
@@ -610,7 +610,7 @@ bool CallAnalyzer::visitStore(StoreInst &I) {
|
||||
|
||||
bool CallAnalyzer::visitCallSite(CallSite CS) {
|
||||
if (CS.isCall() && cast<CallInst>(CS.getInstruction())->canReturnTwice() &&
|
||||
!F.getFnAttributes().hasAttribute(Attributes::ReturnsTwice)) {
|
||||
!F.getFnAttributes().hasAttribute(Attribute::ReturnsTwice)) {
|
||||
// This aborts the entire analysis.
|
||||
ExposesReturnsTwice = true;
|
||||
return false;
|
||||
@@ -1041,7 +1041,7 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, Function *Callee,
|
||||
|
||||
// Calls to functions with always-inline attributes should be inlined
|
||||
// whenever possible.
|
||||
if (Callee->getFnAttributes().hasAttribute(Attributes::AlwaysInline)) {
|
||||
if (Callee->getFnAttributes().hasAttribute(Attribute::AlwaysInline)) {
|
||||
if (isInlineViable(*Callee))
|
||||
return llvm::InlineCost::getAlways();
|
||||
return llvm::InlineCost::getNever();
|
||||
@@ -1051,7 +1051,7 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, Function *Callee,
|
||||
// something else. Don't inline functions marked noinline or call sites
|
||||
// marked noinline.
|
||||
if (Callee->mayBeOverridden() ||
|
||||
Callee->getFnAttributes().hasAttribute(Attributes::NoInline) ||
|
||||
Callee->getFnAttributes().hasAttribute(Attribute::NoInline) ||
|
||||
CS.isNoInline())
|
||||
return llvm::InlineCost::getNever();
|
||||
|
||||
@@ -1073,7 +1073,7 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, Function *Callee,
|
||||
}
|
||||
|
||||
bool InlineCostAnalyzer::isInlineViable(Function &F) {
|
||||
bool ReturnsTwice =F.getFnAttributes().hasAttribute(Attributes::ReturnsTwice);
|
||||
bool ReturnsTwice =F.getFnAttributes().hasAttribute(Attribute::ReturnsTwice);
|
||||
for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) {
|
||||
// Disallow inlining of functions which contain an indirect branch.
|
||||
if (isa<IndirectBrInst>(BI->getTerminator()))
|
||||
|
@@ -132,7 +132,7 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy,
|
||||
|
||||
static bool hasNoAliasAttr(const Value *V, bool LookThroughBitCast) {
|
||||
ImmutableCallSite CS(LookThroughBitCast ? V->stripPointerCasts() : V);
|
||||
return CS && CS.hasFnAttr(Attributes::NoAlias);
|
||||
return CS && CS.hasFnAttr(Attribute::NoAlias);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -328,7 +328,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs,
|
||||
|
||||
if (LIOffs+NewLoadByteSize > MemLocEnd &&
|
||||
LI->getParent()->getParent()->getFnAttributes().
|
||||
hasAttribute(Attributes::AddressSafety))
|
||||
hasAttribute(Attribute::AddressSafety))
|
||||
// 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