Commit 00b022aa authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #959 from undingen/disable_moderate

disable moderate opt and pyston passes and increase reopt threshold
parents 4f432fee ede85e07
From a27e2f111d85c2e55c5a9672b9ef39494b4d7fd8 Mon Sep 17 00:00:00 2001 From 43051cb630af1427f0cba1d432480985bf635210 Mon Sep 17 00:00:00 2001
From: Marius Wachtler <undingen@gmail.com> From: Marius Wachtler <undingen@gmail.com>
Date: Wed, 15 Apr 2015 09:40:51 +0200 Date: Wed, 15 Apr 2015 09:40:51 +0200
Subject: [PATCH] Add support for symbolic entries in the stackmap constant Subject: [PATCH] Add support for symbolic entries in the stackmap constant
table table
--- ---
include/llvm/CodeGen/StackMaps.h | 18 ++++++++++-- include/llvm/CodeGen/StackMaps.h | 18 +++++++++--
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 9 ++++++ lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 9 ++++++
lib/CodeGen/StackMaps.cpp | 36 +++++++++++++++++++++--- lib/CodeGen/StackMaps.cpp | 39 +++++++++++++++++++++---
test/CodeGen/X86/stackmap.ll | 26 +++++++++++++++-- test/CodeGen/X86/stackmap.ll | 26 ++++++++++++++--
4 files changed, 79 insertions(+), 10 deletions(-) 4 files changed, 82 insertions(+), 10 deletions(-)
diff --git a/include/llvm/CodeGen/StackMaps.h b/include/llvm/CodeGen/StackMaps.h diff --git a/include/llvm/CodeGen/StackMaps.h b/include/llvm/CodeGen/StackMaps.h
index 4e48afe..30cae3b 100644 index 4e48afe..30cae3b 100644
...@@ -89,7 +89,7 @@ index c0a8299..98cc692 100644 ...@@ -89,7 +89,7 @@ index c0a8299..98cc692 100644
Ops.push_back(OpVal); Ops.push_back(OpVal);
} }
diff --git a/lib/CodeGen/StackMaps.cpp b/lib/CodeGen/StackMaps.cpp diff --git a/lib/CodeGen/StackMaps.cpp b/lib/CodeGen/StackMaps.cpp
index 0797d56..7151166 100644 index 0797d56..3b9791a 100644
--- a/lib/CodeGen/StackMaps.cpp --- a/lib/CodeGen/StackMaps.cpp
+++ b/lib/CodeGen/StackMaps.cpp +++ b/lib/CodeGen/StackMaps.cpp
@@ -107,6 +107,16 @@ StackMaps::parseOperand(MachineInstr::const_mop_iterator MOI, @@ -107,6 +107,16 @@ StackMaps::parseOperand(MachineInstr::const_mop_iterator MOI,
...@@ -129,7 +129,7 @@ index 0797d56..7151166 100644 ...@@ -129,7 +129,7 @@ index 0797d56..7151166 100644
+ I->LocType = Location::ConstantIndex; + I->LocType = Location::ConstantIndex;
+ auto Result = ConstSymPool.insert(std::make_pair(I->Sym, I->Sym)); + auto Result = ConstSymPool.insert(std::make_pair(I->Sym, I->Sym));
+ // The symbolic entries will be emitted after the ConstPool entries. + // The symbolic entries will be emitted after the ConstPool entries.
+ I->Offset = ConstPool.size() + Result.first - ConstSymPool.begin(); + I->Offset = Result.first - ConstSymPool.begin();
+ } + }
+ } + }
+ +
...@@ -159,7 +159,17 @@ index 0797d56..7151166 100644 ...@@ -159,7 +159,17 @@ index 0797d56..7151166 100644
} }
/// Emit the callsite info for each callsite. /// Emit the callsite info for each callsite.
@@ -511,7 +537,8 @@ void StackMaps::emitCallsiteEntries(MCStreamer &OS, @@ -429,6 +455,9 @@ void StackMaps::emitCallsiteEntries(MCStreamer &OS,
for (const auto &Loc : CSLocs) {
int RegNo = 0;
int Offset = Loc.Offset;
+ if(Loc.Sym)
+ Offset += ConstPool.size();
+
if(Loc.Reg) {
RegNo = getDwarfRegNum(Loc.Reg, TRI);
assert(RegNo >= 0 && "Invalid Dwarf register number.");
@@ -511,7 +540,8 @@ void StackMaps::emitCallsiteEntries(MCStreamer &OS,
void StackMaps::serializeToStackMapSection() { void StackMaps::serializeToStackMapSection() {
(void) WSMP; (void) WSMP;
// Bail out if there's no stack map data. // Bail out if there's no stack map data.
...@@ -169,7 +179,7 @@ index 0797d56..7151166 100644 ...@@ -169,7 +179,7 @@ index 0797d56..7151166 100644
"Expected empty constant pool too!"); "Expected empty constant pool too!");
assert((!CSInfos.empty() || (CSInfos.empty() && FnStackSize.empty())) && assert((!CSInfos.empty() || (CSInfos.empty() && FnStackSize.empty())) &&
"Expected empty function record too!"); "Expected empty function record too!");
@@ -541,4 +568,5 @@ void StackMaps::serializeToStackMapSection() { @@ -541,4 +571,5 @@ void StackMaps::serializeToStackMapSection() {
// Clean up. // Clean up.
CSInfos.clear(); CSInfos.clear();
ConstPool.clear(); ConstPool.clear();
...@@ -243,5 +253,5 @@ index 5e356f3..59fa50f 100644 ...@@ -243,5 +253,5 @@ index 5e356f3..59fa50f 100644
} }
-- --
2.1.0 1.9.1
...@@ -1733,7 +1733,8 @@ Box* astInterpretFunction(CLFunction* clfunc, Box* closure, Box* generator, Box* ...@@ -1733,7 +1733,8 @@ Box* astInterpretFunction(CLFunction* clfunc, Box* closure, Box* generator, Box*
&& (FORCE_OPTIMIZE || !ENABLE_INTERPRETER || clfunc->times_interpreted > REOPT_THRESHOLD_BASELINE))) { && (FORCE_OPTIMIZE || !ENABLE_INTERPRETER || clfunc->times_interpreted > REOPT_THRESHOLD_BASELINE))) {
clfunc->times_interpreted = 0; clfunc->times_interpreted = 0;
EffortLevel new_effort = EffortLevel::MODERATE; // EffortLevel new_effort = EffortLevel::MODERATE;
EffortLevel new_effort = EffortLevel::MAXIMAL; // always use max opt (disabled moderate opt tier)
if (FORCE_OPTIMIZE) if (FORCE_OPTIMIZE)
new_effort = EffortLevel::MAXIMAL; new_effort = EffortLevel::MAXIMAL;
......
...@@ -53,7 +53,7 @@ bool FORCE_LLVM_CAPI_THROWS = false; ...@@ -53,7 +53,7 @@ bool FORCE_LLVM_CAPI_THROWS = false;
int OSR_THRESHOLD_INTERPRETER = 25; int OSR_THRESHOLD_INTERPRETER = 25;
int REOPT_THRESHOLD_INTERPRETER = 25; int REOPT_THRESHOLD_INTERPRETER = 25;
int OSR_THRESHOLD_BASELINE = 2500; int OSR_THRESHOLD_BASELINE = 2500;
int REOPT_THRESHOLD_BASELINE = 1000; int REOPT_THRESHOLD_BASELINE = 1500;
int OSR_THRESHOLD_T2 = 10000; int OSR_THRESHOLD_T2 = 10000;
int REOPT_THRESHOLD_T2 = 10000; int REOPT_THRESHOLD_T2 = 10000;
int SPECULATION_THRESHOLD = 100; int SPECULATION_THRESHOLD = 100;
...@@ -78,7 +78,7 @@ bool ENABLE_OSR = 1 && _GLOBAL_ENABLE; ...@@ -78,7 +78,7 @@ bool ENABLE_OSR = 1 && _GLOBAL_ENABLE;
bool ENABLE_LLVMOPTS = 1 && _GLOBAL_ENABLE; bool ENABLE_LLVMOPTS = 1 && _GLOBAL_ENABLE;
bool ENABLE_INLINING = 1 && _GLOBAL_ENABLE; bool ENABLE_INLINING = 1 && _GLOBAL_ENABLE;
bool ENABLE_REOPT = 1 && _GLOBAL_ENABLE; bool ENABLE_REOPT = 1 && _GLOBAL_ENABLE;
bool ENABLE_PYSTON_PASSES = 1 && _GLOBAL_ENABLE; bool ENABLE_PYSTON_PASSES = 0 && _GLOBAL_ENABLE;
bool ENABLE_TYPE_FEEDBACK = 1 && _GLOBAL_ENABLE; bool ENABLE_TYPE_FEEDBACK = 1 && _GLOBAL_ENABLE;
bool ENABLE_RUNTIME_ICS = 1 && _GLOBAL_ENABLE; bool ENABLE_RUNTIME_ICS = 1 && _GLOBAL_ENABLE;
bool ENABLE_JIT_OBJECT_CACHE = 1 && _GLOBAL_ENABLE; bool ENABLE_JIT_OBJECT_CACHE = 1 && _GLOBAL_ENABLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment