summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update test case for llvm summary format changes in D17592.Teresa Johnson2016-03-111-4/+4
| | | | llvm-svn: 263276
* [ThinLTO] Support for reference graph in per-module and combined summary.Teresa Johnson2016-03-1125-396/+1280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for including a full reference graph including call graph edges and other GV references in the summary. The reference graph edges can be used to make importing decisions without materializing any source modules, can be used in the plugin to make file staging decisions for distributed build systems, and is expected to have other uses. The call graph edges are recorded in each function summary in the bitcode via a list of <CalleeValueIds, StaticCount> tuples when no PGO data exists, or <CalleeValueId, StaticCount, ProfileCount> pairs when there is PGO, where the ValueId can be mapped to the function GUID via the ValueSymbolTable. In the function index in memory, the call graph edges reference the target via the CalleeGUID instead of the CalleeValueId. The reference graph edges are recorded in each summary record with a list of referenced value IDs, which can be mapped to value GUID via the ValueSymbolTable. Addtionally, a new summary record type is added to record references from global variable initializers. A number of bitcode records and data structures have been renamed to reflect the newly expanded scope of the summary beyond functions. More cleanup will follow. Reviewers: joker.eph, davidxl Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D17212 llvm-svn: 263275
* Check for a NULL input filehandle before referencing it.Jim Ingham2016-03-111-8/+11
| | | | | | <rdar://problem/25105824> llvm-svn: 263274
* Fix clang crash: when CodeGenAction is initialized without a context, use ↵Mehdi Amini2016-03-111-1/+1
| | | | | | | the member and not the parameter From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263273
* Revert r263252: "[ELF] - Change all messages to lowercase to be consistent."Rui Ueyama2016-03-1125-141/+156
| | | | | | This reverts commit r263252 because the change contained unrelated changes. llvm-svn: 263272
* Now that it is trivial, fix pr26878.Rafael Espindola2016-03-112-2/+40
| | | | llvm-svn: 263271
* Type correct Visual Studio native visualization for PointerUnionsMike Spertus2016-03-111-9/+9
| | | | | | Visualize pointer unions by their actual type rather than as void *. llvm-svn: 263270
* [SEH] Remove nounwind/noinline from outlined finally funcletsReid Kleckner2016-03-112-8/+19
| | | | | | With the new EH representation this is no longer necessary. llvm-svn: 263269
* Update test case to appease bots after 263255.Chad Rosier2016-03-111-4/+4
| | | | | | I'll follow up with Matt to confirm this is the correct fix. llvm-svn: 263268
* Fix build: use -> with pointers and not .Mehdi Amini2016-03-111-1/+1
| | | | | | | Silly typo. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263267
* Fix spelling.Simon Pilgrim2016-03-111-1/+1
| | | | llvm-svn: 263266
* [IRTranslator] Translate unconditional branches.Quentin Colombet2016-03-115-1/+59
| | | | llvm-svn: 263265
* [MachineIRBuilder] Rework buildInstr API to maximize code reuse.Quentin Colombet2016-03-112-24/+34
| | | | llvm-svn: 263264
* [IRTranslator] Update getOrCreateVReg API to use references.Quentin Colombet2016-03-112-12/+13
| | | | | | | A value that we want to keep in a virtual register cannot be null. Reflect that in the API. llvm-svn: 263263
* [MachineIRBuilder] Rename the setter of MF for consistency with the getter.Quentin Colombet2016-03-113-3/+3
| | | | llvm-svn: 263262
* [MachineIRBuilder] Rename the setter for MBB for consistency with the getter.Quentin Colombet2016-03-113-5/+7
| | | | llvm-svn: 263261
* [IRTranslator] Update getOrCreateBB API to use references.Quentin Colombet2016-03-112-5/+7
| | | | | | A null basic block is invalid, so just pass a reference. llvm-svn: 263260
* [GlobalISel][Target] Add an opcode for unconditional branch.Quentin Colombet2016-03-115-7/+21
| | | | llvm-svn: 263259
* Remove PreserveNames template parameter from IRBuilderMehdi Amini2016-03-1114-41/+32
| | | | | | | | | | | | | | | Summary: Following r263086, we are now relying on a flag on the Context to discard Value names in release builds. Reviewers: chandlerc Subscribers: mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D18023 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263258
* Remove compile time PreserveName switch based on NDEBUGMehdi Amini2016-03-115-36/+15
| | | | | | | | | | | | | | | Summary: Following r263086, we are now relying on a flag on the Context to discard Value names in release builds. Reviewers: chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18024 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263257
* Do not specialize IRBuilder to strip names in SROAMehdi Amini2016-03-111-22/+10
| | | | | | | | | | | | | | | | | Summary: Following r263086, we are replacing this by a runtime check. More cleanup will follow on the IRBuilder itself, but I submitted this patch separately as SROA has a fancy "prefixInserter" class that needs extra-love. Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18022 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263256
* [misched] Fix a truncation issue from r263021.Chad Rosier2016-03-111-1/+1
| | | | | | | | | The truncation was causing the sorting algorithm to behave oddly when comparing positive and negative offsets. Fortunately, this doesn't currently happen in practice and was exposed by a WIP. Thus, I can't test this change now, but the follow on patch will. llvm-svn: 263255
* Yet more MSVC fixes.Rafael Espindola2016-03-111-3/+6
| | | | llvm-svn: 263253
* [ELF] - Change all messages to lowercase to be consistent.George Rimar2016-03-1125-156/+141
| | | | | | | | | | | | | | That is directly opposite to http://reviews.llvm.org/D18045, which was reverted. This patch changes all messages to start from lowercase letter if they were not before. That is done to be consistent with clang. Differential revision: http://reviews.llvm.org/D18085 llvm-svn: 263252
* More MSVC fixes.Rafael Espindola2016-03-113-4/+5
| | | | llvm-svn: 263251
* [PM] Sink the "Expression" type for GVN into the class as a privateChandler Carruth2016-03-112-18/+20
| | | | | | | | | | | | | | | member type. Because of how this type is used by the ValueTable, it cannot actually have hidden visibility. GCC actually nicely warns about this but Clang just silently ... I don't even know. =/ We should do a better job either way though. This should resolve a bunch of the GCC warnings about visibility that the port of GVN triggered and make the visibility story a bit more correct. llvm-svn: 263250
* Trying to fix the MSVC build.Rafael Espindola2016-03-111-5/+6
| | | | llvm-svn: 263249
* Avoid calling getNamedValue.Rafael Espindola2016-03-113-61/+76
| | | | | | | In lld we usually avoid hash lookups. In addition to that, IR names are not fully mangled, so it is best to avoid using them whenever possible. llvm-svn: 263248
* More UTF string conversion wrappersMarianne Mailhot-Sarrasin2016-03-114-3/+162
| | | | | | | | | | | Added new string conversion wrappers that convert between `std::string` (of UTF-8 bytes) and `std::wstring`, which is particularly useful for Win32 interop. Also fixed a missing string conversion for `getenv` on Win32, using these new wrappers. The motivation behind this is to provide the support functions required for LLDB to work properly on Windows with non-ASCII data; however, the functions are not LLDB specific. Patch by cameron314 Differential Revision: http://reviews.llvm.org/D17549 llvm-svn: 263247
* Revert r263036, it's ABI-breaking.Nico Weber2016-03-113-46/+5
| | | | llvm-svn: 263246
* Add tests for ARM Cortex-R8Alexandros Lamprineas2016-03-111-0/+3
| | | | | | | | | | | Add command-line tests for ARM Cortex-R8 checking that the driver calls clang -cc1 with the correct little-endian/big-endian, and ARM/Thumb triple. Patch by Pablo Barrio <pablo.barrio@arm.com> Differential Revision: http://reviews.llvm.org/D18052 llvm-svn: 263245
* Don't invent names for STT_SECTION symbols.Rafael Espindola2016-03-112-7/+2
| | | | | | We should just copy the symbol names with -r. llvm-svn: 263244
* Simplify test.Rafael Espindola2016-03-111-8/+19
| | | | | | We only need one run of llmv-readobj. llvm-svn: 263243
* [AMDGPU] Fix VOPC instruction operand namingsValery Pykhtin2016-03-112-2/+27
| | | | | | Differential Revision: http://reviews.llvm.org/D17966 llvm-svn: 263242
* Simplify test. NFC.Rafael Espindola2016-03-111-2/+2
| | | | llvm-svn: 263241
* This reverts the r263125George Rimar2016-03-1121-74/+74
| | | | | | | | | | | | | | | | | | | | It was discussed to make all messages be lowercase to be consistent with clang. (also reverts the r263128 which fixed build bot fail after r263125) Original commit message: [ELF] - Consistent spelling for error/warning messages Previously error and warnings were not consistent in lld. Some of them started from lowercase letter, others from uppercase. Also there was one or two which had a dot at the end. This patch changes all messages to start from uppercase letter if they were not before. Differential revision: http://reviews.llvm.org/D18045 llvm-svn: 263240
* [X86][AVX] Fixed issue where a long chain of shuffles could attempt to ↵Simon Pilgrim2016-03-112-9/+50
| | | | | | | | combine to a single (illegal) PSHUFB instruction. Its not enough that we test for SSSE3 - that's only OK for 128-bit vectors - we also need to test for AVX2 / AVX512BW for 256/512 bit vector cases. llvm-svn: 263239
* Run dos2unix. NFC.Rafael Espindola2016-03-115-141/+141
| | | | llvm-svn: 263238
* Represent local symbols with DefinedRegular.Rafael Espindola2016-03-116-70/+41
| | | | llvm-svn: 263237
* [ELF][MIPS] Update comment about creation local GOT entries for non-local ↵Simon Atanasyan2016-03-111-3/+5
| | | | | | symbols. NFC. llvm-svn: 263236
* [AA] Make BasicAA just require domtree.Chandler Carruth2016-03-111-4/+5
| | | | | | | | | | | | | This doesn't change how many times we construct domtrees in the normal pipeline, and it removes fragility and instability where basic-aa may not be run in time to see domtrees because they happen to be constructed afterward. This isn't quite as clean as the change to memdep because there is a mode where basic-aa specifically runs without domtrees -- in the hacking version used by function-attrs with the legacy pass manager. llvm-svn: 263234
* Fixed MemoryCache L1 cache flushMarianne Mailhot-Sarrasin2016-03-114-1/+86
| | | | | | | | Use the same method to find the cache line as in Read(). Differential Revision: http://reviews.llvm.org/D18050 llvm-svn: 263233
* [memdep] Just require domtree for memdep.Chandler Carruth2016-03-112-18/+13
| | | | | | | | | | | | | | This doesn't cause us to construct dominator trees any more often in the normal pipeline, and removes an entire mode of memdep that needed to be reasoned about and maintained. Perhaps more importantly, it removes the ability for the results of memdep to be different because of accidental pass scheduling goofs or the order of evaluation of 'getResult' calls. Essentially, 'getCachedResult', unless across IR-unit boundaries, is extremely dangerous. We need to work much harder to avoid it (or its analog in the old pass manager). llvm-svn: 263232
* [PM] The order of evaluation of these analyses is actually significant,Chandler Carruth2016-03-111-5/+10
| | | | | | | | | | | | | | | | | | | | much to my horror, so use variables to fix it in place. This terrifies me. Both basic-aa and memdep will provide more precise information when the domtree and/or the loop info is available. Because of this, if your pass (like GVN) requires domtree, and then queries memdep or basic-aa, it will get more precise results. If it does this in the other order, it gets less precise results. All of the ideas I have for fixing this are, essentially, terrible. Here I've just caused us to stop having unspecified behavior as different implementations evaluate the order of these arguments differently. I'm actually rather glad that they do, or the fragility of memdep and basic-aa would have gone on unnoticed. I've left comments so we don't immediately break this again. This should fix bots whose host compilers evaluate the order of arguments differently from Clang. llvm-svn: 263231
* Remove a redundant cast.Rafael Espindola2016-03-111-2/+2
| | | | llvm-svn: 263230
* [mips] MIPSR6 Instruction itinerariesVasileios Kalintiris2016-03-115-95/+216
| | | | | | | | | | | | | | Summary: Defines instruction itineraries for common MIPSR6 instructions. Patch by Simon Dardis. Reviewers: vkalintiris Subscribers: MatzeB, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D17198 llvm-svn: 263229
* Simplify now that local symbols can use getVA.Rafael Espindola2016-03-111-50/+42
| | | | | | | | It is really odd that Mips differentiates symbols that are born local and those that become local because of hidden visibility. I don't know enough mips to known if this is a bug or not. llvm-svn: 263228
* [ELF] - Early continue in InputSectionBase<ELFT>::relocate(). NFC.George Rimar2016-03-111-3/+3
| | | | llvm-svn: 263227
* [ELF] - Evaluate addend earlier and use it instead getAddend() calls. NFC.George Rimar2016-03-111-6/+3
| | | | llvm-svn: 263226
* Compute value of local symbol with getVA.Rafael Espindola2016-03-114-93/+80
| | | | llvm-svn: 263225
OpenPOWER on IntegriCloud