summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ELF: Attempt to simplify Segment::AssignVirtualAddress.Rui Ueyama2015-04-141-1/+1
| | | | | | This is a retry of r234944. llvm-svn: 234955
* temporaryRui Ueyama2015-04-141-13/+10
| | | | llvm-svn: 234954
* temporaryRui Ueyama2015-04-141-123/+126
| | | | llvm-svn: 234953
* Use the ability to pwrite to simplify the ELF writer.Rafael Espindola2015-04-142-45/+32
| | | | | | | | | | | | Now we don't have to do 2 synchronized passes to compute offsets and then write the file. This also includes a fix for the corner case of seeking in /dev/null. It is not an error, but on some systems (Linux) the returned offset is always 0. An error is signaled by returning -1. This is checked by the existing tests now that "clang -o /dev/null ..." seeks. llvm-svn: 234952
* Change SymbolVendor::GetCompileUnitAtIndex() and SymbolVendor::Dump() to ↵Greg Clayton2015-04-141-0/+3
| | | | | | | | make sure they are thread safe. <rdar://problem/20263111> llvm-svn: 234951
* Use raw_pwrite_stream in the object writer/streamer.Rafael Espindola2015-04-1474-152/+192
| | | | | | The ELF object writer will take advantage of that in the next commit. llvm-svn: 234950
* MacOSX needs a space between $(ARCHFLAG) and $(ARCH) otherwise we try to ↵Greg Clayton2015-04-141-2/+2
| | | | | | call clang with "-archx86_64" which doesn't work. llvm-svn: 234949
* [WinEH] Avoid emitting xdata tables twice for cleanupsReid Kleckner2015-04-142-3/+25
| | | | | | | Since adding invokes of llvm.donothing to cleanups, we come here now, and trivial EH cleanup usage from clang fails to compile. llvm-svn: 234948
* ELF: Move Instrcution definition to HexagonEncoding.h.Rui Ueyama2015-04-142-28/+37
| | | | | | | | | | HexagonEncodings.h contains a list of bitmasks. The file is used only by HexagonRelocationHandler.cpp. The header is odd in the sense that it uses struct Instruction but it doesn't define the data type. This patch moves the struct definition to the header. llvm-svn: 234947
* Revert "ELF: Attempt to simplify Segment::assignVirtualAddress()."Rui Ueyama2015-04-141-105/+123
| | | | | | This reverts commit r234944 because it seems to have broken the buildbots. llvm-svn: 234946
* Remove unneeded include.Jason Molenda2015-04-141-4/+0
| | | | llvm-svn: 234945
* ELF: Attempt to simplify Segment::assignVirtualAddress().Rui Ueyama2015-04-141-123/+105
| | | | | | | | | | | | | This function is too long and complicated. Looks like new code was added incrementaly without any refactoring. Maybe no one can describe its exact semantics any more? It even contains copy-pastes inside it. This patch is an (incomplete) attempt to simplify the function. I tried to mechanically translate code to another form more intelligible. I don't still understand the whole picture, but this patch shouldn't change the linker's functionality. llvm-svn: 234944
* Rename ExecutableAtom.hpp to ExecutableAtom.hDavide Italiano2015-04-142-2/+2
| | | | | | This is for consistency with what's used elsewhere in lld tree. llvm-svn: 234943
* Reland r234613 (and follow-ups 234614, 234616, 234618)Reid Kleckner2015-04-1411-371/+404
| | | | | | | The frameescape intrinsic cannot be inlined, so I fixed the inliner in r234937. This should address PR23216. llvm-svn: 234942
* Fix printf warnings about a size mismatch on MacOSX.Greg Clayton2015-04-141-3/+3
| | | | llvm-svn: 234941
* Remove unused functions that were causing warnings.Greg Clayton2015-04-141-15/+0
| | | | llvm-svn: 234940
* Correct 'teh' and other typos / repeated words.Ed Maste2015-04-149-12/+12
| | | | | | | | Patch by Eitan Adler. Differential Revision: http://reviews.llvm.org/D8514 llvm-svn: 234939
* ELF: Remove redundant namespace qualifiers.Rui Ueyama2015-04-1424-55/+53
| | | | llvm-svn: 234938
* [Inliner] Don't inline functions with frameescape callsReid Kleckner2015-04-142-8/+63
| | | | | | | | | | | Inlining such intrinsics is very difficult, since you need to simultaneously transform many calls to llvm.framerecover and potentially duplicate the functions containing them. Normally this intrinsic isn't added until EH preparation, which is part of the backend pass pipeline after inlining. However, if it were to get fed through the inliner, this change will ensure that it doesn't break the code. llvm-svn: 234937
* ELF: Simplify ELFDefinedAtom::contentType().Rui Ueyama2015-04-142-69/+43
| | | | llvm-svn: 234936
* ELF: Split Atoms.h to Atoms.{h,cpp}.Rui Ueyama2015-04-143-361/+342
| | | | llvm-svn: 234935
* ELF: Split SegmentChunks.h to SegmentChunks.{h,cpp}.Rui Ueyama2015-04-143-435/+469
| | | | llvm-svn: 234934
* Only recalculate DFS Numbers if invalid. Invalidate DFS numbers on reset. ↵Daniel Berlin2015-04-142-0/+36
| | | | | | Add unit test to verify recalculation llvm-svn: 234933
* ELF: Split HeaderChunks.h to HeaderChunks.{h,cpp}.Rui Ueyama2015-04-144-179/+216
| | | | llvm-svn: 234932
* ELF: Split SectionChunks.h to SectionChunks.{h,cpp}.Rui Ueyama2015-04-143-919/+1061
| | | | | | The size of AArch64TargetHander.cpp.o is now 4.1MB. llvm-svn: 234931
* Make updateDFSNumbers API publicDaniel Berlin2015-04-141-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There are a number of passes that could be sped up by using dominator tree DFS numbers to order or compare things across multiple bbs (MemorySSA, MergedLoadStoreMotion, EarlyCSE, Sinking, GVN, NewGVN, for starters :P). For example, GVN/CSE elimination can be done with a simple stack/etc (instead of full-on scoped hash table or repeated leader set walks) if the DFS pair is stored next to leaders. The dominator tree keeps them, and the DOM tree nodes expose them as public, but you have no guarantee they are up to date (and in fact, if you split blocks or whatever during your pass, they definitely won't be) This means passes either have to compute their own versions[1], or make 32 queries, or .... Rather than try to hide this, i just made the API public, and make it do nothing if the numbers are already valid. [1] Which we want as a non-recursive walk, which is not pretty, sadly, because it cannot use the depth first iterators since you don't get called on the way back up. So you either have to do one walk with po_iterator and one with df_iterator, or write your own non-recursive walk that looks identical to the one in updateDFSNumbers. Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8946 llvm-svn: 234930
* verify-uselistorder: More outs() and errs(), less dbgs()Duncan P. N. Exon Smith2015-04-141-14/+17
| | | | | | | | | | | | | | Change all the normally relevant output in `verify-uselistorder` from using `dbgs()` to using `outs()` and `errs()`. Now you don't need `-debug=uselistorder` to figure out what's going on (or at what stage verification failed, or to get the paths of the left-behind temporary files). This is a debugging tool, so I put the logging messages on `outs()` and the error messages on `errs()`. I also adjusted the output to be less ***loud***. Not sure why I was so `*`-happy when I first wrote this. llvm-svn: 234929
* [ELF] Use type helper Elf_Word instead of plain uint32_t data typeSimon Atanasyan2015-04-141-6/+9
| | | | | | | | That helps to correctly write content of hash table if target and host endianness are not the same. Right now that commit does not affect any supported targets. llvm-svn: 234928
* [ELF] Write whole std::vector using a single `memcpy` callSimon Atanasyan2015-04-141-10/+3
| | | | | | | | | We do not need to iterate over `_buckets` and `_chains` vectors and write all elements one by one. No functional changes. llvm-svn: 234927
* [ELF] Remove redundant type cast to `char*` before passing array to memcpySimon Atanasyan2015-04-141-1/+1
| | | | | | No functional changes. llvm-svn: 234926
* [Mips] Write _DYNAMIC symbol on MIPS targetsSimon Atanasyan2015-04-142-0/+49
| | | | llvm-svn: 234925
* [Mips] Make tests more tolerant to the program and section headers offsetsSimon Atanasyan2015-04-1413-25/+25
| | | | | | No functional changes. llvm-svn: 234924
* Added some documentation for ForEachMacro.Sean Callanan2015-04-141-0/+8
| | | | llvm-svn: 234923
* Added support to ClangUserExpression for importingSean Callanan2015-04-145-4/+168
| | | | | | | | | | | | | all the macros from the modules the user has loaded. These macros are currently imported textually into the expression's source code, which turns out not to impose the horrific string processing overhead that I thought it would, but I still plan to look into performance improvements. Also modified TestCModules to test that this works. llvm-svn: 234922
* IR: Set -preserve-bc-uselistorder=false by defaultDuncan P. N. Exon Smith2015-04-147-1/+34
| | | | | | | But keep it on by default in `llvm-as`, `opt`, `bugpoint`, `llvm-link`, `llvm-extract`, and `LTOCodeGenerator`. Part of PR5680. llvm-svn: 234921
* IR: Change clang to set -preserve-bc-uselistorderDuncan P. N. Exon Smith2015-04-143-0/+20
| | | | | | | | | | | | Change `clang` to set `-preserve-bc-uselistorder` for the driver options `-emit-llvm` and `-save-temps`. The former is useful for reproducing results from `clang` in `opt` or `llc`, while the latter prevents `-save-temps` from affecting the output. This is part of PR5680. `-preserve-bc-uselistorder=true` is currently on by default, but a follow-up commit in LLVM will reverse it. llvm-svn: 234920
* IR: Rename 'use-list-order' options to 'uselistorder'Duncan P. N. Exon Smith2015-04-142-10/+10
| | | | | | | Rename options to be consistent with the name of `verify-uselistorder`, and update `DEBUG_TYPE` (etc.) to be consistent. llvm-svn: 234919
* Updated IRForTarget to change the way we generateSean Callanan2015-04-142-4/+4
| | | | | | | | | | | | relocations. We used to do GEP on a pointer to the result type, which is wrong. We should be doing GEP on a pointer to char, which allows us to offset correctly. This fixes the C modules testcase, so it's no longer ExpectFail. llvm-svn: 234918
* Add ladder graph utilityDaniel Berlin2015-04-141-0/+43
| | | | llvm-svn: 234917
* ELF: Split OutputELFWriter.h to OutputELFWriter.{h,cpp}.Rui Ueyama2015-04-143-448/+461
| | | | | | The size of AArch64TargetHandler.cpp.o is now 4.5MB. llvm-svn: 234916
* DebugInfo: Pubnames: Do not include variable declarations in pubnamesDavid Blaikie2015-04-142-70/+103
| | | | | | | This causes badness for GDB which expects to find a definition in any compile_unit that has an entry for the variable in its pubnames. llvm-svn: 234915
* ELF: Split TargetLayout.h into TargetLayout.{h,cpp}.Rui Ueyama2015-04-143-681/+705
| | | | | | This patch makes AArch64TargetHandler.cpp.o from 8.5MB to 6.8MB. llvm-svn: 234914
* ELF: Remove ELFT template argument when referring the base class.Rui Ueyama2015-04-1413-49/+45
| | | | | | | | We don't need to repeat the template argument. They are not ambiguous. MIPS is parameterized for ELFT, so we can't do this for MIPS, though. llvm-svn: 234913
* [SemaCXX patch] Patch to fix a crash when a 'delete' constructorFariborz Jahanian2015-04-142-4/+45
| | | | | | | is being accessed. Reviewed by Richard Smith. rdar://20281011 llvm-svn: 234912
* Update test case to include the original source code & account for some ↵David Blaikie2015-04-141-71/+71
| | | | | | | | | | | | | changes in clang's order of emission I'd added some stuff to this test case without adding the original source, which makes updating/adding further stuff rather difficult. So update it first (& it seems in the interim Clang's changed its output order a bit, so adjust the CHECK lines to account for that - rather than hand hacking the IR order which just makes it harder to maintain/change next time) llvm-svn: 234911
* [RuntimeDyld] Make SectionEntry's Name field a std::string.Lang Hames2015-04-141-1/+1
| | | | | | | StringRef is unsafe here, since SectionEntry instances can outlive the ObjectFile instances they are created from. llvm-svn: 234910
* Attempt to fix MSVC warning.Rui Ueyama2015-04-141-2/+0
| | | | | | | | | | | This patch tries to fix the following MSVC warning. warning C4661: 'bool lld::elf::ELFFile<lld::elf::ELF32LE>::isCompatible(unsigned char,unsigned char)' : no suitable definition provided for explicit template instantiation request llvm-svn: 234909
* [Orc] Reapply r234815, outputting via stdout instead.Lang Hames2015-04-142-13/+15
| | | | llvm-svn: 234908
* [msvc] Strip /W[0-4] before appending /W4Zachary Turner2015-04-141-0/+7
| | | | | | | | | | | | | | Certain versions of CMake specify /W3 as part of CMAKE_CXX_FLAGS by default, before you do anything. Appending /W4 to the end of this and using the Ninja generator results in cl : Command line warning D9025 : overriding '/W3' with '/W4'. It is not possible to suppress this since it is a command line warning and not a compiler warning, so we must fix the command line to contain only one value for /Wn. llvm-svn: 234907
* DebugInfo: Add implicit conversion from DISubprogram to DIScopeDuncan P. N. Exon Smith2015-04-142-1/+2
| | | | | | | | | | As a follow-up to r234850, add an implicit conversion from `DISubprogram` to `DIScope` to support Kaleidoscope Ch. 8. This also reverts that band-aid from r234890. (/me learns *again* to build Kaleidoscope before commit...) llvm-svn: 234904
OpenPOWER on IntegriCloud