mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
[vectorizer] Simplify code to use existing helpers on the Function
object and fewer pointless variables. Also, add a clarifying comment and a FIXME because the code which disables *all* vectorization if we can't use implicit floating point instructions just makes no sense at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
424b2b0093
commit
91a3f1dc8e
@ -1055,14 +1055,14 @@ struct LoopVectorize : public FunctionPass {
|
|||||||
// Check the function attributes to find out if this function should be
|
// Check the function attributes to find out if this function should be
|
||||||
// optimized for size.
|
// optimized for size.
|
||||||
Function *F = L->getHeader()->getParent();
|
Function *F = L->getHeader()->getParent();
|
||||||
Attribute::AttrKind SzAttr = Attribute::OptimizeForSize;
|
bool OptForSize =
|
||||||
Attribute::AttrKind FlAttr = Attribute::NoImplicitFloat;
|
Hints.Force != 1 && F->hasFnAttribute(Attribute::OptimizeForSize);
|
||||||
unsigned FnIndex = AttributeSet::FunctionIndex;
|
|
||||||
bool OptForSize = Hints.Force != 1 &&
|
|
||||||
F->getAttributes().hasAttribute(FnIndex, SzAttr);
|
|
||||||
bool NoFloat = F->getAttributes().hasAttribute(FnIndex, FlAttr);
|
|
||||||
|
|
||||||
if (NoFloat) {
|
// Check the function attributes to see if implicit floats are allowed.a
|
||||||
|
// FIXME: This check doesn't seem possibly correct -- what if the loop is
|
||||||
|
// an integer loop and the vector instructions selected are purely integer
|
||||||
|
// vector instructions?
|
||||||
|
if (F->hasFnAttribute(Attribute::NoImplicitFloat)) {
|
||||||
DEBUG(dbgs() << "LV: Can't vectorize when the NoImplicitFloat"
|
DEBUG(dbgs() << "LV: Can't vectorize when the NoImplicitFloat"
|
||||||
"attribute is used.\n");
|
"attribute is used.\n");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user