summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Revert "The code that originally made me discover this is:"Rafael Espindola2015-04-144-39/+3
| | | | | | | This reverts commit r234898. CodeGen/ARM/2013-10-11-select-stalls.ll was faling. llvm-svn: 234903
* Improve RefreshCallGraph to remove invalid call graph edge.Chad Rosier2015-04-141-4/+7
| | | | | | | | | | | | | With commit r219944, InstCombine can now turn a sqrtl into a llvm.fabs.f64. The call graph edge originally representing the call to sqrtl becomes invalid. This patch modifies CGPassManager::RefreshCallGraph() to remove the invalid call graph edge, which can triggers an assert in CallGraphNode::addCalledFunction(). Phabricator Review: http://reviews.llvm.org/D7705 Patch by Lawrence Hu <lawrence@codeaurora.org>. llvm-svn: 234902
* Refactor: Simplify boolean expressions in ARM targetAlexander Kornienko2015-04-142-28/+25
| | | | | | | | | | Simplify boolean expressions using `true` and `false` with `clang-tidy` http://reviews.llvm.org/D8524 Patch by Richard Thomson! llvm-svn: 234901
* Change the testcase mtriple to x86_64-unknown-unknownKrzysztof Parzyszek2015-04-141-1/+1
| | | | llvm-svn: 234900
* Fix MSVC build.Rafael Espindola2015-04-141-1/+2
| | | | llvm-svn: 234899
* The code that originally made me discover this is:Daniel Jasper2015-04-144-3/+39
| | | | | | | | | | | | | | | | | | if ((a & 0x1) == 0x1) { .. } In this case we don't actually have any branch probability information and should not assume to have any. LLVM transforms this into: %and = and i32 %a, 1 %tobool = icmp eq i32 %and, 0 So, in this case, the result of a bitwise and is compared against 0, but nevertheless, we should not assume to have probability information. llvm-svn: 234898
* Use raw_pwrite_stream in clang.Rafael Espindola2015-04-1411-63/+85
| | | | | | This is a small improvement to -emit-pth and allows llvm to start requiring it. llvm-svn: 234897
* [AArch64] Allow non-standard INS/DUP encodingsBradley Smith2015-04-143-10/+47
| | | | | | | | | | The ARMv8 ARMARM states that for these instructions in A64 state: "Unspecified bits in "imm5" are ignored but should be set to zero by an assembler.", (imm4 for INS). Make the disassembler accept any encoding with these ignored bits set to 1. llvm-svn: 234896
* Add raw_pwrite_stream type.Rafael Espindola2015-04-144-5/+89
| | | | | | | This is a raw_ostream that also supports pwrite. I will be used in a sec. llvm-svn: 234895
* R600: Add GCC reg namesTom Stellard2015-04-141-4/+60
| | | | llvm-svn: 234892
* R600/SI: Fix verifier error caused by SIAnnotateControlFlowTom Stellard2015-04-142-6/+38
| | | | | | | | | | | | | | This pass will always try to insert llvm.SI.ifbreak intrinsics in the same block that its conditional value is computed in. This is a problem when conditions for breaks or continue are computed outside of the loop, because the llvm.SI.ifbreak intrinsic ends up being inserted outside of the loop. This patch fixes this problem by inserting the llvm.SI.ifbreak intrinsics in the loop header when the condition is computed outside the loop. llvm-svn: 234891
* Fixing a compile error with MSVC 2013 where there is no conversion from ↵Aaron Ballman2015-04-141-1/+1
| | | | | | DISubprogram to DIScope directly. llvm-svn: 234890
* [analyzer] This implements potential undefbehavior.ZeroAllocDereference checker.Anton Yartsev2015-04-145-12/+302
| | | | | TODO: support realloc(). Currently it is not possible due to the present realloc() handling. Currently RegionState is not being attached to realloc() in case of a zero Size argument. llvm-svn: 234889
* Fix handling of the executable arg which contains spaces (MI)Ilia K2015-04-142-6/+6
| | | | | | | | | | | | | | * Don't use the CMICmdArgValFile::GetFileNamePath for the CMIDriver::m_strCmdLineArgExecuteableFileNamePath because it wraps path with spaces into quotes what is already being done in CMIDriver::LocalDebugSessionStartupExecuteCommands * Improve the MiSyntaxTestCase.test_lldbmi_specialchars test to catch this error ``` $ bin/lldb-mi "~/p/ hello" (gdb) -file-exec-and-symbols "\"~/p/ hello\"" ^error,msg="Command 'file-exec-and-symbols'. Target binary '\"~/p/ hello\"' is invalid. error: unable to find executable for '/"~/p/ hello/"'" ``` llvm-svn: 234888
* Error out of ParseBitcodeInto(Module*) if we haven't read a ModuleFilipe Cabecinhas2015-04-143-2/+11
| | | | | | | | | | | | | | | | | | | | | | Summary: Without this check the following case failed: Skip a SubBlock which is not a MODULE_BLOCK_ID nor a BLOCKINFO_BLOCK_ID Got to end of file TheModule would still be == nullptr, and we would subsequentially fail when materializing the Module (assert at the start of BitcodeReader::MaterializeModule). Bug found with AFL. Reviewers: dexonsmith, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9014 llvm-svn: 234887
* Qualify an internal call in is_assignable to prevent ADL lookup, which would ↵Marshall Clow2015-04-142-1/+7
| | | | | | 'complete' an type definition unnecessarily. Thanks to Richard Smith for the report. llvm-svn: 234886
* Simplify some lldb-mi tests by using the Base.addTearDownHook()Ilia K2015-04-142-57/+43
| | | | llvm-svn: 234885
* Silencing a -Wreturn-type warning, as the switch is fully-covered; NFC.Aaron Ballman2015-04-141-0/+1
| | | | llvm-svn: 234884
* Re-enable target-specific relocation table sorting and use it for MipsPetar Jovanovic2015-04-146-32/+344
| | | | | | | | | | | | | | Some targets (ie. Mips) have additional rules for ordering the relocation table entries. Allow them to override generic sortRelocs(), which sorts entries by Offset. Then override this function for Mips, to emit HI16 and GOT16 relocations against the local symbol in pair with the corresponding LO16 relocation. Patch by Vladimir Stefanovic. Differential Revision: http://reviews.llvm.org/D7414 llvm-svn: 234883
* [Mips] Generate warning for invalid '-mnan' and '-march' combinationsPetar Jovanovic2015-04-148-9/+82
| | | | | | | | | | | | This patch generates a warning for invalid combination of '-mnan' and '-march' options, it properly sets NaN encoding for a given '-march', and it passes a proper NaN encoding to the assembler. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D8170 llvm-svn: 234882
* Remove useless statement.Nikola Smiljanic2015-04-141-1/+0
| | | | llvm-svn: 234881
* [MachineLICM] Use newer model of register pressure sets.Daniel Jasper2015-04-141-43/+32
| | | | | | | | | | | | | | | | TargetRegisterInfo::getRegPressureLimit has a note that it is an old model that relies on manually entered classes. Using the newer model of register pressure sets seems more appropriate. We might eventually even switch to lib/CodeGen/RegisterPressure.cpp, but we should probably do incremental changes here. Using the newer model also makes it easier to take regmasks into account which is necessary to fix llvm.org/PR23143. I am currently also preparing a patch for that, but would like to do this switch independently. Review: http://reviews.llvm.org/D8986 llvm-svn: 234880
* Roll back llvm/test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll, possibly ↵NAKAMURA Takumi2015-04-141-1/+0
| | | | | | | | wrong commit. It reverts part of r234839, "[RuntimeDyldELF] Improve GOT support". llvm-svn: 234879
* tsan: fix parsing of second_deadlock_stack flagDmitry Vyukov2015-04-142-1/+5
| | | | | | | It was broken during flag parsing refactoring. Enable test for the flag. llvm-svn: 234878
OpenPOWER on IntegriCloud