mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Avoid vectorization when the function has the "noimplicitflot" attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -94,9 +94,17 @@ struct LoopVectorize : public LoopPass {
|
||||
// Check the function attribues to find out if this function should be
|
||||
// optimized for size.
|
||||
Function *F = L->getHeader()->getParent();
|
||||
Attribute::AttrKind SzAttr= Attribute::OptimizeForSize;
|
||||
bool OptForSize =
|
||||
F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, SzAttr);
|
||||
Attribute::AttrKind SzAttr = Attribute::OptimizeForSize;
|
||||
Attribute::AttrKind FlAttr = Attribute::NoImplicitFloat;
|
||||
unsigned FnIndex = AttributeSet::FunctionIndex;
|
||||
bool OptForSize = F->getAttributes().hasAttribute(FnIndex, SzAttr);
|
||||
bool NoFloat = F->getAttributes().hasAttribute(FnIndex, FlAttr);
|
||||
|
||||
if (NoFloat) {
|
||||
DEBUG(dbgs() << "LV: Can't vectorize when the NoImplicitFloat"
|
||||
"attribute is used.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned VF = CM.selectVectorizationFactor(OptForSize, VectorizationFactor);
|
||||
|
||||
|
Reference in New Issue
Block a user