aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorManna, Soumi <soumi.manna@intel.com>2023-04-28 11:53:43 -0700
committerManna, Soumi <soumi.manna@intel.com>2023-04-28 12:17:10 -0700
commit4faf3fcf3fb253cb3e68d6ae7b124e7a39f9ccff (patch)
tree9050fadea376c56efb0fffbe1d203f79a9154242 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent9e35fc07f4001c5803069013bcfc266ad99da637 (diff)
downloadllvm-4faf3fcf3fb253cb3e68d6ae7b124e7a39f9ccff.zip
llvm-4faf3fcf3fb253cb3e68d6ae7b124e7a39f9ccff.tar.gz
llvm-4faf3fcf3fb253cb3e68d6ae7b124e7a39f9ccff.tar.bz2
[NFC][CLANG] Fix coverity remarks about large copy by values
Reported By Static Analyzer Tool, Coverity: Big parameter passed by value Copying large values is inefficient, consider passing by reference; Low, medium, and high size thresholds for detection can be adjusted. 1. Inside "CodeGenModule.cpp" file, in clang::CodeGen::CodeGenModule::EmitBackendOptionsMetadata(clang::CodeGenOptions): A very large function call parameter exceeding the high threshold is passed by value. pass_by_value: Passing parameter CodeGenOpts of type clang::CodeGenOptions const (size 2168 bytes) by value, which exceeds the high threshold of 512 bytes. 2. Inside "SemaType.cpp" file, in IsNoDerefableChunk(clang::DeclaratorChunk): A large function call parameter exceeding the low threshold is passed by value. pass_by_value: Passing parameter Chunk of type clang::DeclaratorChunk (size 176 bytes) by value, which exceeds the low threshold of 128 bytes. 3. Inside "CGNonTrivialStruct.cpp" file, in <unnamed>::getParamAddrs<1ull, <0ull...>>(std::integer_sequence<unsigned long long, T2...>, std::array<clang::CharUnits, T1>, clang::CodeGen::FunctionArgList, clang::CodeGen::CodeGenFunction *): A large function call parameter exceeding the low threshold is passed by value. .i. pass_by_value: Passing parameter Args of type clang::CodeGen::FunctionArgList (size 144 bytes) by value, which exceeds the low threshold of 128 bytes. 4. Inside "CGGPUBuiltin.cpp" file, in <unnamed>::containsNonScalarVarargs(clang::CodeGen::CodeGenFunction *, clang::CodeGen::CallArgList): A very large function call parameter exceeding the high threshold is passed by value. i. pass_by_value: Passing parameter Args of type clang::CodeGen::CallArgList (size 1176 bytes) by value, which exceeds the high threshold of 512 bytes. Reviewed By: tahonermann Differential Revision: https://reviews.llvm.org/D149163
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions