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

Unified Diff: tools/pnacl-llc/pnacl-llc.cpp

Issue 1129013004: Use -mc-relax-all flag for sandboxed translator (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Rebase Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/pnacl-llc/pnacl-llc.cpp
diff --git a/tools/pnacl-llc/pnacl-llc.cpp b/tools/pnacl-llc/pnacl-llc.cpp
index 1138fe2ab5cdb71d84bcfd0eefebcf63a466612f..17fbb86a9c3e0dd03cda8106cbe02c9a46c4319e 100644
--- a/tools/pnacl-llc/pnacl-llc.cpp
+++ b/tools/pnacl-llc/pnacl-llc.cpp
@@ -752,6 +752,13 @@ static int compileModule(StringRef ProgramName) {
TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
Options.DisableIntegratedAS = NoIntegratedAssembler;
Options.MCOptions.AsmVerbose = true;
+#if defined(__native_client__)
+ // This enables LLVM MC to write instruction padding directly into fragments
+ // reducing memory usage of the translator. However, this could result in
+ // suboptimal machine code since we cannot use short jumps where possible
+ // which is why we enable this for sandboxed translator case.
+ Options.MCOptions.MCRelaxAll = true;
+#endif
if (GenerateSoftFloatCalls)
FloatABIForCalls = FloatABI::Soft;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698