Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: src/IceGlobalContext.cpp

Issue 321993002: Add a few Subzero intrinsics (not the atomic ones yet). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: doesn't matter if eax or not Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceInst.h » ('j') | src/IceInst.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index d77a5ddb554c4e1f3ec68232da712a6cc72152d3..1d050397a0b2333a8ebe20e80eeec38891bfd065 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -94,7 +94,9 @@ GlobalContext::GlobalContext(llvm::raw_ostream *OsDump,
IceString TestPrefix)
: StrDump(OsDump), StrEmit(OsEmit), VMask(Mask),
ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt),
- TestPrefix(TestPrefix), HasEmittedFirstMethod(false) {}
+ TestPrefix(TestPrefix), HasEmittedFirstMethod(false) {
+ BuildIntrinsicMap(&IntrinsicInfos);
JF 2014/06/10 03:50:41 Why isn't think just IntrinsicMap's default constr
jvoung (off chromium) 2014/06/16 20:51:58 Done.
+}
// In this context, name mangling means to rewrite a symbol using a
// given prefix. For a C++ symbol, nest the original symbol inside
@@ -210,6 +212,13 @@ ConstantList GlobalContext::getConstantPool(Type Ty) const {
llvm_unreachable("Unknown type");
}
+IntrinsicInfo GlobalContext::getIntrinsicInfo(const IceString &Name) const {
+ IntrinsicMap::const_iterator I = IntrinsicInfos.find(Name);
+ if (I == IntrinsicInfos.end())
+ return UnknownIntrinsicInfo;
+ return I->second;
+}
+
void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const {
if (Ctx->isVerbose(IceV_Timing)) {
// Prefixing with '#' allows timing strings to be included
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceInst.h » ('j') | src/IceInst.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698