summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* llvm-mc: Add a -mc-relax-all option, which relaxes every fixup. We always needDaniel Dunbar2010-03-252-8/+26
| | | | | | | exactly two passes in that case, and don't ever need to recompute any layout, so this is a nice baseline for relaxation performance. llvm-svn: 99563
* MC: Stop restarting layout on every relaxation.Daniel Dunbar2010-03-251-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Still O(N^2), just a faster form, and now its the MCAsmLayout's fault. On the .s I am tuning against (combine.s from 403.gcc): -- ddunbar@lordcrumb:MC$ diff stats-before.txt stats-after.txt 5,10c5,10 < 1728 assembler - Number of assembler layout and relaxation steps < 7707 assembler - Number of emitted assembler fragments < 120588 assembler - Number of emitted object file bytes < 2233448 assembler - Number of evaluated fixups < 1727 assembler - Number of relaxed instructions < 6723845 mcexpr - Number of MCExpr evaluations --- > 3 assembler - Number of assembler layout and relaxation steps > 7707 assembler - Number of emitted assembler fragments > 120588 assembler - Number of emitted object file bytes > 14796 assembler - Number of evaluated fixups > 1727 assembler - Number of relaxed instructions > 67889 mcexpr - Number of MCExpr evaluations -- Feel free to LOL at the -before numbers, if you like. I am a little surprised we make more than 2 relaxation passes. It's pretty trivial for us to do relaxation out-of-order if that would give a speedup. llvm-svn: 99543
* MC: Simplify main section layout process by moving alignment into LayoutSection.Daniel Dunbar2010-03-251-30/+31
| | | | llvm-svn: 99529
* MC: Sink Section address assignment into LayoutSection.Daniel Dunbar2010-03-251-6/+6
| | | | llvm-svn: 99528
* MC/Mach-O: Switch to MCSectionData::getOrdinal.Daniel Dunbar2010-03-251-18/+4
| | | | llvm-svn: 99504
* MC: Explicity track section and fragment ordinals.Daniel Dunbar2010-03-251-0/+13
| | | | llvm-svn: 99500
* Fix -Asserts warning.Daniel Dunbar2010-03-251-2/+1
| | | | llvm-svn: 99499
* MC: Route access to SectionData offset and file size through MCAsmLayout.Daniel Dunbar2010-03-252-17/+42
| | | | llvm-svn: 99474
* MC: Route access to Fragment offset and effective size through MCAsmLayout.Daniel Dunbar2010-03-252-34/+58
| | | | llvm-svn: 99473
* MC: Eliminate MC{Fragment,{Section,Symbol}Data}::getAddress.Daniel Dunbar2010-03-251-9/+7
| | | | llvm-svn: 99467
* MC: Fix refacto in MCExpr evaluation, I mistakenly replaced a fragment ↵Daniel Dunbar2010-03-251-2/+2
| | | | | | | | address with a symbol address. - This fixes the integrated-as nightly test regressions. llvm-svn: 99466
* MC: Direct all {fragment,section,symbol} address access through the ↵Daniel Dunbar2010-03-243-59/+91
| | | | | | MCAsmLayout object. llvm-svn: 99380
* MC: Sprinkle in some more interesting statistics.Daniel Dunbar2010-03-232-1/+28
| | | | llvm-svn: 99350
* llvm-mc: Fast path EvaluateAbsolute of constants.Daniel Dunbar2010-03-231-0/+6
| | | | llvm-svn: 99348
* MC: Switch to using MCInst fragments to do relaxation.Daniel Dunbar2010-03-232-78/+78
| | | | | | Also, both MCMachOStreamer and MCAssembler are now target independent! llvm-svn: 99256
* MC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a ↵Daniel Dunbar2010-03-232-5/+12
| | | | | | particular instruction + fixups might need relaxation. llvm-svn: 99249
* MC: Add TargetAsmBackend::WriteNopData and use to eliminate some target ↵Daniel Dunbar2010-03-232-64/+10
| | | | | | dependencies in MCMachOStreamer and MCAssembler. llvm-svn: 99248
* MC: Tweak MCInstFragment to include the encoded data and fixups, so that we ↵Daniel Dunbar2010-03-231-13/+5
| | | | | | don't need to recompute them during relaxation. I will revisit this once all the other pieces of fast relaxation are in place. llvm-svn: 99244
* Put MCSectionCOFF::Name into the MCContext instead of leaking it.Jeffrey Yasskin2010-03-221-1/+5
| | | | llvm-svn: 99231
* MC: Add MCInstFragment, not used yet.Daniel Dunbar2010-03-222-4/+83
| | | | llvm-svn: 99229
* Add a FIXME.Daniel Dunbar2010-03-221-0/+14
| | | | llvm-svn: 99228
* MC: Fix a few more cases we were passing an MCDataFragment when a MCFragment ↵Daniel Dunbar2010-03-221-3/+4
| | | | | | would do, and sprinkle in some const. llvm-svn: 99218
* Simplify.Daniel Dunbar2010-03-221-4/+2
| | | | llvm-svn: 99217
* MCInst: Add ::dump_pretty.Daniel Dunbar2010-03-222-17/+20
| | | | llvm-svn: 99216
* MC: Change MCObjectWriter::RecordRelocation to take an MCFragment (instead ↵Daniel Dunbar2010-03-222-13/+13
| | | | | | of a MCDataFragment). Object files should only need the generic MCFragment features. llvm-svn: 99205
* MC/Mach-O: Factor out getOrCreateDataFragment().Daniel Dunbar2010-03-221-16/+18
| | | | llvm-svn: 99204
* MC: Eliminate MCFragment::getMaxFileSize.Daniel Dunbar2010-03-221-2/+7
| | | | llvm-svn: 99203
* MC: Share the MCAsmLayout object, although its still not used for anything ↵Daniel Dunbar2010-03-221-15/+10
| | | | | | important. llvm-svn: 99202
* Better fix for r98994, MachObjectWriterImpl wasn't intended to be virtual.Daniel Dunbar2010-03-201-8/+5
| | | | llvm-svn: 99031
* Fix -Wnon-virtual-dtor warning.Rafael Espindola2010-03-191-0/+2
| | | | llvm-svn: 98994
* MC/Mach-O/x86_64: Add relocation support.Daniel Dunbar2010-03-191-0/+213
| | | | | | | | - This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information. - There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily). - 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :) llvm-svn: 98974
* MC: Add TargetAsmBackend::createObjectWriter.Daniel Dunbar2010-03-191-7/+7
| | | | | | - MCAssembler is now object-file independent, although we will surely need more work to fully support ELF/COFF. llvm-svn: 98955
* MCCodeEmitter: Add target independent fixup flag for is-pc-relative.Daniel Dunbar2010-03-192-16/+8
| | | | llvm-svn: 98954
* MC: Sink code emitter into MCAssembler.Daniel Dunbar2010-03-192-8/+5
| | | | llvm-svn: 98953
* MC/Mach-O: Move to MachObjectWriter.{h,cpp}.Daniel Dunbar2010-03-194-821/+900
| | | | llvm-svn: 98952
* MC: Add TargetAsmBackend::isVirtualSection hook.Daniel Dunbar2010-03-191-15/+7
| | | | llvm-svn: 98950
* MC: Split MCObjectWriter out of MCAssembler.cpp.Daniel Dunbar2010-03-193-131/+46
| | | | llvm-svn: 98949
* MCAssembler: Pull out MCObjectWriter class.Daniel Dunbar2010-03-191-82/+126
| | | | llvm-svn: 98948
* MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target ↵Daniel Dunbar2010-03-191-12/+1
| | | | | | specific not object writer specific task. llvm-svn: 98947
* MC/Mach-O: Lift the fixup evaluation and application up (to the same place), ↵Daniel Dunbar2010-03-191-35/+31
| | | | | | and eliminate MCAsmFixup::FixedValue. llvm-svn: 98944
* MC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout ↵Daniel Dunbar2010-03-191-31/+33
| | | | | | changes the object writer may need to make to the assembler from the actual .o writing. llvm-svn: 98943
* MC/Mach-O: Lift relocation emission logic a bit higher to separate ↵Daniel Dunbar2010-03-191-56/+77
| | | | | | evaluation / relocation handling from the actual .o writing. llvm-svn: 98942
* fix an MCInstPrinter leak that jyasskin pointed out:Chris Lattner2010-03-191-1/+2
| | | | | | createAsmStreamer now takes ownership of the instprinter. llvm-svn: 98939
* MC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct ↵Daniel Dunbar2010-03-191-1/+59
| | | | | | | | algorithm (used on x86_64) for determining whether an evaluated fixup is fully resolved (doesn't need relocation). - Test cases will follow, once we have x86_64 relocation support. llvm-svn: 98926
* MC/Mach-O/x86_64: Add getAtom[ForAddress].Daniel Dunbar2010-03-191-0/+36
| | | | | | - These find the defining symbol which identifies the containing atom for a symbol or address. They are currently very slow, but will be eliminated eventually. llvm-svn: 98925
* MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix ↵Daniel Dunbar2010-03-191-15/+52
| | | | | | some corner cases. llvm-svn: 98924
* MC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a ↵Daniel Dunbar2010-03-191-10/+18
| | | | | | made up term to refer to non-temporary labels + temporary labels in sections-which-require symbols. For Darwin, it corresponds to symbols which effectively define an atom. llvm-svn: 98923
* MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will ↵Daniel Dunbar2010-03-183-37/+44
| | | | | | need this for accessing to symbol modifiers. llvm-svn: 98791
* MC/Darwin: Add a new target hook for whether the target uses "reliable" ↵Daniel Dunbar2010-03-181-1/+4
| | | | | | | | symbol differences, basically whether the assembler should attempt to understand atoms when using scattered symbols. Also, avoid some virtual call overhead. llvm-svn: 98789
* fix GetOrCreateTemporarySymbol to require a name, clientsChris Lattner2010-03-171-11/+0
| | | | | | | should use CreateTempSymbol() if they don't care about the name. llvm-svn: 98712
OpenPOWER on IntegriCloud