[PATCH] D30439: [AMDGPU] New method to estimate register pressure

Valery Pykhtin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 08:24:56 PST 2017


vpykhtin added inline comments.


================
Comment at: lib/Target/AMDGPU/GCNSchedStrategy.cpp:415
+    if (LaneMask.any()) {
+      LiveIns[Reg] = LaneBitmask::getNone();
+      setMask(MRI, SRI, Reg, LiveIns[Reg], LaneMask, SGPRs, VGPRs);
----------------
rampitec wrote:
> vpykhtin wrote:
> > When a map is indexed for non-existent key the value constructed with default constructor is inserted for this key. LaneBitmask::getNone ()is just a syntax sugar for LaneBitmask(). So you can just read LiveIns[Reg] here without initializing it.
> LaneBitmask does not have default initializer value. I guess it worth nothing that LaneBitmask() should result in zero initialization.
It has, though using C++11 syntax:

LineBitmask.h: line 77
  private:
    Type Mask = 0;
  };


Repository:
  rL LLVM

https://reviews.llvm.org/D30439





More information about the llvm-commits mailing list