[PATCH] D68816: [NFC] Replace a linked list in LiveDebugVariables pass with a DenseMap
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 10:25:45 PDT 2019
aprantl added a comment.
This is a really nice performance win and the code looks nicer, too.
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:154
+class UserValueIdentity {
+private:
+ const DILocalVariable *Variable;// The debug info variable we are part of.
----------------
nit:
```
/// The debug info variable we are part of.
const DILocalVariable *Variable;
...
```
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:333
+namespace llvm {
+template <> struct DenseMapInfo<UserValueIdentity> {
+ static inline UserValueIdentity getEmptyKey() {
----------------
FYI. If you don't want to implement all this, you can also inherit from std::pair<std::pair<>>. (With a single pair this is a more obvious win.)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68816/new/
https://reviews.llvm.org/D68816
More information about the llvm-commits
mailing list