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

Unified Diff: src/IceGlobalContext.h

Issue 1766233002: Subzero: Fix symbol name mangling. Make flags global. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 9 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/IceFixups.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index fd76bd7ff8332dd26b5992f9ca3715ee94d6ad6a..338cc7db70d039bfe1a79d6ac6b2a795c08da041 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -155,7 +155,7 @@ public:
/// The dump stream is a log stream while emit is the stream code
/// is emitted to. The error stream is strictly for logging errors.
GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError,
- ELFStreamer *ELFStreamer, const ClFlags &Flags);
+ ELFStreamer *ELFStreamer);
~GlobalContext();
///
@@ -181,12 +181,6 @@ public:
return LockedPtr<ErrorCode>(&ErrorStatus, &ErrorStatusLock);
}
- /// When emitting assembly, we allow a string to be prepended to
- /// names of translated functions. This makes it easier to create an
- /// execution test against a reference translator like llc, with both
- /// translators using the same bitcode as input.
- IceString mangleName(const IceString &Name) const;
-
/// \name Manage Constants.
/// @{
// getConstant*() functions are not const because they might add something to
@@ -202,10 +196,8 @@ public:
/// Returns a symbolic constant.
Constant *getConstantSym(const RelocOffsetT Offset,
const RelocOffsetArray &OffsetExpr,
- const IceString &Name, const IceString &EmitString,
- bool SuppressMangling);
- Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name,
- bool SuppressMangling);
+ const IceString &Name, const IceString &EmitString);
+ Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name);
Constant *getConstantExternSym(const IceString &Name);
/// Returns an undef.
Constant *getConstantUndef(Type Ty);
@@ -221,10 +213,10 @@ public:
/// Return a locked pointer to the registered jump tables.
JumpTableDataList getJumpTables();
/// Create a new jump table entry and return a reference to it.
- JumpTableData &addJumpTable(IceString FuncName, SizeT Id,
+ JumpTableData &addJumpTable(const IceString &FuncName, SizeT Id,
const JumpTableData::TargetList &TargetList);
- const ClFlags &getFlags() const { return Flags; }
+ static const ClFlags &getFlags() { return Flags; }
/// Allocate data of type T using the global allocator. We allow entities
/// allocated from this global allocator to be either trivially or
@@ -438,6 +430,9 @@ public:
return Match.empty() || Match == SymbolName;
}
+ static ClFlags Flags;
+ static ClFlagsExtra ExtraFlags;
+
private:
// Try to ensure mutexes are allocated on separate cache lines.
@@ -489,7 +484,6 @@ private:
ICE_CACHELINE_BOUNDARY;
Intrinsics IntrinsicsInfo;
- const ClFlags &Flags;
// TODO(jpp): move to EmitterContext.
std::unique_ptr<ELFObjectWriter> ObjectWriter;
BoundedProducerConsumerQueue<Cfg> OptQ;
@@ -548,10 +542,6 @@ private:
// AllThreadContexts.
ICE_TLS_DECLARE_FIELD(ThreadContext *, TLS);
- // Private helpers for mangleName()
- using ManglerVector = llvm::SmallVector<char, 32>;
- void incrementSubstitutions(ManglerVector &OldName) const;
-
public:
static void TlsInit() { ICE_TLS_INIT_FIELD(TLS); }
};
« no previous file with comments | « src/IceFixups.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698