Commit cd4006f
committed
[SelectionDAGBuidler] Remove NodeMap updates from getValueImpl. NFC
Both callers already put the result in NodeMap immediately after
the call.
A long time ago getValueImpl's body was part of getValue. There was
reference taken to NodeMap[V] taken at the beginning and that reference
was used to update the map. But getValue is recursive for the creation of
builder_vector. The recursion may invalidate that reference so the
builder_vector code couldn't use that reference and had to update the
map directly. Later another recursive case was added that was added
and to fix the stale reference, getValueImpl was introduced with the
map update being done by the caller. Since build_vector had its own
NodeMap update, I guess it was missed in that update. The other NodeMap
update this patch removes were probably just copied from the build_vector
code without knowing it was unnecessary.1 parent a0fbc19 commit cd4006f
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1855 | 1855 | | |
1856 | 1856 | | |
1857 | 1857 | | |
1858 | | - | |
| 1858 | + | |
1859 | 1859 | | |
1860 | 1860 | | |
1861 | 1861 | | |
| |||
1898 | 1898 | | |
1899 | 1899 | | |
1900 | 1900 | | |
1901 | | - | |
| 1901 | + | |
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
| |||
1918 | 1918 | | |
1919 | 1919 | | |
1920 | 1920 | | |
1921 | | - | |
| 1921 | + | |
1922 | 1922 | | |
1923 | 1923 | | |
1924 | 1924 | | |
| |||
1931 | 1931 | | |
1932 | 1932 | | |
1933 | 1933 | | |
1934 | | - | |
| 1934 | + | |
1935 | 1935 | | |
1936 | 1936 | | |
1937 | 1937 | | |
| |||
0 commit comments