[PATCH] D40344: AMDGPU: Re-organize the outer loop of SILoadStoreOptimizer
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 00:43:13 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL319156: AMDGPU: Re-organize the outer loop of SILoadStoreOptimizer (authored by nha).
Repository:
rL LLVM
https://reviews.llvm.org/D40344
Files:
llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
Index: llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -14,7 +14,7 @@
// ==>
// ds_read2_b32 v[0:1], v2, offset0:4 offset1:8
//
-// The same is done for certain SMEM opcodes, e.g.:
+// The same is done for certain SMEM and VMEM opcodes, e.g.:
// s_buffer_load_dword s4, s[0:3], 4
// s_buffer_load_dword s5, s[0:3], 8
// ==>
@@ -892,14 +892,13 @@
DEBUG(dbgs() << "Running SILoadStoreOptimizer\n");
bool Modified = false;
- CreatedX2 = 0;
- for (MachineBasicBlock &MBB : MF)
+ for (MachineBasicBlock &MBB : MF) {
+ CreatedX2 = 0;
Modified |= optimizeBlock(MBB);
- // Run again to convert x2 to x4.
- if (CreatedX2 >= 1) {
- for (MachineBasicBlock &MBB : MF)
+ // Run again to convert x2 to x4.
+ if (CreatedX2 >= 1)
Modified |= optimizeBlock(MBB);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40344.124527.patch
Type: text/x-patch
Size: 997 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171128/941d3ede/attachment.bin>
More information about the llvm-commits
mailing list