This Change is to prepare to make RegState into an enum class. It: - Updates documentation to match the order in the code. - Brings the `get<>RegState` functions together and makes them `constexpr`. - Adopts the `get<>RegState` where RegStates were being chosen with ternary operators in backend code. - Introduces `hasRegState` to make querying RegState easier once it is an enum class. - Adopts `hasRegState` where equivalent was done with bitwise arithmetic. - Introduces `RegState::NoFlags`, which will be used for the lack of flags. - Documents that `0x1` is a reserved flag value used to detect if someone is passing `true` instead of flags (due to implicit bool to unsigned conversions). - Updates two calls to `MachineInstrBuilder::addReg` which were passing `false` to the flags operand, to no longer pass a value. - Documents that `getRegState` seems to have forgotten a call to `getEarlyClobberRegState`. This PR relands llvm/llvm-project#176091 (commit1d616cdca3) which was reverted in llvm/llvm-project#176190 (commit6309cd8668).
8.4 KiB
8.4 KiB