Lines Matching defs:Attrs
22 static MDNode *createMetadata(LLVMContext &Ctx, const LoopAttributes &Attrs) {
24 if (!Attrs.IsParallel && Attrs.VectorizeWidth == 0 &&
25 Attrs.InterleaveCount == 0 && Attrs.UnrollCount == 0 &&
26 Attrs.VectorizeEnable == LoopAttributes::Unspecified &&
27 Attrs.UnrollEnable == LoopAttributes::Unspecified)
36 if (Attrs.VectorizeWidth > 0) {
39 Type::getInt32Ty(Ctx), Attrs.VectorizeWidth))};
44 if (Attrs.InterleaveCount > 0) {
47 Type::getInt32Ty(Ctx), Attrs.InterleaveCount))};
52 if (Attrs.UnrollCount > 0) {
55 Type::getInt32Ty(Ctx), Attrs.UnrollCount))};
60 if (Attrs.VectorizeEnable != LoopAttributes::Unspecified) {
63 Type::getInt1Ty(Ctx), (Attrs.VectorizeEnable ==
69 if (Attrs.UnrollEnable != LoopAttributes::Unspecified) {
71 if (Attrs.UnrollEnable == LoopAttributes::Enable)
73 else if (Attrs.UnrollEnable == LoopAttributes::Full)
101 LoopInfo::LoopInfo(BasicBlock *Header, const LoopAttributes &Attrs)
102 : LoopID(nullptr), Header(Header), Attrs(Attrs) {
103 LoopID = createMetadata(Header->getContext(), Attrs);
113 ArrayRef<const clang::Attr *> Attrs) {
115 // Identify loop hint attributes from Attrs.
116 for (const auto *Attr : Attrs) {