search for: mcalignfragment

Displaying 8 results from an estimated 8 matches for "mcalignfragment".

2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...) < ByteAlignment) > + SectionData->setAlignment(ByteAlignment); > + > + SymbolData->setExternal(External); > + > + Symbol->setSection(*Section); > + > + if (ByteAlignment != 1) > + AddFragment( > + // FIXME: Who owns this memory? > + new MCAlignFragment(ByteAlignment, 0, 0, ByteAlignment, SectionData) > + ); This code is actually adding the fragment twice. The fragment implicitly adds itself to the section if given, and the section takes ownership of it (this is an idiom we use pervasively for LLVM IR, its very succinct/useful once you get...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer
2013 Nov 21
0
[LLVMdev] ARM integrated assembler generates incorrect nop opcode when switching from arm to thumb mode
...: 00 bf nop 6: 00 bf nop 8: 00 44 add r0, r0 The problem is that the nops are written after the assembly is complete when it writes the MCAlignFragment to the output. The ARMAsmBackend writes nops using the last mode it knew about. So it can write bad nop data if the nops are in a location that is a mode that does not match the bit stored in the backend. We can see the problem by simply adding a `.code 32` directive to the end of the example: $ e...
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast infrastructure to handle this. On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: > On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >> TypeLoc casting looks bogus. >> >> TypeLoc derived types return true from classof when the dynamic type >>
2012 Nov 30
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
...; if (!OF.getOffset().EvaluateAsAbsolute(TargetLocation, Layout)) report_fatal_error("expected assembly-time absolute expression"); @@ -393,7 +393,7 @@ uint64_t FragmentSize = Asm.computeFragmentSize(Layout, F); switch (F.getKind()) { case MCFragment::FT_Align: { - MCAlignFragment &AF = cast<MCAlignFragment>(F); + const MCAlignFragment &AF = cast<MCAlignFragment>(F); uint64_t Count = FragmentSize / AF.getValueSize(); assert(AF.getValueSize() && "Invalid virtual align in concrete fragment!"); @@ -432,14 +432,14 @@ }...
2016 Nov 21
2
RFC: Insertion of nops for performance stability
...hase. Regarding splitting blocks of code, that is essentially what I’m proposing, but at MC level (since this is the level I’m operating in). When needed, a MCPerfNopFragment will be a separator between two MCFragments that contain code (e.g. MCDataFragments). However, a MCPerfNopFragment is not a MCAlignFragment and a block that follows a MCDataFragments will not (necessarily) be aligned as it could be wasteful in terms of code size. Consider the example I provided. Aligning the fragment after the nops to 16B will cost one additional byte of nops in code size, and aligning it to 32B will cost 17 additional...
2016 Nov 17
4
RFC: Insertion of nops for performance stability
...omputing the fragment size in MCAssembler::computeFragmentSize the Assembler will consult the backend and will provide it the layout in order to determine the required size of the fragment. Note that the computed size may change from call to call, similarly to the process of computing the size of a MCAlignFragment. b. When writing the fragment the assembler will again use the backend in order to write the required number of nops. Comments and questions are welcome. Thanks, Omer --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachm...
2016 Nov 20
3
RFC: Insertion of nops for performance stability
...omputing the fragment size in MCAssembler::computeFragmentSize the Assembler will consult the backend and will provide it the layout in order to determine the required size of the fragment. Note that the computed size may change from call to call, similarly to the process of computing the size of a MCAlignFragment. b. When writing the fragment the assembler will again use the backend in order to write the required number of nops. Comments and questions are welcome. Do you need to insert the nops as such a late stage? We have other components that insert nops during post-RA scheduling, for example. Eve...