svf-tools 1.0.515 → 1.0.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/LocationSet_8h_source.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +15 -15
- package/lib/MemoryModel/LocationSet.cpp +4 -0
- package/package.json +1 -1
|
@@ -66,7 +66,7 @@ $(function() {
|
|
|
66
66
|
<div class="title">LocationSet.cpp</div> </div>
|
|
67
67
|
</div><!--header-->
|
|
68
68
|
<div class="contents">
|
|
69
|
-
<a href="LocationSet_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- LocationSet.cpp -- Location set for modeling abstract memory object----//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * @file: LocationSet.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * @author: yesen</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * @date: 26 Sep 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * LICENSE</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> *</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> */</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="LocationSet_8h.html">MemoryModel/LocationSet.h</a>"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="SVFUtil_8h.html">Util/SVFUtil.h</a>"</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVFUtil.html">SVFUtil</a>;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">using namespace </span><a class="code" href="namespaceLLVMUtil.html">LLVMUtil</a>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b"> 44</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b">LocationSet::addOffsetValue</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* offsetVal, <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  offsetValues.push_back(std::make_pair(offsetVal,type));</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d"> 51</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d">LocationSet::isConstantOffset</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keyword"></span>{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> it : offsetValues)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ConstantInt>(it.first) == <span class="keyword">false</span>)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> }</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311"> 65</a></span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">LocationSet::getElementNum</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>)<span class="keyword"> const</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keyword"></span>{</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ArrayType>(type) || SVFUtil::isa<StructType>(type))</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#aec579894eed558ea89740b68360187aa">getNumOfFlattenElements</a>(type);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type->isSingleValueType())</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(type))</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> getElementNum(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">SVFUtil::outs</a>() << <span class="stringliteral">"GepIter Type"</span> << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a817a63e8330530cb18e077556f7ce518">type2String</a>(type) << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  assert(<span class="keyword">false</span> && <span class="stringliteral">"What other types for this gep?"</span>);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  abort();</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment">// struct inner{ int rollNumber; float percentage;};</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment">// struct Student { struct inner rollNumber; char studentName[10][3];}</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment">// char x = studentRecord[1].studentName[3][2];</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710"> 116</a></span> <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> <a class="code" href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">LocationSet::accumulateConstantOffset</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="keyword"></span>{</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  assert(isConstantOffset() && <span class="stringliteral">"not a constant offset"</span>);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">if</span>(offsetValues.empty())</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">return</span> accumulateConstantFieldIdx();</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> totalConstOffset = 0;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = offsetValues.size() - 1; i >= 0; i--)</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  {</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* value = offsetValues[i].first;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a> = offsetValues[i].second;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">ConstantInt</a> *op = <a class="code" href="namespaceSVF_1_1SVFUtil.html#a8182be247907420db00837cef9bcfa70">SVFUtil::dyn_cast</a><<a class="code" href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">ConstantInt</a>>(value);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  assert(op && <span class="stringliteral">"not a constant offset?"</span>);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">if</span>(type==<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  {</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  totalConstOffset += op->getSExtValue();</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  }</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(type))</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  totalConstOffset += op->getSExtValue() * getElementNum(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> <a class="code" href="cJSON_8cpp.html#a95bf816579e97b6f33bdb5e25ed6d5de">offset</a> = op->getSExtValue();</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> flattenOffset = <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a8fc42c2b02317621d6aeb3c5f52d3ee8">getFlattenedElemIdx</a>(type, offset);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  totalConstOffset += flattenOffset;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">return</span> totalConstOffset;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> }</div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f"> 151</a></span> <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> <a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">LocationSet::computeAllLocations</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="keyword"></span>{</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> result;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  result.<a class="code" href="classSVF_1_1SparseBitVector.html#a61bd86909a141f9de873d92c0f904832">set</a>(accumulateConstantFieldIdx());</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> }</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> </div><div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8"> 158</a></span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a> <a class="code" href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8">LocationSet::operator+ </a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& rhs)<span class="keyword"> const</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="keyword"></span>{</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a> ls(rhs);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  ls.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a> += accumulateConstantFieldIdx();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  OffsetValueVec::const_iterator it = getOffsetValueVec().begin();</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  OffsetValueVec::const_iterator eit = getOffsetValueVec().end();</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">for</span> (; it != eit; ++it)</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  ls.<a class="code" href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b">addOffsetValue</a>(it->first, it->second);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keywordflow">return</span> ls;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> }</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4"> 171</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4">LocationSet::operator< </a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& rhs)<span class="keyword"> const</span></div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="keyword"></span>{</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">if</span> (fldIdx != rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a>)</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">return</span> (fldIdx < rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a>);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& pairVec = getOffsetValueVec();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& rhsPairVec = rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>();</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">if</span> (pairVec.size() != rhsPairVec.size())</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">return</span> (pairVec.size() < rhsPairVec.size());</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  {</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  OffsetValueVec::const_iterator it = pairVec.begin();</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  OffsetValueVec::const_iterator rhsIt = rhsPairVec.begin();</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">for</span> (; it != pairVec.end() && rhsIt != rhsPairVec.end(); ++it, ++rhsIt)</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordflow">return</span> (*it) < (*rhsIt);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  }</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> }</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div><div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10"> 195</a></span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83f">SVF::LocationSet::LSRelation</a> <a class="code" href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10">LocationSet::checkRelation</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& LHS, <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& RHS)</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span> {</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> lhsLocations = LHS.<a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>();</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> rhsLocations = RHS.<a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>();</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">if</span> (lhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#a16756e0545fd3d50ab89f45a2e83bb79">intersects</a>(rhsLocations))</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordflow">if</span> (lhsLocations == rhsLocations)</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">return</span> Same;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">contains</a>(rhsLocations))</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keywordflow">return</span> Superset;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">contains</a>(lhsLocations))</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> Subset;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">return</span> Overlap;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  }</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  {</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">return</span> NonOverlap;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> }</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c"> 217</a></span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c">LocationSet::dump</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="keyword"></span>{</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> </div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  rawstr << <span class="stringliteral">"LocationSet\tField_Index: "</span> << accumulateConstantFieldIdx();</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  rawstr << <span class="stringliteral">",\tNum-Stride: {"</span>;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& vec = getOffsetValueVec();</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  OffsetValueVec::const_iterator it = vec.begin();</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  OffsetValueVec::const_iterator eit = vec.end();</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">for</span> (; it != eit; ++it)</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  {</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  rawstr << <span class="stringliteral">" (value: "</span> << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a7486fd8e5350879ed1cbd835c0d4e191">value2String</a>(it->first) << <span class="stringliteral">" type: "</span> << it->second << <span class="stringliteral">")"</span>;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  }</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  rawstr << <span class="stringliteral">" }\n"</span>;</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a4a9185282308c50f86fdf66f7060373d"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d">SVF::LocationSet::isConstantOffset</a></div><div class="ttdeci">bool isConstantOffset() const</div><div class="ttdoc">Return TRUE if this is a constant location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00051">LocationSet.cpp:51</a></div></div>
|
|
69
|
+
<a href="LocationSet_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- LocationSet.cpp -- Location set for modeling abstract memory object----//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * @file: LocationSet.cpp</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * @author: yesen</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * @date: 26 Sep 2014</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * LICENSE</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> *</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> */</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="LocationSet_8h.html">MemoryModel/LocationSet.h</a>"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="SVFUtil_8h.html">Util/SVFUtil.h</a>"</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVFUtil.html">SVFUtil</a>;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">using namespace </span><a class="code" href="namespaceLLVMUtil.html">LLVMUtil</a>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b"> 44</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b">LocationSet::addOffsetValue</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* offsetVal, <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  offsetValues.push_back(std::make_pair(offsetVal,type));</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d"> 51</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d">LocationSet::isConstantOffset</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keyword"></span>{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> it : offsetValues)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ConstantInt>(it.first) == <span class="keyword">false</span>)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> }</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311"> 65</a></span> <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> <a class="code" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">LocationSet::getElementNum</a>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>)<span class="keyword"> const</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keyword"></span>{</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ArrayType>(type) || SVFUtil::isa<StructType>(type))</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#aec579894eed558ea89740b68360187aa">getNumOfFlattenElements</a>(type);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (type->isSingleValueType())</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(type))</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> getElementNum(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<FunctionType>(type))</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">SVFUtil::outs</a>() << <span class="stringliteral">"GepIter Type"</span> << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a817a63e8330530cb18e077556f7ce518">type2String</a>(type) << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  assert(<span class="keyword">false</span> && <span class="stringliteral">"What other types for this gep?"</span>);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  abort();</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  }</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> }</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// struct inner{ int rollNumber; float percentage;};</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment">// struct Student { struct inner rollNumber; char studentName[10][3];}</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment">// char x = studentRecord[1].studentName[3][2];</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710"> 120</a></span> <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> <a class="code" href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">LocationSet::accumulateConstantOffset</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="keyword"></span>{</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  assert(isConstantOffset() && <span class="stringliteral">"not a constant offset"</span>);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span>(offsetValues.empty())</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> accumulateConstantFieldIdx();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> totalConstOffset = 0;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = offsetValues.size() - 1; i >= 0; i--)</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* value = offsetValues[i].first;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a> = offsetValues[i].second;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">ConstantInt</a> *op = <a class="code" href="namespaceSVF_1_1SVFUtil.html#a8182be247907420db00837cef9bcfa70">SVFUtil::dyn_cast</a><<a class="code" href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">ConstantInt</a>>(value);</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  assert(op && <span class="stringliteral">"not a constant offset?"</span>);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">if</span>(type==<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  totalConstOffset += op->getSExtValue();</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  }</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(type))</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  totalConstOffset += op->getSExtValue() * getElementNum(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  {</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> <a class="code" href="cJSON_8cpp.html#a95bf816579e97b6f33bdb5e25ed6d5de">offset</a> = op->getSExtValue();</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> flattenOffset = <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a8fc42c2b02317621d6aeb3c5f52d3ee8">getFlattenedElemIdx</a>(type, offset);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  totalConstOffset += flattenOffset;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  }</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> totalConstOffset;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> }</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f"> 155</a></span> <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> <a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">LocationSet::computeAllLocations</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="keyword"></span>{</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> result;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  result.<a class="code" href="classSVF_1_1SparseBitVector.html#a61bd86909a141f9de873d92c0f904832">set</a>(accumulateConstantFieldIdx());</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> </div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8"> 162</a></span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a> <a class="code" href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8">LocationSet::operator+ </a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& rhs)<span class="keyword"> const</span></div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="keyword"></span>{</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a> ls(rhs);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  ls.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a> += accumulateConstantFieldIdx();</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  OffsetValueVec::const_iterator it = getOffsetValueVec().begin();</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  OffsetValueVec::const_iterator eit = getOffsetValueVec().end();</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordflow">for</span> (; it != eit; ++it)</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  ls.<a class="code" href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b">addOffsetValue</a>(it->first, it->second);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">return</span> ls;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> }</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> </div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> </div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4"> 175</a></span> <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4">LocationSet::operator< </a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& rhs)<span class="keyword"> const</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="keyword"></span>{</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">if</span> (fldIdx != rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a>)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">return</span> (fldIdx < rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a>);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  {</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& pairVec = getOffsetValueVec();</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& rhsPairVec = rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>();</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">if</span> (pairVec.size() != rhsPairVec.size())</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> (pairVec.size() < rhsPairVec.size());</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  OffsetValueVec::const_iterator it = pairVec.begin();</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  OffsetValueVec::const_iterator rhsIt = rhsPairVec.begin();</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">for</span> (; it != pairVec.end() && rhsIt != rhsPairVec.end(); ++it, ++rhsIt)</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  {</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordflow">return</span> (*it) < (*rhsIt);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  }</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span> </div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10"> 199</a></span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83f">SVF::LocationSet::LSRelation</a> <a class="code" href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10">LocationSet::checkRelation</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& LHS, <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a>& RHS)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> lhsLocations = LHS.<a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>();</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> rhsLocations = RHS.<a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>();</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">if</span> (lhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#a16756e0545fd3d50ab89f45a2e83bb79">intersects</a>(rhsLocations))</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  {</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">if</span> (lhsLocations == rhsLocations)</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> Same;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">contains</a>(rhsLocations))</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">return</span> Superset;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">contains</a>(lhsLocations))</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">return</span> Subset;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">return</span> Overlap;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">return</span> NonOverlap;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> }</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c"> 221</a></span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c">LocationSet::dump</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> <span class="keyword"></span>{</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  rawstr << <span class="stringliteral">"LocationSet\tField_Index: "</span> << accumulateConstantFieldIdx();</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  rawstr << <span class="stringliteral">",\tNum-Stride: {"</span>;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& vec = getOffsetValueVec();</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  OffsetValueVec::const_iterator it = vec.begin();</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  OffsetValueVec::const_iterator eit = vec.end();</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">for</span> (; it != eit; ++it)</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  {</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  rawstr << <span class="stringliteral">" (value: "</span> << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a7486fd8e5350879ed1cbd835c0d4e191">value2String</a>(it->first) << <span class="stringliteral">" type: "</span> << it->second << <span class="stringliteral">")"</span>;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  }</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  rawstr << <span class="stringliteral">" }\n"</span>;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a4a9185282308c50f86fdf66f7060373d"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d">SVF::LocationSet::isConstantOffset</a></div><div class="ttdeci">bool isConstantOffset() const</div><div class="ttdoc">Return TRUE if this is a constant location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00051">LocationSet.cpp:51</a></div></div>
|
|
70
70
|
<div class="ttc" id="namespaceSVF_html_a1d008c0666c145622b81d427be64c52d"><div class="ttname"><a href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">SVF::Type</a></div><div class="ttdeci">llvm::Type Type</div><div class="ttdoc">LLVM Basic classes. </div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00065">BasicTypes.h:65</a></div></div>
|
|
71
71
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a9bb7e08f7cfb2859d25b0e68e21fec89"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">SVF::LocationSet::OffsetValueVec</a></div><div class="ttdeci">std::vector< std::pair< const Value *, const Type * > > OffsetValueVec</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00057">LocationSet.h:57</a></div></div>
|
|
72
72
|
<div class="ttc" id="namespaceLLVMUtil_html"><div class="ttname"><a href="namespaceLLVMUtil.html">LLVMUtil</a></div></div>
|
|
@@ -76,8 +76,8 @@ $(function() {
|
|
|
76
76
|
<div class="ttc" id="SVFUtil_8h_html"><div class="ttname"><a href="SVFUtil_8h.html">SVFUtil.h</a></div></div>
|
|
77
77
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5c2c1baa17a70b997824002e4c159cbd"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">SVF::LocationSet::fldIdx</a></div><div class="ttdeci">s32_t fldIdx</div><div class="ttdoc">Accumulated Constant Offsets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00132">LocationSet.h:132</a></div></div>
|
|
78
78
|
<div class="ttc" id="namespaceSVF_html_adefcb50414ea999d70cea5ccdbcb98d7"><div class="ttname"><a href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">SVF::ConstantInt</a></div><div class="ttdeci">llvm::ConstantInt ConstantInt</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00094">BasicTypes.h:94</a></div></div>
|
|
79
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_ad8e250859aa1cf6ce18c6c0b7bbb2710"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">SVF::LocationSet::accumulateConstantOffset</a></div><div class="ttdeci">s32_t accumulateConstantOffset() const</div><div class="ttdoc">Return accumulated constant offset given OffsetValueVec. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
80
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
79
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_ad8e250859aa1cf6ce18c6c0b7bbb2710"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">SVF::LocationSet::accumulateConstantOffset</a></div><div class="ttdeci">s32_t accumulateConstantOffset() const</div><div class="ttdoc">Return accumulated constant offset given OffsetValueVec. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00120">LocationSet.cpp:120</a></div></div>
|
|
80
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00155">LocationSet.cpp:155</a></div></div>
|
|
81
81
|
<div class="ttc" id="namespaceSVF_html_ad42bff8d0a7d60a085aa32d10f4955af"><div class="ttname"><a href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">SVF::u32_t</a></div><div class="ttdeci">unsigned u32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00085">SVFBasicTypes.h:85</a></div></div>
|
|
82
82
|
<div class="ttc" id="classSVF_1_1LocationSet_html_aa2682a73f1ab2c32326fb4e0d5b3586b"><div class="ttname"><a href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b">SVF::LocationSet::addOffsetValue</a></div><div class="ttdeci">bool addOffsetValue(const Value *offsetValue, const Type *type)</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00044">LocationSet.cpp:44</a></div></div>
|
|
83
83
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a817a63e8330530cb18e077556f7ce518"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a817a63e8330530cb18e077556f7ce518">SVF::SVFUtil::type2String</a></div><div class="ttdeci">const std::string type2String(const Type *type)</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8cpp_source.html#l00456">SVFUtil.cpp:456</a></div></div>
|
|
@@ -85,7 +85,7 @@ $(function() {
|
|
|
85
85
|
<div class="ttc" id="cJSON_8cpp_html_a3f9a0d3265a6254722587175dac3e4dc"><div class="ttname"><a href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a></div><div class="ttdeci">newitem type</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8cpp_source.html#l02739">cJSON.cpp:2739</a></div></div>
|
|
86
86
|
<div class="ttc" id="namespaceSVFUtil_html"><div class="ttname"><a href="namespaceSVFUtil.html">SVFUtil</a></div></div>
|
|
87
87
|
<div class="ttc" id="namespaceSVF_html_a726981481ac082dcda3e4921416b65a0"><div class="ttname"><a href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">SVF::raw_string_ostream</a></div><div class="ttdeci">llvm::raw_string_ostream raw_string_ostream</div><div class="ttdoc">LLVM outputs. </div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00083">BasicTypes.h:83</a></div></div>
|
|
88
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a67387c3b42fcc1bb3ee8fe85bda02ba8"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8">SVF::LocationSet::operator+</a></div><div class="ttdeci">LocationSet operator+(const LocationSet &rhs) const</div><div class="ttdoc">Overload operators. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
88
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a67387c3b42fcc1bb3ee8fe85bda02ba8"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8">SVF::LocationSet::operator+</a></div><div class="ttdeci">LocationSet operator+(const LocationSet &rhs) const</div><div class="ttdoc">Overload operators. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00162">LocationSet.cpp:162</a></div></div>
|
|
89
89
|
<div class="ttc" id="classSVF_1_1LocationSet_html_ac66b56e1fa180be9b09d7bfe653ff311"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">SVF::LocationSet::getElementNum</a></div><div class="ttdeci">u32_t getElementNum(const Type *type) const</div><div class="ttdoc">Return element number of a type. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00065">LocationSet.cpp:65</a></div></div>
|
|
90
90
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_aed0b0b9f035057552a6a82154fd88e61"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">SVF::SVFUtil::outs</a></div><div class="ttdeci">std::ostream & outs()</div><div class="ttdoc">Overwrite llvm::outs() </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00049">SVFUtil.h:49</a></div></div>
|
|
91
91
|
<div class="ttc" id="classSVF_1_1SymbolTableInfo_html_a267169023fc4f8dd66b145f7231fec11"><div class="ttname"><a href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SVF::SymbolTableInfo::SymbolInfo</a></div><div class="ttdeci">static SymbolTableInfo * SymbolInfo()</div><div class="ttdoc">Singleton design here to make sure we only have one instance during any analysis. ...</div><div class="ttdef"><b>Definition:</b> <a href="SymbolTableInfo_8cpp_source.html#l00108">SymbolTableInfo.cpp:108</a></div></div>
|
|
@@ -103,11 +103,11 @@ $(function() {
|
|
|
103
103
|
<div class="ttc" id="cJSON_8h_html_ad4c68ea99a26b0a98ad9a79982960458"><div class="ttname"><a href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">string</a></div><div class="ttdeci">const char *const string</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8h_source.html#l00172">cJSON.h:172</a></div></div>
|
|
104
104
|
<div class="ttc" id="namespaceSVF_html_a90b263fd2f541eca78135078114cabda"><div class="ttname"><a href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">SVF::Value</a></div><div class="ttdeci">llvm::Value Value</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00072">BasicTypes.h:72</a></div></div>
|
|
105
105
|
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_abba4111230f6009bbf50518ee36a9870"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">SVF::LLVMUtil::getPtrElementType</a></div><div class="ttdeci">static Type * getPtrElementType(const PointerType *pty)</div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00073">LLVMUtil.h:73</a></div></div>
|
|
106
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a53f1b2e417682a56d45dfb1f7d5ccd1c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c">SVF::LocationSet::dump</a></div><div class="ttdeci">std::string dump() const</div><div class="ttdoc">Dump location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
106
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a53f1b2e417682a56d45dfb1f7d5ccd1c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c">SVF::LocationSet::dump</a></div><div class="ttdeci">std::string dump() const</div><div class="ttdoc">Dump location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00221">LocationSet.cpp:221</a></div></div>
|
|
107
107
|
<div class="ttc" id="LLVMUtil_8h_html"><div class="ttname"><a href="LLVMUtil_8h.html">LLVMUtil.h</a></div></div>
|
|
108
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a4e839125b32c7cb3ad07fbec6f203c10"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10">SVF::LocationSet::checkRelation</a></div><div class="ttdeci">LSRelation checkRelation(const LocationSet &LHS, const LocationSet &RHS)</div><div class="ttdoc">Check relations of two location sets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
108
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a4e839125b32c7cb3ad07fbec6f203c10"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10">SVF::LocationSet::checkRelation</a></div><div class="ttdeci">LSRelation checkRelation(const LocationSet &LHS, const LocationSet &RHS)</div><div class="ttdoc">Check relations of two location sets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00199">LocationSet.cpp:199</a></div></div>
|
|
109
109
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5a5ca0b81da0b34ab426bc6a28ed346c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">SVF::LocationSet::getOffsetValueVec</a></div><div class="ttdeci">const OffsetValueVec & getOffsetValueVec() const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00098">LocationSet.h:98</a></div></div>
|
|
110
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a511e8324d88624013eed04e8c2a6cbc4"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4">SVF::LocationSet::operator<</a></div><div class="ttdeci">bool operator<(const LocationSet &rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
110
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a511e8324d88624013eed04e8c2a6cbc4"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4">SVF::LocationSet::operator<</a></div><div class="ttdeci">bool operator<(const LocationSet &rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00175">LocationSet.cpp:175</a></div></div>
|
|
111
111
|
<div class="ttc" id="LocationSet_8h_html"><div class="ttname"><a href="LocationSet_8h.html">LocationSet.h</a></div></div>
|
|
112
112
|
</div><!-- fragment --></div><!-- contents -->
|
|
113
113
|
<!-- start footer part -->
|
|
@@ -75,9 +75,9 @@ $(function() {
|
|
|
75
75
|
<div class="ttc" id="structSVF_1_1Hash_html"><div class="ttname"><a href="structSVF_1_1Hash.html">SVF::Hash</a></div><div class="ttdoc">provide extra hash function for std::pair handling </div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00056">SVFBasicTypes.h:56</a></div></div>
|
|
76
76
|
<div class="ttc" id="namespaceSVF_html_a9b707002523ece2ac54ca893ee9a2d4e"><div class="ttname"><a href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">SVF::s32_t</a></div><div class="ttdeci">signed s32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00086">SVFBasicTypes.h:86</a></div></div>
|
|
77
77
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5c2c1baa17a70b997824002e4c159cbd"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">SVF::LocationSet::fldIdx</a></div><div class="ttdeci">s32_t fldIdx</div><div class="ttdoc">Accumulated Constant Offsets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00132">LocationSet.h:132</a></div></div>
|
|
78
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_ad8e250859aa1cf6ce18c6c0b7bbb2710"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">SVF::LocationSet::accumulateConstantOffset</a></div><div class="ttdeci">s32_t accumulateConstantOffset() const</div><div class="ttdoc">Return accumulated constant offset given OffsetValueVec. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
78
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_ad8e250859aa1cf6ce18c6c0b7bbb2710"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">SVF::LocationSet::accumulateConstantOffset</a></div><div class="ttdeci">s32_t accumulateConstantOffset() const</div><div class="ttdoc">Return accumulated constant offset given OffsetValueVec. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00120">LocationSet.cpp:120</a></div></div>
|
|
79
79
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a002a0c8ec2528835d809bf7eb3ebc83fa8c76affbe3b39db53e8046cd5d79903c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa8c76affbe3b39db53e8046cd5d79903c">SVF::LocationSet::Overlap</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00054">LocationSet.h:54</a></div></div>
|
|
80
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
80
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00155">LocationSet.cpp:155</a></div></div>
|
|
81
81
|
<div class="ttc" id="namespaceSVF_html_ad42bff8d0a7d60a085aa32d10f4955af"><div class="ttname"><a href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">SVF::u32_t</a></div><div class="ttdeci">unsigned u32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00085">SVFBasicTypes.h:85</a></div></div>
|
|
82
82
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a00ae12aee8018f1eb88f011e52762be9"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a00ae12aee8018f1eb88f011e52762be9">SVF::LocationSet::~LocationSet</a></div><div class="ttdeci">~LocationSet()</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00069">LocationSet.h:69</a></div></div>
|
|
83
83
|
<div class="ttc" id="classSVF_1_1LocationSet_html_aa2682a73f1ab2c32326fb4e0d5b3586b"><div class="ttname"><a href="classSVF_1_1LocationSet.html#aa2682a73f1ab2c32326fb4e0d5b3586b">SVF::LocationSet::addOffsetValue</a></div><div class="ttdeci">bool addOffsetValue(const Value *offsetValue, const Type *type)</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00044">LocationSet.cpp:44</a></div></div>
|
|
@@ -86,7 +86,7 @@ $(function() {
|
|
|
86
86
|
<div class="ttc" id="classSVF_1_1LocationSet_html_abe990543374ebd8c1b3ee0d37c83eb8f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#abe990543374ebd8c1b3ee0d37c83eb8f">SVF::LocationSet::setFldIdx</a></div><div class="ttdeci">void setFldIdx(s32_t idx)</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00094">LocationSet.h:94</a></div></div>
|
|
87
87
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5a2792b8b914557a9ccf0e57d0ed8b30"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a2792b8b914557a9ccf0e57d0ed8b30">SVF::LocationSet::offsetValues</a></div><div class="ttdeci">OffsetValueVec offsetValues</div><div class="ttdoc">a vector of actual offset in the form of Values </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00133">LocationSet.h:133</a></div></div>
|
|
88
88
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a63c5c8e03b35e0d0cea94137d309c853"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">SVF::LocationSet::accumulateConstantFieldIdx</a></div><div class="ttdeci">s32_t accumulateConstantFieldIdx() const</div><div class="ttdoc">Get methods. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00090">LocationSet.h:90</a></div></div>
|
|
89
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a67387c3b42fcc1bb3ee8fe85bda02ba8"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8">SVF::LocationSet::operator+</a></div><div class="ttdeci">LocationSet operator+(const LocationSet &rhs) const</div><div class="ttdoc">Overload operators. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
89
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a67387c3b42fcc1bb3ee8fe85bda02ba8"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a67387c3b42fcc1bb3ee8fe85bda02ba8">SVF::LocationSet::operator+</a></div><div class="ttdeci">LocationSet operator+(const LocationSet &rhs) const</div><div class="ttdoc">Overload operators. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00162">LocationSet.cpp:162</a></div></div>
|
|
90
90
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a002a0c8ec2528835d809bf7eb3ebc83fa2241035beb87cdd725d979371537d500"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa2241035beb87cdd725d979371537d500">SVF::LocationSet::Superset</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00054">LocationSet.h:54</a></div></div>
|
|
91
91
|
<div class="ttc" id="classSVF_1_1LocationSet_html_ac66b56e1fa180be9b09d7bfe653ff311"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">SVF::LocationSet::getElementNum</a></div><div class="ttdeci">u32_t getElementNum(const Type *type) const</div><div class="ttdoc">Return element number of a type. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00065">LocationSet.cpp:65</a></div></div>
|
|
92
92
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a1b141afb9a38d12423f66b2dfe6bf232"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a1b141afb9a38d12423f66b2dfe6bf232">SVF::LocationSet::operator==</a></div><div class="ttdeci">bool operator==(const LocationSet &rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00081">LocationSet.h:81</a></div></div>
|
|
@@ -102,10 +102,10 @@ $(function() {
|
|
|
102
102
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a002a0c8ec2528835d809bf7eb3ebc83fafb9c7d6d06f6f3ab60bd575aaca5d14d"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fafb9c7d6d06f6f3ab60bd575aaca5d14d">SVF::LocationSet::NonOverlap</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00054">LocationSet.h:54</a></div></div>
|
|
103
103
|
<div class="ttc" id="cJSON_8h_html_ad4c68ea99a26b0a98ad9a79982960458"><div class="ttname"><a href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">string</a></div><div class="ttdeci">const char *const string</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8h_source.html#l00172">cJSON.h:172</a></div></div>
|
|
104
104
|
<div class="ttc" id="namespaceSVF_html_a90b263fd2f541eca78135078114cabda"><div class="ttname"><a href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">SVF::Value</a></div><div class="ttdeci">llvm::Value Value</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00072">BasicTypes.h:72</a></div></div>
|
|
105
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a53f1b2e417682a56d45dfb1f7d5ccd1c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c">SVF::LocationSet::dump</a></div><div class="ttdeci">std::string dump() const</div><div class="ttdoc">Dump location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
106
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a4e839125b32c7cb3ad07fbec6f203c10"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10">SVF::LocationSet::checkRelation</a></div><div class="ttdeci">LSRelation checkRelation(const LocationSet &LHS, const LocationSet &RHS)</div><div class="ttdoc">Check relations of two location sets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
105
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a53f1b2e417682a56d45dfb1f7d5ccd1c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a53f1b2e417682a56d45dfb1f7d5ccd1c">SVF::LocationSet::dump</a></div><div class="ttdeci">std::string dump() const</div><div class="ttdoc">Dump location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00221">LocationSet.cpp:221</a></div></div>
|
|
106
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a4e839125b32c7cb3ad07fbec6f203c10"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4e839125b32c7cb3ad07fbec6f203c10">SVF::LocationSet::checkRelation</a></div><div class="ttdeci">LSRelation checkRelation(const LocationSet &LHS, const LocationSet &RHS)</div><div class="ttdoc">Check relations of two location sets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00199">LocationSet.cpp:199</a></div></div>
|
|
107
107
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5a5ca0b81da0b34ab426bc6a28ed346c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">SVF::LocationSet::getOffsetValueVec</a></div><div class="ttdeci">const OffsetValueVec & getOffsetValueVec() const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00098">LocationSet.h:98</a></div></div>
|
|
108
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_a511e8324d88624013eed04e8c2a6cbc4"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4">SVF::LocationSet::operator<</a></div><div class="ttdeci">bool operator<(const LocationSet &rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
108
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_a511e8324d88624013eed04e8c2a6cbc4"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a511e8324d88624013eed04e8c2a6cbc4">SVF::LocationSet::operator<</a></div><div class="ttdeci">bool operator<(const LocationSet &rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00175">LocationSet.cpp:175</a></div></div>
|
|
109
109
|
<div class="ttc" id="classSVF_1_1SymbolTableInfo_html"><div class="ttname"><a href="classSVF_1_1SymbolTableInfo.html">SVF::SymbolTableInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="SymbolTableInfo_8h_source.html#l00047">SymbolTableInfo.h:47</a></div></div>
|
|
110
110
|
</div><!-- fragment --></div><!-- contents -->
|
|
111
111
|
<!-- start footer part -->
|
|
@@ -424,7 +424,7 @@ Additional Inherited Members</h2></td></tr>
|
|
|
424
424
|
<p>Return accumulated constant offset (when accessing array or struct) if this offset is a constant. </p>
|
|
425
425
|
|
|
426
426
|
<p class="definition">Definition at line <a class="el" href="SVFStatements_8h_source.html#l00454">454</a> of file <a class="el" href="SVFStatements_8h_source.html">SVFStatements.h</a>.</p>
|
|
427
|
-
<div class="fragment"><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  {</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1GepStmt.html#abec33091e0dac0cdd5b95b6d7b0db3d8">getLocationSet</a>().<a class="code" href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">accumulateConstantOffset</a>();</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  }</div><div class="ttc" id="classSVF_1_1LocationSet_html_ad8e250859aa1cf6ce18c6c0b7bbb2710"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">SVF::LocationSet::accumulateConstantOffset</a></div><div class="ttdeci">s32_t accumulateConstantOffset() const</div><div class="ttdoc">Return accumulated constant offset given OffsetValueVec. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
427
|
+
<div class="fragment"><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  {</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1GepStmt.html#abec33091e0dac0cdd5b95b6d7b0db3d8">getLocationSet</a>().<a class="code" href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">accumulateConstantOffset</a>();</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  }</div><div class="ttc" id="classSVF_1_1LocationSet_html_ad8e250859aa1cf6ce18c6c0b7bbb2710"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ad8e250859aa1cf6ce18c6c0b7bbb2710">SVF::LocationSet::accumulateConstantOffset</a></div><div class="ttdeci">s32_t accumulateConstantOffset() const</div><div class="ttdoc">Return accumulated constant offset given OffsetValueVec. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00120">LocationSet.cpp:120</a></div></div>
|
|
428
428
|
<div class="ttc" id="classSVF_1_1GepStmt_html_abec33091e0dac0cdd5b95b6d7b0db3d8"><div class="ttname"><a href="classSVF_1_1GepStmt.html#abec33091e0dac0cdd5b95b6d7b0db3d8">SVF::GepStmt::getLocationSet</a></div><div class="ttdeci">const LocationSet & getLocationSet() const</div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00440">SVFStatements.h:440</a></div></div>
|
|
429
429
|
</div><!-- fragment -->
|
|
430
430
|
</div>
|
|
@@ -351,8 +351,8 @@ Friends</h2></td></tr>
|
|
|
351
351
|
<p>Return accumulated constant offset</p>
|
|
352
352
|
<p>"value" is the offset variable (must be a constant) "type" is the location where we want to compute offset Given a vector: [(value1,type1), (value2,type2), (value3,type3)] totalConstOffset = flattenOffset(value1,type1) * flattenOffset(value2,type2) + flattenOffset(value3,type3) For a pointer type (e.g., t1 is PointerType), we will retrieve the pointee type and times the offset, i.e., getElementNum(t1) X off1%5 = getelementptr inbounds struct.Student, struct.Student* %4, i64 1 value1: i64 1 type1: struct.Student* accumulateConstantOffset = 32 %6 = getelementptr inbounds struct.Student, struct.Student* %5, i32 0, i32 1 value1: i32 0 type1: struct.Student* value2: i32 1 type2: struct.Student = type { struct.inner, [10 x [3 x i8]] } accumulateConstantOffset = 2 %7 = getelementptr inbounds [10 x [3 x i8]], [10 x [3 x i8]]* %6, i64 0, i64 3 value1: i64 0 type1: [10 x [3 x i8]]* value2: i64 3 type2: [10 x [3 x i8]] accumulateConstantOffset = 9 %8 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 2 value1: i64 0 type1: [3 x i8]* value2: i64 2 type2: [3 x i8] accumulateConstantOffset = 2 </p>
|
|
353
353
|
|
|
354
|
-
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#
|
|
355
|
-
<div class="fragment"><div class="line"><a name="
|
|
354
|
+
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00120">120</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
355
|
+
<div class="fragment"><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  assert(<a class="code" href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d">isConstantOffset</a>() && <span class="stringliteral">"not a constant offset"</span>);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1LocationSet.html#a5a2792b8b914557a9ccf0e57d0ed8b30">offsetValues</a>.empty())</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">accumulateConstantFieldIdx</a>();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> totalConstOffset = 0;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = <a class="code" href="classSVF_1_1LocationSet.html#a5a2792b8b914557a9ccf0e57d0ed8b30">offsetValues</a>.size() - 1; i >= 0; i--)</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* value = <a class="code" href="classSVF_1_1LocationSet.html#a5a2792b8b914557a9ccf0e57d0ed8b30">offsetValues</a>[i].first;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">Type</a>* <a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a> = <a class="code" href="classSVF_1_1LocationSet.html#a5a2792b8b914557a9ccf0e57d0ed8b30">offsetValues</a>[i].second;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">ConstantInt</a> *op = <a class="code" href="namespaceSVF_1_1SVFUtil.html#a8182be247907420db00837cef9bcfa70">SVFUtil::dyn_cast</a><<a class="code" href="namespaceSVF.html#adefcb50414ea999d70cea5ccdbcb98d7">ConstantInt</a>>(value);</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  assert(op && <span class="stringliteral">"not a constant offset?"</span>);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">if</span>(type==<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  totalConstOffset += op->getSExtValue();</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  }</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(type))</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  totalConstOffset += op->getSExtValue() * <a class="code" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">getElementNum</a>(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  {</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="namespaceSVF.html#a9b707002523ece2ac54ca893ee9a2d4e">s32_t</a> <a class="code" href="cJSON_8cpp.html#a95bf816579e97b6f33bdb5e25ed6d5de">offset</a> = op->getSExtValue();</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> flattenOffset = <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#a8fc42c2b02317621d6aeb3c5f52d3ee8">getFlattenedElemIdx</a>(type, offset);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  totalConstOffset += flattenOffset;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  }</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> totalConstOffset;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a4a9185282308c50f86fdf66f7060373d"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a4a9185282308c50f86fdf66f7060373d">SVF::LocationSet::isConstantOffset</a></div><div class="ttdeci">bool isConstantOffset() const</div><div class="ttdoc">Return TRUE if this is a constant location set. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00051">LocationSet.cpp:51</a></div></div>
|
|
356
356
|
<div class="ttc" id="namespaceSVF_html_a1d008c0666c145622b81d427be64c52d"><div class="ttname"><a href="namespaceSVF.html#a1d008c0666c145622b81d427be64c52d">SVF::Type</a></div><div class="ttdeci">llvm::Type Type</div><div class="ttdoc">LLVM Basic classes. </div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00065">BasicTypes.h:65</a></div></div>
|
|
357
357
|
<div class="ttc" id="namespaceSVF_html_aa962cc1d782cc46553251e96b64a754b"><div class="ttname"><a href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">SVF::PointerType</a></div><div class="ttdeci">llvm::PointerType PointerType</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00089">BasicTypes.h:89</a></div></div>
|
|
358
358
|
<div class="ttc" id="classSVF_1_1SymbolTableInfo_html_a8fc42c2b02317621d6aeb3c5f52d3ee8"><div class="ttname"><a href="classSVF_1_1SymbolTableInfo.html#a8fc42c2b02317621d6aeb3c5f52d3ee8">SVF::SymbolTableInfo::getFlattenedElemIdx</a></div><div class="ttdeci">u32_t getFlattenedElemIdx(const Type *T, u32_t origId)</div><div class="ttdoc">Flatterned element idx of an array or struct by considering stride. </div><div class="ttdef"><b>Definition:</b> <a href="SymbolTableInfo_8cpp_source.html#l00375">SymbolTableInfo.cpp:375</a></div></div>
|
|
@@ -440,9 +440,9 @@ Friends</h2></td></tr>
|
|
|
440
440
|
|
|
441
441
|
<p>Check relations of two location sets. </p>
|
|
442
442
|
|
|
443
|
-
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#
|
|
444
|
-
<div class="fragment"><div class="line"><a name="
|
|
445
|
-
<div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
443
|
+
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00199">199</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
444
|
+
<div class="fragment"><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> lhsLocations = LHS.<a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>();</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> rhsLocations = RHS.<a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>();</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">if</span> (lhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#a16756e0545fd3d50ab89f45a2e83bb79">intersects</a>(rhsLocations))</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  {</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">if</span> (lhsLocations == rhsLocations)</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa9b2a5e3c7f7873ac4491ff231e0601d2">Same</a>;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">contains</a>(rhsLocations))</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa2241035beb87cdd725d979371537d500">Superset</a>;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (rhsLocations.<a class="code" href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">contains</a>(lhsLocations))</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83faf6a3c1bcfe2d3f79b227b649e89edd72">Subset</a>;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa8c76affbe3b39db53e8046cd5d79903c">Overlap</a>;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  {</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fafb9c7d6d06f6f3ab60bd575aaca5d14d">NonOverlap</a>;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a002a0c8ec2528835d809bf7eb3ebc83fa8c76affbe3b39db53e8046cd5d79903c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa8c76affbe3b39db53e8046cd5d79903c">SVF::LocationSet::Overlap</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00054">LocationSet.h:54</a></div></div>
|
|
445
|
+
<div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00155">LocationSet.cpp:155</a></div></div>
|
|
446
446
|
<div class="ttc" id="classSVF_1_1SparseBitVector_html_abbd0e0cf759fad7858224ed8a63aade8"><div class="ttname"><a href="classSVF_1_1SparseBitVector.html#abbd0e0cf759fad7858224ed8a63aade8">SVF::SparseBitVector::contains</a></div><div class="ttdeci">bool contains(const SparseBitVector< ElementSize > &RHS) const</div><div class="ttdef"><b>Definition:</b> <a href="SparseBitVector_8h_source.html#l01071">SparseBitVector.h:1071</a></div></div>
|
|
447
447
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a002a0c8ec2528835d809bf7eb3ebc83faf6a3c1bcfe2d3f79b227b649e89edd72"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83faf6a3c1bcfe2d3f79b227b649e89edd72">SVF::LocationSet::Subset</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00054">LocationSet.h:54</a></div></div>
|
|
448
448
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a002a0c8ec2528835d809bf7eb3ebc83fa2241035beb87cdd725d979371537d500"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a002a0c8ec2528835d809bf7eb3ebc83fa2241035beb87cdd725d979371537d500">SVF::LocationSet::Superset</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00054">LocationSet.h:54</a></div></div>
|
|
@@ -479,8 +479,8 @@ Friends</h2></td></tr>
|
|
|
479
479
|
<p>Compute all possible locations according to offset and number-stride pairs. </p>
|
|
480
480
|
<p>Compute all possible locations according to offset and number-stride pairs. </p>
|
|
481
481
|
|
|
482
|
-
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#
|
|
483
|
-
<div class="fragment"><div class="line"><a name="
|
|
482
|
+
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00155">155</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
483
|
+
<div class="fragment"><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="classSVF_1_1SparseBitVector.html">NodeBS</a> result;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  result.<a class="code" href="classSVF_1_1SparseBitVector.html#a61bd86909a141f9de873d92c0f904832">set</a>(<a class="code" href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">accumulateConstantFieldIdx</a>());</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a63c5c8e03b35e0d0cea94137d309c853"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">SVF::LocationSet::accumulateConstantFieldIdx</a></div><div class="ttdeci">s32_t accumulateConstantFieldIdx() const</div><div class="ttdoc">Get methods. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00090">LocationSet.h:90</a></div></div>
|
|
484
484
|
<div class="ttc" id="classSVF_1_1SparseBitVector_html"><div class="ttname"><a href="classSVF_1_1SparseBitVector.html">SVF::SparseBitVector</a></div><div class="ttdef"><b>Definition:</b> <a href="SparseBitVector_8h_source.html#l00460">SparseBitVector.h:460</a></div></div>
|
|
485
485
|
<div class="ttc" id="classSVF_1_1SparseBitVector_html_a61bd86909a141f9de873d92c0f904832"><div class="ttname"><a href="classSVF_1_1SparseBitVector.html#a61bd86909a141f9de873d92c0f904832">SVF::SparseBitVector::set</a></div><div class="ttdeci">void set(unsigned Idx)</div><div class="ttdef"><b>Definition:</b> <a href="SparseBitVector_8h_source.html#l00745">SparseBitVector.h:745</a></div></div>
|
|
486
486
|
</div><!-- fragment -->
|
|
@@ -503,8 +503,8 @@ Friends</h2></td></tr>
|
|
|
503
503
|
|
|
504
504
|
<p>Dump location set. </p>
|
|
505
505
|
|
|
506
|
-
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#
|
|
507
|
-
<div class="fragment"><div class="line"><a name="
|
|
506
|
+
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00221">221</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
507
|
+
<div class="fragment"><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> {</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  rawstr << <span class="stringliteral">"LocationSet\tField_Index: "</span> << <a class="code" href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">accumulateConstantFieldIdx</a>();</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  rawstr << <span class="stringliteral">",\tNum-Stride: {"</span>;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& vec = <a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>();</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  OffsetValueVec::const_iterator it = vec.begin();</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  OffsetValueVec::const_iterator eit = vec.end();</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">for</span> (; it != eit; ++it)</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  {</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  rawstr << <span class="stringliteral">" (value: "</span> << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a7486fd8e5350879ed1cbd835c0d4e191">value2String</a>(it->first) << <span class="stringliteral">" type: "</span> << it->second << <span class="stringliteral">")"</span>;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  }</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  rawstr << <span class="stringliteral">" }\n"</span>;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a9bb7e08f7cfb2859d25b0e68e21fec89"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">SVF::LocationSet::OffsetValueVec</a></div><div class="ttdeci">std::vector< std::pair< const Value *, const Type * > > OffsetValueVec</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00057">LocationSet.h:57</a></div></div>
|
|
508
508
|
<div class="ttc" id="namespaceSVF_html_a726981481ac082dcda3e4921416b65a0"><div class="ttname"><a href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">SVF::raw_string_ostream</a></div><div class="ttdeci">llvm::raw_string_ostream raw_string_ostream</div><div class="ttdoc">LLVM outputs. </div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00083">BasicTypes.h:83</a></div></div>
|
|
509
509
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a63c5c8e03b35e0d0cea94137d309c853"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">SVF::LocationSet::accumulateConstantFieldIdx</a></div><div class="ttdeci">s32_t accumulateConstantFieldIdx() const</div><div class="ttdoc">Get methods. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00090">LocationSet.h:90</a></div></div>
|
|
510
510
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a7486fd8e5350879ed1cbd835c0d4e191"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a7486fd8e5350879ed1cbd835c0d4e191">SVF::SVFUtil::value2String</a></div><div class="ttdeci">const std::string value2String(const Value *value)</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8cpp_source.html#l00390">SVFUtil.cpp:390</a></div></div>
|
|
@@ -534,7 +534,7 @@ Friends</h2></td></tr>
|
|
|
534
534
|
<p>This is a pointer arithmic </p>
|
|
535
535
|
|
|
536
536
|
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00065">65</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
537
|
-
<div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ArrayType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>) || SVFUtil::isa<StructType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>))</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#aec579894eed558ea89740b68360187aa">getNumOfFlattenElements</a>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>->isSingleValueType())</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>))</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">getElementNum</a>(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">else</span
|
|
537
|
+
<div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ArrayType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>) || SVFUtil::isa<StructType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>))</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1SymbolTableInfo.html#a267169023fc4f8dd66b145f7231fec11">SymbolTableInfo::SymbolInfo</a>()-><a class="code" href="classSVF_1_1SymbolTableInfo.html#aec579894eed558ea89740b68360187aa">getNumOfFlattenElements</a>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>->isSingleValueType())</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">PointerType</a>* pty = SVFUtil::dyn_cast<PointerType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>))</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">getElementNum</a>(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#abba4111230f6009bbf50518ee36a9870">getPtrElementType</a>(pty));</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<FunctionType>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>))</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">SVFUtil::outs</a>() << <span class="stringliteral">"GepIter Type"</span> << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a817a63e8330530cb18e077556f7ce518">type2String</a>(<a class="code" href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a>) << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  assert(<span class="keyword">false</span> && <span class="stringliteral">"What other types for this gep?"</span>);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  abort();</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  }</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> }</div><div class="ttc" id="namespaceSVF_html_aa962cc1d782cc46553251e96b64a754b"><div class="ttname"><a href="namespaceSVF.html#aa962cc1d782cc46553251e96b64a754b">SVF::PointerType</a></div><div class="ttdeci">llvm::PointerType PointerType</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00089">BasicTypes.h:89</a></div></div>
|
|
538
538
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a817a63e8330530cb18e077556f7ce518"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a817a63e8330530cb18e077556f7ce518">SVF::SVFUtil::type2String</a></div><div class="ttdeci">const std::string type2String(const Type *type)</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8cpp_source.html#l00456">SVFUtil.cpp:456</a></div></div>
|
|
539
539
|
<div class="ttc" id="cJSON_8cpp_html_a3f9a0d3265a6254722587175dac3e4dc"><div class="ttname"><a href="cJSON_8cpp.html#a3f9a0d3265a6254722587175dac3e4dc">type</a></div><div class="ttdeci">newitem type</div><div class="ttdef"><b>Definition:</b> <a href="cJSON_8cpp_source.html#l02739">cJSON.cpp:2739</a></div></div>
|
|
540
540
|
<div class="ttc" id="classSVF_1_1LocationSet_html_ac66b56e1fa180be9b09d7bfe653ff311"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ac66b56e1fa180be9b09d7bfe653ff311">SVF::LocationSet::getElementNum</a></div><div class="ttdeci">u32_t getElementNum(const Type *type) const</div><div class="ttdoc">Return element number of a type. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00065">LocationSet.cpp:65</a></div></div>
|
|
@@ -600,7 +600,7 @@ Friends</h2></td></tr>
|
|
|
600
600
|
<p>Return TRUE if we share any location in common with RHS. </p>
|
|
601
601
|
|
|
602
602
|
<p class="definition">Definition at line <a class="el" href="LocationSet_8h_source.html#l00116">116</a> of file <a class="el" href="LocationSet_8h_source.html">LocationSet.h</a>.</p>
|
|
603
|
-
<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>().<a class="code" href="classSVF_1_1SparseBitVector.html#a16756e0545fd3d50ab89f45a2e83bb79">intersects</a>(RHS.computeAllLocations());</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#
|
|
603
|
+
<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">computeAllLocations</a>().<a class="code" href="classSVF_1_1SparseBitVector.html#a16756e0545fd3d50ab89f45a2e83bb79">intersects</a>(RHS.computeAllLocations());</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="ttc" id="classSVF_1_1LocationSet_html_afc0f702b6cce26861b409130fe5e019f"><div class="ttname"><a href="classSVF_1_1LocationSet.html#afc0f702b6cce26861b409130fe5e019f">SVF::LocationSet::computeAllLocations</a></div><div class="ttdeci">NodeBS computeAllLocations() const</div><div class="ttdoc">Compute all possible locations according to offset and number-stride pairs. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8cpp_source.html#l00155">LocationSet.cpp:155</a></div></div>
|
|
604
604
|
<div class="ttc" id="classSVF_1_1SparseBitVector_html_a16756e0545fd3d50ab89f45a2e83bb79"><div class="ttname"><a href="classSVF_1_1SparseBitVector.html#a16756e0545fd3d50ab89f45a2e83bb79">SVF::SparseBitVector::intersects</a></div><div class="ttdeci">bool intersects(const SparseBitVector< ElementSize > *RHS) const</div><div class="ttdef"><b>Definition:</b> <a href="SparseBitVector_8h_source.html#l01029">SparseBitVector.h:1029</a></div></div>
|
|
605
605
|
</div><!-- fragment -->
|
|
606
606
|
</div>
|
|
@@ -646,8 +646,8 @@ Friends</h2></td></tr>
|
|
|
646
646
|
|
|
647
647
|
<p>Overload operators. </p>
|
|
648
648
|
|
|
649
|
-
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#
|
|
650
|
-
<div class="fragment"><div class="line"><a name="
|
|
649
|
+
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00162">162</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
650
|
+
<div class="fragment"><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> {</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classSVF_1_1LocationSet.html">LocationSet</a> ls(rhs);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  ls.fldIdx += <a class="code" href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">accumulateConstantFieldIdx</a>();</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  OffsetValueVec::const_iterator it = <a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>().begin();</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  OffsetValueVec::const_iterator eit = <a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>().end();</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordflow">for</span> (; it != eit; ++it)</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  ls.addOffsetValue(it->first, it->second);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordflow">return</span> ls;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a63c5c8e03b35e0d0cea94137d309c853"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a63c5c8e03b35e0d0cea94137d309c853">SVF::LocationSet::accumulateConstantFieldIdx</a></div><div class="ttdeci">s32_t accumulateConstantFieldIdx() const</div><div class="ttdoc">Get methods. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00090">LocationSet.h:90</a></div></div>
|
|
651
651
|
<div class="ttc" id="classSVF_1_1LocationSet_html"><div class="ttname"><a href="classSVF_1_1LocationSet.html">SVF::LocationSet</a></div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00048">LocationSet.h:48</a></div></div>
|
|
652
652
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5a5ca0b81da0b34ab426bc6a28ed346c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">SVF::LocationSet::getOffsetValueVec</a></div><div class="ttdeci">const OffsetValueVec & getOffsetValueVec() const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00098">LocationSet.h:98</a></div></div>
|
|
653
653
|
</div><!-- fragment -->
|
|
@@ -669,8 +669,8 @@ Friends</h2></td></tr>
|
|
|
669
669
|
</table>
|
|
670
670
|
</div><div class="memdoc">
|
|
671
671
|
|
|
672
|
-
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#
|
|
673
|
-
<div class="fragment"><div class="line"><a name="
|
|
672
|
+
<p class="definition">Definition at line <a class="el" href="LocationSet_8cpp_source.html#l00175">175</a> of file <a class="el" href="LocationSet_8cpp_source.html">LocationSet.cpp</a>.</p>
|
|
673
|
+
<div class="fragment"><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a> != rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a>)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">return</span> (<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a> < rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">fldIdx</a>);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  {</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& pairVec = <a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>();</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">OffsetValueVec</a>& rhsPairVec = rhs.<a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>();</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">if</span> (pairVec.size() != rhsPairVec.size())</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> (pairVec.size() < rhsPairVec.size());</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  OffsetValueVec::const_iterator it = pairVec.begin();</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  OffsetValueVec::const_iterator rhsIt = rhsPairVec.begin();</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">for</span> (; it != pairVec.end() && rhsIt != rhsPairVec.end(); ++it, ++rhsIt)</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  {</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordflow">return</span> (*it) < (*rhsIt);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  }</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div><div class="ttc" id="classSVF_1_1LocationSet_html_a9bb7e08f7cfb2859d25b0e68e21fec89"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a9bb7e08f7cfb2859d25b0e68e21fec89">SVF::LocationSet::OffsetValueVec</a></div><div class="ttdeci">std::vector< std::pair< const Value *, const Type * > > OffsetValueVec</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00057">LocationSet.h:57</a></div></div>
|
|
674
674
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5c2c1baa17a70b997824002e4c159cbd"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5c2c1baa17a70b997824002e4c159cbd">SVF::LocationSet::fldIdx</a></div><div class="ttdeci">s32_t fldIdx</div><div class="ttdoc">Accumulated Constant Offsets. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00132">LocationSet.h:132</a></div></div>
|
|
675
675
|
<div class="ttc" id="classSVF_1_1LocationSet_html_a5a5ca0b81da0b34ab426bc6a28ed346c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">SVF::LocationSet::getOffsetValueVec</a></div><div class="ttdeci">const OffsetValueVec & getOffsetValueVec() const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00098">LocationSet.h:98</a></div></div>
|
|
676
676
|
</div><!-- fragment -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.516",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|