[PATCH] D43170: [AMDGPU] Change constant addr space to 4
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 08:54:16 PST 2018
t-tye accepted this revision.
t-tye added a comment.
This revision is now accepted and ready to land.
LGTM. Cleanup comments can be done as a separate patch at a later time.
================
Comment at: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:54-62
static const AliasResult ASAliasRulesPrivIsZero[6][6] = {
/* Private Global Constant Group Flat Region*/
/* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, NoAlias},
/* Global */ {NoAlias , MayAlias, NoAlias , NoAlias , MayAlias, NoAlias},
/* Constant */ {NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, NoAlias},
/* Group */ {NoAlias , NoAlias , NoAlias , MayAlias, MayAlias, NoAlias},
/* Flat */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
----------------
Since there is now only a single address space mapping can this simply be deleted?
================
Comment at: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:63
};
static const AliasResult ASAliasRulesGenIsZero[6][6] = {
+ /* Flat Global Region Group Constant Private */
----------------
Can then rename this to simply ASAliasRules
================
Comment at: lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp:80-88
} else {
assert(AS.PRIVATE_ADDRESS == 0 &&
AS.GLOBAL_ADDRESS == 1 &&
AS.CONSTANT_ADDRESS == 2 &&
AS.LOCAL_ADDRESS == 3 &&
AS.FLAT_ADDRESS == 4 &&
AS.REGION_ADDRESS == 5);
----------------
Ditto.
================
Comment at: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:945-951
AMDGPUAS getAMDGPUAS(Triple T) {
AMDGPUAS AS;
AS.FLAT_ADDRESS = 0;
AS.PRIVATE_ADDRESS = 5;
- AS.REGION_ADDRESS = 4;
+ AS.REGION_ADDRESS = 2;
return AS;
}
----------------
Now there is only a single address mapping presumably this can be eliminated?
https://reviews.llvm.org/D43170
More information about the llvm-commits
mailing list