summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/gbc_expander.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler_llvm/gbc_expander.cc')
-rw-r--r--src/compiler_llvm/gbc_expander.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc
index e2b98345e5..77c1bf5aa1 100644
--- a/src/compiler_llvm/gbc_expander.cc
+++ b/src/compiler_llvm/gbc_expander.cc
@@ -194,8 +194,13 @@ class GBCExpanderPass : public llvm::FunctionPass {
char GBCExpanderPass::ID = 0;
bool GBCExpanderPass::runOnFunction(llvm::Function& func) {
+ // Runtime support or stub
+ if (func.getName().startswith("art_") || func.getName().startswith("Art")) {
+ return false;
+ }
bool changed;
+ // TODO: Use intrinsic.
changed = InsertStackOverflowCheck(func);
std::list<std::pair<llvm::CallInst*,
@@ -962,7 +967,7 @@ GBCExpanderPass::ExpandIntrinsic(IntrinsicHelper::IntrinsicId intr_id,
switch (intr_id) {
//==- Thread -----------------------------------------------------------==//
case IntrinsicHelper::GetCurrentThread: {
- return ExpandToRuntime(runtime_support::GetCurrentThread, call_inst);
+ return irb_.Runtime().EmitGetCurrentThread();
}
case IntrinsicHelper::TestSuspend: {
Expand_TestSuspend(call_inst);