diff options
author | Jan Voung <jvoung@chromium.org> | 2013-06-28 14:54:54 -0700 |
---|---|---|
committer | Jan Voung <jvoung@chromium.org> | 2013-06-28 14:54:54 -0700 |
commit | f2518db25a8d0cacebb82d2f8872b00014a03bc8 (patch) | |
tree | 776d74f210d2db1b8535d168d804390c0befd6db /lib/Analysis | |
parent | 331ef6ecbef4e3f3afa8ae627ad5b3528a534e04 (diff) |
Move stacksave/restore to allowed list, pow to disallowed.
The stacksave/restore intrinsics are covered by
"run_vla_test", tests in GCC torture testsuite, and
basic llvm lit tests (mostly related to debug info...).
The pow intrinsic is no longer needed after Eli's
change to Clang, and pow is done purely in libm
(even with -fno-math-errno).
BUG=http://code.google.com/p/nativeclient/issues/detail?id=3378
R=eliben@chromium.org, jfb@chromium.org, mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18180002
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/NaCl/PNaClABIVerifyModule.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp index 7836484c2f..7922d84a51 100644 --- a/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp +++ b/lib/Analysis/NaCl/PNaClABIVerifyModule.cpp @@ -204,6 +204,9 @@ bool PNaClABIVerifyModule::isWhitelistedIntrinsic(const Function *F, case Intrinsic::nacl_read_tp: case Intrinsic::nacl_setjmp: case Intrinsic::nacl_longjmp: + // Stack save and restore are used to support C99 VLAs. + case Intrinsic::stackrestore: + case Intrinsic::stacksave: case Intrinsic::trap: return true; @@ -253,13 +256,14 @@ bool PNaClABIVerifyModule::isWhitelistedIntrinsic(const Function *F, 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? + case Intrinsic::cos: + case Intrinsic::exp: + case Intrinsic::exp2: + case Intrinsic::log: + case Intrinsic::log2: + case Intrinsic::log10: + case Intrinsic::pow: + case Intrinsic::sin: // We run -lower-expect to convert Intrinsic::expect into branch weights // and consume in the middle-end. The backend just ignores llvm.expect. case Intrinsic::expect: @@ -274,12 +278,9 @@ bool PNaClABIVerifyModule::isWhitelistedIntrinsic(const Function *F, case Intrinsic::dbg_value: return PNaClABIAllowDevIntrinsics || PNaClABIAllowDebugMetadata; 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::prefetch: // TODO(jfb): Use our own data-prefetch intrinsic instead. 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. return PNaClABIAllowDevIntrinsics; } } |