diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-08-19 00:42:32 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-08-19 00:42:32 +0000 |
commit | 8d12558bad480493253c4bdc793244673a78e2c4 (patch) | |
tree | 27b79157e82b4103a0c9a088ce48e8150b4a5662 /llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp | |
parent | 3fa26b7661273baf0f059ff9f1b067c4b70cc7ab (diff) | |
download | llvm-8d12558bad480493253c4bdc793244673a78e2c4.zip llvm-8d12558bad480493253c4bdc793244673a78e2c4.tar.gz llvm-8d12558bad480493253c4bdc793244673a78e2c4.tar.bz2 |
IR: Rewrite ConstantUniqueMap
Rewrite `ConstantUniqueMap` to be more similar to
`ConstantAggrUniqueMap`.
- Use a `DenseMap` with custom MapInfo instead of a `std::map` with
linear lookups and deletion.
- Don't waste memory explicitly storing (heavyweight) keys.
Only `ConstantExpr` and `InlineAsm` actually use this data structure, so
I also updated them to use it.
This code cleanup is a precursor to reducing RAUW traffic on
`ConstantExpr` -- I felt badly adding a new (linear) call to
`ConstantUniqueMap::FindExistingKey`, so this designs away the concern.
A follow-up commit will transition the users of `ConstantAggrUniqueMap`
over.
llvm-svn: 215957
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp')
0 files changed, 0 insertions, 0 deletions