aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2013-06-12 13:26:07 -0700
committerJan Voung <jvoung@chromium.org>2013-06-12 13:26:07 -0700
commit7f4a09812f8657db659ceae09fc8d3826c256c5e (patch)
treea6c10a4783b0bc625f78a905b91d9bf2125af11a
parent2117e90c707473abc7f2d76e5625e566c79de204 (diff)
Move non-Pow transcendentals back to disallowed list (unused).
Initially whitelisted to satisfy tests/toolchain/llvm_math_intrinsics.c, which tests the intrinsics directly. Those tests now skip ABI verification so they will continue to pass. Outside of those direct uses, they are not used. llvm.powi gets introduced during the llvm sandboxed build. Clang CGBuiltin.cpp has a way to introduce Intrinsic::pow and Intrinsic::powi. It does not introduce any of the other intrinsics. We can add them back later and supply something in compiler_rt when clang or some transformation actually introduces them. For now that is not the case. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3378 TEST= scons, llvm nightly, gcc torture, spec2k, naclports R=eliben@chromium.org Review URL: https://codereview.chromium.org/16794006
-rw-r--r--lib/Analysis/NaCl/PNaClABIVerifyModule.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
index 477bc50ec9..16d51ed609 100644
--- a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
+++ b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp
@@ -220,30 +220,33 @@ bool PNaClABIVerifyModule::isWhitelistedIntrinsic(const Function *F,
case Intrinsic::lifetime_start:
case Intrinsic::invariant_end:
case Intrinsic::invariant_start:
+ // Some transcendental functions not needed yet.
+ case Intrinsic::cos: // Rounding not defined: support with fast-math?
+ case Intrinsic::exp: // Rounding not defined: support with fast-math?
+ case Intrinsic::exp2: // Rounding not defined: support with fast-math?
+ case Intrinsic::log: // Rounding not defined: support with fast-math?
+ case Intrinsic::log2: // Rounding not defined: support with fast-math?
+ case Intrinsic::log10: // Rounding not defined: support with fast-math?
+ case Intrinsic::sin: // Rounding not defined: support with fast-math?
return false;
// (3) Dev intrinsics.
case Intrinsic::dbg_declare:
case Intrinsic::dbg_value:
return PNaClABIAllowDevIntrinsics || PNaClABIAllowDebugMetadata;
- case Intrinsic::cos: // Rounding not defined: support with fast-math?
case Intrinsic::ctlz: // Support via compiler_rt if arch doesn't have it?
case Intrinsic::ctpop: // Support via compiler_rt if arch doesn't have it?
case Intrinsic::cttz: // Support via compiler_rt if arch doesn't have it?
- case Intrinsic::exp: // Rounding not defined: support with fast-math?
- case Intrinsic::exp2: // Rounding not defined: support with fast-math?
+ // Can run -lower-expect, and consume in the middle-end.
+ // Selection-DAG just treats it as a pass-through.
case Intrinsic::expect: // From __builtin_expect.
case Intrinsic::flt_rounds: // For FLT_ROUNDS macro from float.h.
// We do not have fesetround() in newlib, can we return a
// consistent rounding mode though?
- case Intrinsic::log: // Rounding not defined: support with fast-math?
- case Intrinsic::log2: // Rounding not defined: support with fast-math?
- case Intrinsic::log10: // Rounding not defined: support with fast-math?
case Intrinsic::nacl_target_arch: // Used by translator self-build.
case Intrinsic::pow: // Rounding is supposed to be the same as libm.
case Intrinsic::powi: // Rounding not defined: support with fast-math?
case Intrinsic::prefetch: // Could ignore if target doesn't support?
- case Intrinsic::sin: // Rounding not defined: support with fast-math?
case Intrinsic::sqrt: // Rounding is defined, but setting errno up to libm.
case Intrinsic::stackrestore: // Used to support C99 VLAs.
case Intrinsic::stacksave: // Used to support C99 VLAs.