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

Side by Side Diff: include/llvm/MC/MCAsmLayout.h

Issue 1133723005: Cherry-pick r234714: [MC] Write padding into fragments when -mc-relax-all flag is used (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Rebase Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | include/llvm/MC/MCAssembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- MCAsmLayout.h - Assembly Layout Object -------------------*- C++ -*-===// 1 //===- MCAsmLayout.h - Assembly Layout Object -------------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 #ifndef LLVM_MC_MCASMLAYOUT_H 10 #ifndef LLVM_MC_MCASMLAYOUT_H
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 /// lower ordinal will be valid. 43 /// lower ordinal will be valid.
44 mutable DenseMap<const MCSectionData*, MCFragment*> LastValidFragment; 44 mutable DenseMap<const MCSectionData*, MCFragment*> LastValidFragment;
45 45
46 /// \brief Make sure that the layout for the given fragment is valid, lazily 46 /// \brief Make sure that the layout for the given fragment is valid, lazily
47 /// computing it if necessary. 47 /// computing it if necessary.
48 void ensureValid(const MCFragment *F) const; 48 void ensureValid(const MCFragment *F) const;
49 49
50 /// \brief Is the layout for this fragment valid? 50 /// \brief Is the layout for this fragment valid?
51 bool isFragmentValid(const MCFragment *F) const; 51 bool isFragmentValid(const MCFragment *F) const;
52 52
53 /// \brief Compute the amount of padding required before this fragment to
54 /// obey bundling restrictions.
55 uint64_t computeBundlePadding(const MCFragment *F,
56 uint64_t FOffset, uint64_t FSize);
57
58 public: 53 public:
59 MCAsmLayout(MCAssembler &_Assembler); 54 MCAsmLayout(MCAssembler &_Assembler);
60 55
61 /// Get the assembler object this is a layout for. 56 /// Get the assembler object this is a layout for.
62 MCAssembler &getAssembler() const { return Assembler; } 57 MCAssembler &getAssembler() const { return Assembler; }
63 58
64 /// \brief Invalidate the fragments starting with F because it has been 59 /// \brief Invalidate the fragments starting with F because it has been
65 /// resized. The fragment's size should have already been updated, but 60 /// resized. The fragment's size should have already been updated, but
66 /// its bundle padding will be recomputed. 61 /// its bundle padding will be recomputed.
67 void invalidateFragmentsFrom(MCFragment *F); 62 void invalidateFragmentsFrom(MCFragment *F);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 106
112 /// \brief If this symbol is equivalent to A + Constant, return A. 107 /// \brief If this symbol is equivalent to A + Constant, return A.
113 const MCSymbol *getBaseSymbol(const MCSymbol &Symbol) const; 108 const MCSymbol *getBaseSymbol(const MCSymbol &Symbol) const;
114 109
115 /// @} 110 /// @}
116 }; 111 };
117 112
118 } // end namespace llvm 113 } // end namespace llvm
119 114
120 #endif 115 #endif
OLDNEW
« no previous file with comments | « no previous file | include/llvm/MC/MCAssembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698