File tree 2 files changed +8
-7
lines changed
llvm/include/llvm/CodeGen 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,8 @@ class GenericMachineInstr : public MachineInstr {
41
41
}
42
42
43
43
void dropPoisonGeneratingFlags () {
44
- clearFlag (NoUWrap);
45
- clearFlag (NoSWrap);
46
- clearFlag (IsExact);
47
- clearFlag (Disjoint);
48
- clearFlag (NonNeg);
49
- clearFlag (FmNoNans);
50
- clearFlag (FmNoInfs);
44
+ clearFlags (NoUWrap | NoSWrap | IsExact | Disjoint | NonNeg | FmNoNans |
45
+ FmNoInfs);
51
46
assert (!hasPoisonGeneratingFlags ());
52
47
}
53
48
};
Original file line number Diff line number Diff line change @@ -416,6 +416,12 @@ class MachineInstr
416
416
Flags &= ~((uint32_t )Flag);
417
417
}
418
418
419
+ void clearFlags (unsigned flags) {
420
+ assert (isUInt<LLVM_MI_FLAGS_BITS>(flags) &&
421
+ " flags to be cleared are out of range for the Flags field" );
422
+ Flags &= ~flags;
423
+ }
424
+
419
425
// / Return true if MI is in a bundle (but not the first MI in a bundle).
420
426
// /
421
427
// / A bundle looks like this before it's finalized:
You can’t perform that action at this time.
0 commit comments