diff options
| author | Yonghong Song <yhs@fb.com> | 2018-02-23 23:49:18 +0000 |
|---|---|---|
| committer | Yonghong Song <yhs@fb.com> | 2018-02-23 23:49:18 +0000 |
| commit | ec84e2f1b08c297f82f517bc5c904dee78c2a6bc (patch) | |
| tree | a4dcf7b006e38c12a862ce4cfadc918517dd7795 /llvm/lib | |
| parent | c1b07bdde9e8a7737a7d5ae0ddf163cb3c263746 (diff) | |
| download | bcm5719-llvm-ec84e2f1b08c297f82f517bc5c904dee78c2a6bc.tar.gz bcm5719-llvm-ec84e2f1b08c297f82f517bc5c904dee78c2a6bc.zip | |
bpf: Use markSuperRegs to mark reserved registers
markSuperRegs is the canonical helper function used to mark reserved
registers. It could mark any overlapping sub-registers automatically.
Reviewed-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
llvm-svn: 325979
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/BPF/BPFRegisterInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/BPF/BPFRegisterInfo.cpp b/llvm/lib/Target/BPF/BPFRegisterInfo.cpp index 6f706781609..635c1111315 100644 --- a/llvm/lib/Target/BPF/BPFRegisterInfo.cpp +++ b/llvm/lib/Target/BPF/BPFRegisterInfo.cpp @@ -37,8 +37,8 @@ BPFRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { BitVector BPFRegisterInfo::getReservedRegs(const MachineFunction &MF) const { BitVector Reserved(getNumRegs()); - Reserved.set(BPF::R10); // R10 is read only frame pointer - Reserved.set(BPF::R11); // R11 is pseudo stack pointer + markSuperRegs(Reserved, BPF::W10); // [W|R]10 is read only frame pointer + markSuperRegs(Reserved, BPF::W11); // [W|R]11 is pseudo stack pointer return Reserved; } |

