[PATCH] D14222: [CodeGenPrepare] Don't call getSubtargetImpl quite as often

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 1 21:57:23 PST 2015


loladiro created this revision.
loladiro added a subscriber: llvm-commits.
loladiro set the repository for this revision to rL LLVM.

While profiling LLVM's memory allocation, I noticed that getSubtargetImpl was called quite often (and it allocates heap memory by doing string operations). This simple change to cache the TargetLowering/TargetRegisterInfo in CodeGenPrepare reduces the total number of allocations in my test compile by about 3%

Repository:
  rL LLVM

http://reviews.llvm.org/D14222

Files:
  lib/CodeGen/CodeGenPrepare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14222.38869.patch
Type: text/x-patch
Size: 8510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151102/83f8fcdd/attachment.bin>


More information about the llvm-commits mailing list