[PATCH] D25804: Fix 24560: assembler does not share constant pool for same constants
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 31 12:18:23 PDT 2016
majnemer added inline comments.
================
Comment at: lib/MC/ConstantPools.cpp:40-41
+ const MCConstantExpr *C = dyn_cast<MCConstantExpr>(Value);
+ if (C && CachedEntries.count(C->getValue()))
+ return CachedEntries[C->getValue()];
MCSymbol *CPEntryLabel = Context.createTempSymbol();
----------------
You could save a lookup by using find/end instead of count/operator[]
Repository:
rL LLVM
https://reviews.llvm.org/D25804
More information about the llvm-commits
mailing list