[CodeGen] Refactor MachineMemOperand's Flags enum.
authorJustin Lebar <jlebar@google.com>
Thu, 14 Jul 2016 17:07:44 +0000 (17:07 +0000)
committerJustin Lebar <jlebar@google.com>
Thu, 14 Jul 2016 17:07:44 +0000 (17:07 +0000)
commita3b786a8c1ce5e1ed1f5a30f5482d3eb247bbf8b
treea91c59f249d069bf96b0e8d1422421f364843e90
parent6003fb58df1d099fec6c50c5ec0b83c4dddfe4bd
[CodeGen] Refactor MachineMemOperand's Flags enum.

Summary:
- Give it a shorter name (because we're going to refer to it often from
  SelectionDAG and friends).

- Split the flags and alignment into separate variables.

- Specialize FlagsEnumTraits for it, so we can do bitwise ops on it
  without losing type information.

- Make some enum values constants in MachineMemOperand instead.
  MOMaxBits should not be a valid Flag.

- Simplify some of the bitwise ops for dealing with Flags.

Reviewers: chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D22281

llvm-svn: 275438
llvm/include/llvm/CodeGen/MachineMemOperand.h
llvm/lib/CodeGen/MachineFunction.cpp
llvm/lib/CodeGen/MachineInstr.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp