Commits

Xin Tong committed 63caeac37bf
Remove StoreMap from load forwarding. StoreMap allows stores with different values from different paths of the program to be forwarded. The way it is implemented is quite limited and may be difficult to maintain. (For stores with the same value (same store inst) from all the predecessor, we keep it in the Stores data structure). 1. It can only look at the immediate predecessors of the basic block, i.e. StoreMap looks at the immediate predecessors, if all of them have values but not all identical coming in for a memory location, the StoreMap is computed and used for forwarding in the current basic block. 2. It can be confusing and difficult to maintain, when a memory location have the same stored value coming in from its predecessors, we keep it in the Stores data structre. Otherwise, we keep it in StoreMap. As a result we need to check the Stores and StoreMap everytime an interfering load/store is encountered. We should have a single place to keep the map between memory location to their value, regardless of their values. This will make code cleaner and maintenance easier. 3. StoreMap does not fit in the future design. As stated in plan for the new load forwarding (which will build on top of the old load forward - r32509). we will keep the map between location<->value in a single data structure regardless they have same or different incoming values from different predecessors. 4. StoreMap currently does not provide much performance benefits. rdar://23023349 5. A radar is created to track the new implementation will be able to handle all storemap handled cases. rdar://23023349 After talking to Michael Gottesman and agonizing over this for some time. I decide to remove the StoreMap before the new implementation is in place, primarily because StoreMap is really not going to be useful in the new design and it will just turn into more maintenance effort as the new design is implemented. NOTE: The Stores data structure falls into the way the new design can be implemented so, its kept. Removing StoreMap paves the road for the new design. Swift SVN r32510