aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2014-03-05 18:59:40 -0800
committerDan Gohman <sunfish@mozilla.com>2014-03-05 19:00:42 -0800
commit0dfc8b303cac8e56b1dec466627462d24dbacb78 (patch)
tree3bb5199f37f89a5c5e8f9d8b62fb96723a14f606 /lib
parent95cd3de38a4d21056e90608b8553e1fda1363c12 (diff)
Don't emit JS declarations for LLVM intrinsics expanded inline.
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index f9f3633bcd..9d10988449 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -1919,8 +1919,8 @@ void JSWriter::printModuleBody() {
for (Module::const_iterator I = TheModule->begin(), E = TheModule->end();
I != E; ++I) {
if (I->isDeclaration() && !I->use_empty()) {
- // Ignore intrinsics that are always no-ops. We don't emit any code for
- // them, so we don't need to declare them.
+ // Ignore intrinsics that are always no-ops or expanded into other code
+ // which doesn't require the intrinsic function itself to be declared.
if (I->isIntrinsic()) {
switch (I->getIntrinsicID()) {
case Intrinsic::dbg_declare:
@@ -1930,6 +1930,11 @@ void JSWriter::printModuleBody() {
case Intrinsic::invariant_start:
case Intrinsic::invariant_end:
case Intrinsic::prefetch:
+ case Intrinsic::memcpy:
+ case Intrinsic::memset:
+ case Intrinsic::memmove:
+ case Intrinsic::expect:
+ case Intrinsic::flt_rounds:
continue;
}
}