@@ -59,6 +59,12 @@ static cl::opt<bool> DisableRequireStructuredCFG(
59
59
" unexpected regressions happen." ),
60
60
cl::init(false ), cl::Hidden);
61
61
62
+ static cl::opt<bool > UseShortPointersOpt (
63
+ " nvptx-short-ptr" ,
64
+ cl::desc (
65
+ " Use 32-bit pointers for accessing const/local/shared address spaces." ),
66
+ cl::init(false ), cl::Hidden);
67
+
62
68
// byval arguments in NVPTX are special. We're only allowed to read from them
63
69
// using a special instruction, and if we ever need to write to them or take an
64
70
// address, we must make a local copy and use it, instead.
@@ -112,12 +118,6 @@ extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTarget() {
112
118
initializeNVPTXPrologEpilogPassPass (PR);
113
119
}
114
120
115
- static cl::opt<bool > NVPTXUseShortPointers (
116
- " nvptx-short-ptr" ,
117
- cl::desc (
118
- " Use 32-bit pointers for accessing const/local/shared address spaces." ),
119
- cl::init(false ), cl::Hidden);
120
-
121
121
NVPTXTargetMachine::NVPTXTargetMachine (const Target &T, const Triple &TT,
122
122
StringRef CPU, StringRef FS,
123
123
const TargetOptions &Options,
@@ -127,7 +127,7 @@ NVPTXTargetMachine::NVPTXTargetMachine(const Target &T, const Triple &TT,
127
127
// The pic relocation model is used regardless of what the client has
128
128
// specified, as it is the only relocation model currently supported.
129
129
: CodeGenTargetMachineImpl(
130
- T, TT.computeDataLayout(NVPTXUseShortPointers ? " " : " shortptr " ), TT,
130
+ T, TT.computeDataLayout(UseShortPointersOpt ? " shortptr " : " " ), TT,
131
131
CPU, FS, Options, Reloc::PIC_,
132
132
getEffectiveCodeModel(CM, CodeModel::Small), OL),
133
133
is64bit(is64bit), TLOF(std::make_unique<NVPTXTargetObjectFile>()),
0 commit comments