summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/struct-init.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-01-24 10:47:13 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-01-24 10:47:13 +0000
commit3f5e7b1fb66a6faf43adb56b6c883364081610d2 (patch)
treefee3cb6245c30f4de6c47d9874f8c41a6406328b /clang/test/CodeGen/struct-init.c
parent0012c778a4cca03ecc5e197dd33ce87a62d6bae7 (diff)
downloadbcm5719-llvm-3f5e7b1fb66a6faf43adb56b6c883364081610d2.tar.gz
bcm5719-llvm-3f5e7b1fb66a6faf43adb56b6c883364081610d2.zip
[PM] Use a SmallVector instead of std::vector to avoid heap allocations
for small switches, and avoid using a complex loop to set up the weights. We know what the baseline weights will be so we can just resize the vector to contain all that value and clobber the one slot that is likely. This seems much more direct than the previous code that tested at every iteration, and started off by zeroing the vector. llvm-svn: 226995
Diffstat (limited to 'clang/test/CodeGen/struct-init.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud