[PATCH] [MC] Write padding into fragments when -mc-relax-all flag is used

Eli Bendersky eliben at google.com
Thu Mar 5 10:45:46 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: include/llvm/MC/MCAsmLayout.h:112
@@ +111,3 @@
+  /// obey bundling restrictions.
+  static uint64_t computeBundlePadding(const MCAssembler &Assembler,
+                                       const MCFragment *F,
----------------
Is there a good reason to keep this a member and not just a standalone function?

================
Comment at: include/llvm/MC/MCAssembler.h:1245
@@ -1244,1 +1244,3 @@
 
+  void writeFragmentPadding(const MCFragment &F, uint64_t FSize,
+                            MCObjectWriter *OW) const;
----------------
Here and elsewhere - please document all the new functions/methods you add - explaining their arguments, return values, etc.

================
Comment at: include/llvm/MC/MCObjectStreamer.h:86
@@ +85,3 @@
+  // they get assigned, either to F if possible or to a new data fragment.
+  void flushPendingLabels(MCFragment *F, uint64_t FOffset = 0);
+
----------------
What is FOffset for?

================
Comment at: lib/MC/MCAssembler.cpp:633
@@ -630,3 +632,3 @@
   //   Prev  |##########|       F        |
   // -------------------------------------
   //                    ^
----------------
Does this comment need updating?

================
Comment at: tools/pnacl-llc/pnacl-llc.cpp:706
@@ -705,3 +705,3 @@
   const Target *TheTarget = TargetRegistry::lookupTarget(MArch, TheTriple,
                                                          Error);
   if (!TheTarget) {
----------------
This file doesn't see to belong here

http://reviews.llvm.org/D8072

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list