File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,12 @@ static cl::opt<bool> EnableStructurizerWorkarounds(
382
382
cl::desc (" Enable workarounds for the StructurizeCFG pass" ), cl::init(true ),
383
383
cl::Hidden);
384
384
385
+ static cl::opt<bool >
386
+ EnableSwLowerLDS (" amdgpu-enable-sw-lower-lds" ,
387
+ cl::desc (" Enable lowering of lds to global memory pass "
388
+ " and asan instrument resulting IR." ),
389
+ cl::init(true ), cl::Hidden);
390
+
385
391
static cl::opt<bool , true > EnableLowerModuleLDS (
386
392
" amdgpu-enable-lower-module-lds" , cl::desc(" Enable lower module lds pass" ),
387
393
cl::location(AMDGPUTargetMachine::EnableLowerModuleLDS), cl::init(true ),
@@ -1148,6 +1154,10 @@ void AMDGPUPassConfig::addIRPasses() {
1148
1154
// Replace OpenCL enqueued block function pointers with global variables.
1149
1155
addPass (createAMDGPUOpenCLEnqueuedBlockLoweringPass ());
1150
1156
1157
+ // Lower LDS accesses to global memory if address sanitizer is enabled.
1158
+ if (EnableSwLowerLDS)
1159
+ addPass (createAMDGPUSwLowerLDSLegacyPass (&TM));
1160
+
1151
1161
// Runs before PromoteAlloca so the latter can account for function uses
1152
1162
if (EnableLowerModuleLDS) {
1153
1163
addPass (createAMDGPULowerModuleLDSLegacyPass (&TM));
You can’t perform that action at this time.
0 commit comments