summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2015-12-15 09:37:31 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2015-12-15 09:37:31 +0000
commitec6b1fcf63e124bf4bf28444af7f8809ebb511f7 (patch)
tree42a1580738c3eede0f2a4c94add466fcc0c0f353 /llvm/lib/Transforms/InstCombine
parentb4a6884844b0ee0c106f7341127ed506b99fcc44 (diff)
downloadbcm5719-llvm-ec6b1fcf63e124bf4bf28444af7f8809ebb511f7.tar.gz
bcm5719-llvm-ec6b1fcf63e124bf4bf28444af7f8809ebb511f7.zip
InstCombineLoadStoreAlloca.cpp: Avoid instantiating Twine.
llvm-svn: 255637
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 79644994394..12566922c83 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "InstCombineInternal.h"
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/Loads.h"
#include "llvm/IR/DataLayout.h"
@@ -540,8 +541,10 @@ static Instruction *unpackLoadToAggregate(InstCombiner &IC, LoadInst &LI) {
return nullptr;
auto Name = LI.getName();
- auto LoadName = LI.getName() + ".unpack";
- auto EltName = Name + ".elt";
+ SmallString<16> LoadName = Name;
+ LoadName += ".unpack";
+ SmallString<16> EltName = Name;
+ EltName += ".elt";
auto *Addr = LI.getPointerOperand();
Value *V = UndefValue::get(T);
auto *IdxType = Type::getInt32Ty(ST->getContext());
@@ -944,9 +947,11 @@ static bool unpackStoreToAggregate(InstCombiner &IC, StoreInst &SI) {
if (SL->hasPadding())
return false;
- auto EltName = V->getName() + ".elt";
+ SmallString<16> EltName = V->getName();
+ EltName += ".elt";
auto *Addr = SI.getPointerOperand();
- auto AddrName = Addr->getName() + ".repack";
+ SmallString<16> AddrName = Addr->getName();
+ AddrName += ".repack";
auto *IdxType = Type::getInt32Ty(ST->getContext());
auto *Zero = ConstantInt::get(IdxType, 0);
for (unsigned i = 0; i < Count; i++) {
OpenPOWER on IntegriCloud