diff options
author | Justin Lebar <jlebar@google.com> | 2016-07-14 17:07:44 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-07-14 17:07:44 +0000 |
commit | a3b786a8c1ce5e1ed1f5a30f5482d3eb247bbf8b (patch) | |
tree | a91c59f249d069bf96b0e8d1422421f364843e90 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 6003fb58df1d099fec6c50c5ec0b83c4dddfe4bd (diff) | |
download | bcm5719-llvm-a3b786a8c1ce5e1ed1f5a30f5482d3eb247bbf8b.tar.gz bcm5719-llvm-a3b786a8c1ce5e1ed1f5a30f5482d3eb247bbf8b.zip |
[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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index a47db2e2684..6e4de49d0c1 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -299,8 +299,11 @@ MachineFunction::getMachineMemOperand(MachinePointerInfo PtrInfo, unsigned f, uint64_t s, unsigned base_alignment, const AAMDNodes &AAInfo, const MDNode *Ranges) { - return new (Allocator) MachineMemOperand(PtrInfo, f, s, base_alignment, - AAInfo, Ranges); + // FIXME: Get rid of this static_cast and make getMachineOperand take a + // MachineMemOperand::Flags param. + return new (Allocator) + MachineMemOperand(PtrInfo, static_cast<MachineMemOperand::Flags>(f), s, + base_alignment, AAInfo, Ranges); } MachineMemOperand * |