Make fixups reference any constant (allow const float/double pool literals).
This avoids doing getConstantSym to avoid hitting the global
context's getConstantSym during emitIAS(), which may be desirable for
multi-threading, since each function's emitIAS() should be able to happen
on a separate thread.
The stringification is moved till later, so it still happens, just without
creating a constant relocatable w/ offset of 0.
This ends up tickling an issue where -O0 on 252.eon now gets 2x as many
page faults, and I'm not sure exactly why. This makes the overall time
higher, though emit time is lower.
When translating with -O2 # of page faults is about the same before/after,
so that oddness is restricted to O0.
Before this change, tweaking the slab size at O0 doesn't
seem to affect as drastically as 2x swings either.
To work around this, I turned the slab size of the assembler down to 32KB.
===
Move all the .L$type$poolid into a function (replacing getPoolEntryID).
BUG=none
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/837553009
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index d3c47d4..a16b35c 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -25,7 +25,7 @@
thread_local const Cfg *Cfg::CurrentCfg = nullptr;
-ArenaAllocator *getCurrentCfgAllocator() {
+ArenaAllocator<> *getCurrentCfgAllocator() {
return Cfg::getCurrentCfgAllocator();
}
@@ -33,7 +33,7 @@
: Ctx(Ctx), FunctionName(""), ReturnType(IceType_void),
IsInternalLinkage(false), HasError(false), FocusedTiming(false),
ErrorMessage(""), Entry(nullptr), NextInstNumber(Inst::NumberInitial),
- Allocator(new ArenaAllocator()), Live(nullptr),
+ Allocator(new ArenaAllocator<>()), Live(nullptr),
Target(TargetLowering::createLowering(Ctx->getTargetArch(), this)),
VMetadata(new VariablesMetadata(this)),
TargetAssembler(