No need to check for non-existing std::map elements
It seems we added guards to check for non-existing std::map elements to make sure they are default constructed before first accessed. Besides, the code being wrong because of checking Context.NonAffineAccesses[BasePointer].size() instead of Context.cound(BasePointer), such a check is also not necessary as std::map takes care of this already. From the std::map documentation: "If k does not match the key of any element in the container, the function inserts a new element with that key and returns a reference to its mapped value. Notice that this always increases the container size by one, even if no mapped value is assigned to the element (the element is constructed using its default constructor)." llvm-svn: 217506
Loading
Please sign in to comment