Re: [PATCH LLVM 1/3] bpf: improve dead Defs check for XADD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 28, 2019 at 6:47 AM Yonghong Song <yhs@xxxxxx> wrote:
<snip>
> > +  // Otherwise, return true if any aliased SuperReg of GPR32 is not dead.
> > +  std::vector<unsigned>::iterator search_begin = GPR64DeadDefs.begin();
> > +  std::vector<unsigned>::iterator search_end = GPR64DeadDefs.end();
> > +  for (auto I : GPR32LiveDefs) {
> > +    bool ActuallyDead = true;
> > +
> > +    for (MCSuperRegIterator SR(I, TRI); SR.isValid(); ++SR) {
> > +       if (std::find(search_begin, search_end, *SR) == search_end) {
>
> maybe you can just return true here?

Good catch, yeah, simpler, will fix in v2.

Regards,
Jiong



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux