diff options
author | Shiva Chen <shiva@andestech.com> | 2020-03-10 10:23:59 +0800 |
---|---|---|
committer | shiva <shiva0217@gmail.com> | 2020-03-20 11:03:51 +0800 |
commit | fc3752665f4b7ae2ec3faad4204512687800c1ec (patch) | |
tree | fa536e0aa128d8f9f0efed40a6b93406278b5754 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 0ddd04391d281b1d8679ff95ddfce79a61253250 (diff) | |
download | llvm-fc3752665f4b7ae2ec3faad4204512687800c1ec.zip llvm-fc3752665f4b7ae2ec3faad4204512687800c1ec.tar.gz llvm-fc3752665f4b7ae2ec3faad4204512687800c1ec.tar.bz2 |
[RISCV] Passing small data limitation value to RISCV backend
Passing small data limit to RISCVELFTargetObjectFile by module flag,
So the backend can set small data section threshold by the value.
The data will be put into the small data section if the data smaller than
the threshold.
Differential Revision: https://reviews.llvm.org/D57497
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2e432ad..802df03 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -921,6 +921,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss); Opts.NumRegisterParameters = getLastArgIntValue(Args, OPT_mregparm, 0, Diags); Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack); + Opts.SmallDataLimit = + getLastArgIntValue(Args, OPT_msmall_data_limit, 0, Diags); Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings); Opts.NoWarn = Args.hasArg(OPT_massembler_no_warn); Opts.EnableSegmentedStacks = Args.hasArg(OPT_split_stacks); |