diff options
| author | David Blaikie <dblaikie@gmail.com> | 2015-04-22 04:14:42 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2015-04-22 04:14:42 +0000 |
| commit | 612ddbfde03cf024083665a546613493d883f7b6 (patch) | |
| tree | c572d0558fa0247f059cc39486ec868620c264d8 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | e868123d8fd38a131d7f2c5fec7d71c1cdbb9b1e (diff) | |
[opaque pointer types] Serialize the value type for store instructions
Without pointee types the space optimization of storing only the pointer
type and not the value type won't be viable - so add the extra type
information that would be missing.
Storeatomic coming soon.
llvm-svn: 235474
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index aace5e165278..c4b31ff7275a 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1895,7 +1895,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID, else Code = bitc::FUNC_CODE_INST_STORE; PushValueAndType(I.getOperand(1), InstID, Vals, VE); // ptrty + ptr - pushValue(I.getOperand(0), InstID, Vals, VE); // val. + PushValueAndType(I.getOperand(0), InstID, Vals, VE); // valty + val Vals.push_back(Log2_32(cast<StoreInst>(I).getAlignment())+1); Vals.push_back(cast<StoreInst>(I).isVolatile()); if (cast<StoreInst>(I).isAtomic()) { |
