aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorPavel Samolysov <pavel.samolysov@intel.com>2022-04-04 11:23:24 +0300
committerAlexey Bader <alexey.bader@intel.com>2022-04-04 12:16:39 +0300
commit87b28f5092f2f92fc380f18e8578746bdd2a54b2 (patch)
tree9fdfd00066eb4a82d682e070493b3d9ec05e3ac3 /llvm/lib/CodeGen/CodeGen.cpp
parent9db1eb13b64b5062e8bc34912c44d5175c26bf78 (diff)
downloadllvm-87b28f5092f2f92fc380f18e8578746bdd2a54b2.zip
llvm-87b28f5092f2f92fc380f18e8578746bdd2a54b2.tar.gz
llvm-87b28f5092f2f92fc380f18e8578746bdd2a54b2.tar.bz2
[clang][NFC] Extract the EmitAssemblyHelper::TargetTriple member
Few times in different methods of the EmitAssemblyHelper class the following code snippet is used to get the TargetTriple and then use it's single method to check some conditions: TargetTriple(TheModule->getTargetTriple()) The parsing of a target triple string is not a trivial operation and it takes time to repeat the parsing many times in different methods of the class and even numerous times in one method just to call a getter (llvm::Triple(TheModule->getTargetTriple()).getVendor()), for example. The patch extracts the TargetTriple member of the EmitAssemblyHelper class to parse the triple only once in the class' constructor. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D122587
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions