summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Core: Remove custom next-prev traits from SimpleReference, NFCDuncan P. N. Exon Smith2016-08-121-18/+14
| | | | | | | There's nothing special about the _next/_prev pointers in SimpleReference, so just use ilist_node to do the work. llvm-svn: 278468
* ADT: Add ilist_iterator conversions to/from ilist_nodeDuncan P. N. Exon Smith2016-08-121-0/+20
| | | | | | | | | | | Allow an ilist_iterator to be constructed from an ilist_node, and give access to the underlying ilist_node as well. This will be used immediately in lld to support a type-erasure use case. Longer term, they'll stick around once the iterator is using ilist_node<NodeTy>* instead of NodeTy*. llvm-svn: 278467
* Recommit 'Remove the restriction that MachineSinking is now stopped byWei Mi2016-08-1210-308/+348
| | | | | | | | | | | | | | | | "insert_subreg, subreg_to_reg, and reg_sequence" instructions' after adjusting some unittest checks. This is to solve PR28852. The restriction was added at 2010 to make better register coalescing. We assumed that it was not necessary any more. Testing results on x86 supported the assumption. We will look closely to any performance impact it will bring and will be prepared to help analyzing performance problem found on other architectures. Differential Revision: https://reviews.llvm.org/D23210 llvm-svn: 278466
* Early continue. NFC.Rui Ueyama2016-08-121-11/+14
| | | | llvm-svn: 278465
* Simplify LinkerScript<ELFT>::createSections.Rui Ueyama2016-08-121-16/+11
| | | | | | | | | Previously, we were setting LayoutInputSection's OutputSection member in createSections. Because when we create LayoutInputSectinos, we don't know the output section for them, so we backfilled the member in the function. This patch moves the code to backfill it to assignOffsets. llvm-svn: 278464
* [BranchFolding] Restrict tail merging loop blocks after MBPHaicheng Wu2016-08-123-10/+116
| | | | | | | | | To fix PR28014, this patch restricts tail merging to blocks that belong to the same loop after MBP. Differential Revision: https://reviews.llvm.org/D23191 llvm-svn: 278463
* Remove excessive parentheses.Rui Ueyama2016-08-121-1/+1
| | | | llvm-svn: 278462
* Create only one section for a name in LinkerScript.Rui Ueyama2016-08-124-83/+68
| | | | | | | | | | | | | | Previously, we created two or more output sections if there are input sections with the same name but with different attributes. That is a wrong behavior. This patch fixes the issue. One thing we need to do is to merge output section attributes. Currently, we create an output section based on the first input section's attributes. This may make a wrong output section attributes. What we need to do is to bitwise-OR attributes. We'll do it in a follow-up patch. llvm-svn: 278461
* P0217R3: serialization/deserialization support for c++17 decomposition ↵Richard Smith2016-08-127-5/+81
| | | | | | declarations. llvm-svn: 278460
* Revert "[VFS] Skip non existent files from the VFS tree"Bruno Cardoso Lopes2016-08-127-88/+8
| | | | | | | | | Breaking bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/27281/ This reverts commit r278457. llvm-svn: 278459
* P0217R3: template instantiation support for decomposition declarations.Richard Smith2016-08-1211-38/+93
| | | | llvm-svn: 278458
* [VFS] Skip non existent files from the VFS treeBruno Cardoso Lopes2016-08-127-8/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the VFS uses a YAML file, the real file path for a virtual file is described in the "external-contents" field. Example: ... { 'type': 'file', 'name': 'a.h', 'external-contents': '/a/b/c/a.h' } Currently, when parsing umbrella directories, we use vfs::recursive_directory_iterator to gather the header files to generate the equivalent modules for. If the external contents for a header does not exist, we currently are unable to build a module, since the VFS vfs::recursive_directory_iterator will fail when it finds an entry without a reliable real path. Since the YAML file could be prepared ahead of time and shared among different compiler invocations, an entry might not yet have a reliable path in 'external-contents', breaking the iteration. Give the VFS the capability to skip such entries whenever 'ignore-non-existent-contents' property is set in the YAML file. rdar://problem/27531549 llvm-svn: 278457
* [VFS] Add 'ignore-non-existent-contents' field to YAML filesBruno Cardoso Lopes2016-08-125-2/+34
| | | | | | | | | | | | | | | | | | Add 'ignore-non-existent-contents' to tell the VFS whether an invalid path obtained via 'external-contents' should cause iteration on the VFS to stop. If 'true', the VFS should ignore the entry and continue with the next. Allows YAML files to be shared across multiple compiler invocations regardless of prior existent paths in 'external-contents'. This global value is overridable on a per-file basis. This adds the parsing and write test part, but use by VFS comes next. Differential Revision: https://reviews.llvm.org/D23422 rdar://problem/27531549 llvm-svn: 278456
* WholeProgramDevirt: initialize WasDevirt in all constructors.Ivan Krasin2016-08-121-1/+1
| | | | | | | | Summary: This is a follow up to r278389 and r278442. Differential Revision: https://reviews.llvm.org/D23438 llvm-svn: 278455
* [CMake] If the compiler supports _Atomic include atomic.c in builtins librariesChris Bieneman2016-08-123-5/+36
| | | | | | This fixes a long-standing TODO by implementing a compiler check for supporting the _Atomic keyword. If the _Atomic keyword is supported by the compiler we should include it in the builtin library sources. llvm-svn: 278454
* Allocate LayoutInputSections using SpecificBumpPtrAllocator.Rui Ueyama2016-08-122-20/+19
| | | | llvm-svn: 278453
* Simplify output section ownership management.Rui Ueyama2016-08-123-2/+8
| | | | | | | | | One reason why we are (ab)using OutputSectionFactory class is because it owns output sections. Technically there's no need to have it own sections. So, this patch transfers the ownership to Out<ELFT>. llvm-svn: 278452
* [DSE] Don't remove stores made live by a call which unwinds.Eli Friedman2016-08-124-31/+96
| | | | | | | | | | Issue exposed by noalias or more aggressive alias analysis. Fixes http://llvm.org/PR25422. Differential revision: https://reviews.llvm.org/D21007 llvm-svn: 278451
* Refactor isValidAssumeForContext to reduce duplication and indentation. NFC.Pete Cooper2016-08-121-27/+21
| | | | | | | This method had some duplicate code when we did or did not have a dom tree. Refactor it to remove the duplication, but also clean up the control flow to have less duplication. llvm-svn: 278450
* Remove OutputSectionBuilder::finalize.Rui Ueyama2016-08-121-15/+4
| | | | | | | | The reason why we had to assign offsets only to sections that don't contain layout sections were unclear. It turned out that we can live without it. llvm-svn: 278449
* Remove unused and undesirable reference from BindingDecl to DecompositionDecl.Richard Smith2016-08-125-28/+10
| | | | llvm-svn: 278448
* P0217R3: Constant expression evaluation for decomposition declarations.Richard Smith2016-08-1210-17/+152
| | | | llvm-svn: 278447
* Remove useless local variable.Rui Ueyama2016-08-121-3/+2
| | | | llvm-svn: 278446
* Split LinkerScript<ELFT>::createSections.Rui Ueyama2016-08-122-24/+35
| | | | | | Also avoid to use a lambda that is called only once. llvm-svn: 278445
* [Basic] Add const qualifier to SM.isInSystemMacro (NFC)Vedant Kumar2016-08-121-1/+1
| | | | | | | | | | | The member function is a predicate, and doesn't apply any changes on the object. Patch by Visoiu Mistrih Francis! Differential Revision: https://reviews.llvm.org/D23433 llvm-svn: 278444
* Use the range variant of find_if instead of unpacking begin/endDavid Majnemer2016-08-1217-100/+73
| | | | | | No functionality change is intended. llvm-svn: 278443
* WholeProgramDevirt: fix access to a non-initialized field.Ivan Krasin2016-08-121-1/+1
| | | | | | | | | | Summary: This is a follow up to r278389, where I have introduced the bug Reviewers: mehdi_amini Differential Revision: https://reviews.llvm.org/D23436 llvm-svn: 278442
* Decoupled Options from CommandInterpreter.Todd Fiala2016-08-1169-695/+915
| | | | | | | | | | | | | | | | Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440
* Replace a variadic forwarding template function with less complex ones.Rui Ueyama2016-08-111-26/+28
| | | | llvm-svn: 278439
* Add comment /NFCXinliang David Li2016-08-111-1/+2
| | | | llvm-svn: 278438
* [ADT] Migrate DepthFirstIterator to use NodeRefTim Shen2016-08-116-67/+72
| | | | | | | | | | | | | | | | | | | Summary: Notice that the data layout is changed: instead of using std::pair<PointerIntPair<NodeType*, 1>, ChildItTy>, now use std::pair<NodeRef, Optional<ChildItTy>>. A NFC but worth noticing change is operator==(), since we only compare an iterator against end(), it's better to put an assert there and make people noticed when it fails. Reviewers: dblaikie, chandlerc Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D23146 llvm-svn: 278437
* Fix typos /NFCXinliang David Li2016-08-111-2/+2
| | | | llvm-svn: 278436
* P0217R3: Perform semantic checks and initialization for the bindings in aRichard Smith2016-08-1126-239/+1416
| | | | | | | decomposition declaration for arrays, aggregate-like structs, tuple-like types, and (as an extension) for complex and vector types. llvm-svn: 278435
* Remove unnecessary extra version of isValidAssumeForContext. NFC.Pete Cooper2016-08-111-11/+5
| | | | | | | | | | | There were 2 versions of this method. A public one which takes a const Instruction* and a private implementation which takes a mutable Value* and casts to an Instruction*. There was no need for the 2 versions as all callers pass a const Instruction* and there was no need for a mutable pointer as we only do analysis here. llvm-svn: 278434
* Use the range variant of find instead of unpacking begin/endDavid Majnemer2016-08-1178-205/+142
| | | | | | | | | If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433
* Don't import variadic functionsPiotr Padlewski2016-08-117-10/+46
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds IsVariadicFunction bit to summary in order to not import variadic functions. Inliner doesn't inline variadic functions because it is hard to reason about it. This one small fix improves Importer by about 16% (going from 86% to 100% of imported functions that are inlined anywhere) on some spec benchmarks like 'int' and others. Reviewers: eraman, mehdi_amini, tejohnson Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23339 llvm-svn: 278432
* X86-FMA3: Implemented commute transformation for EVEX/AVX512 FMA3 opcodes.Vyacheslav Klochkov2016-08-1110-610/+792
| | | | | | | | | | | This helped to improved memory-folding and register coalescing optimizations. Also, this patch fixed the tracker #17229. Reviewer: Craig Topper. Differential Revision: https://reviews.llvm.org/D23108 llvm-svn: 278431
* Make class hierarchy more shallow.Rui Ueyama2016-08-111-3/+4
| | | | | | | LayoutInputSection is a dummy class and does not need any features that the actual implementation (InputSection class) provides. llvm-svn: 278430
* Re-commit r278066: Do not ignore SizeOfOptionalHeader in COFF header even if ↵Rui Ueyama2016-08-111-1/+3
| | | | | | PE header is not present. llvm-svn: 278429
* GlobalISel: support 'null' constant in translation.Tim Northover2016-08-112-0/+11
| | | | | | | | It's sharing the integer G_CONSTANT for now since I don't *think* it creates any ambiguity (even on weird archs). If that turns out wrong we can create a G_PTRCONSTANT or something. llvm-svn: 278423
* Extend trip count instead of truncating IV in LFTR, when legalEhsan Amiri2016-08-115-7/+195
| | | | | | | | | | | | | | | | | When legal, extending trip count in the loop control logic generates better code compared to truncating IV. This is because (1) extending trip count is a loop invariant operation (see genLoopLimit where we prove trip count is loop invariant). (2) Scalar Evolution seems to have problems understanding trunc when computing loop trip count. So removing them allows better analysis performed in Scalar Evolution. (In particular this fixes PR 28363 which is the motivation for this change). I am not going to perform any performance test. Any degradation caused by this should be an indication of a bug elsewhere. To prove legality, we rely on SCEV to prove zext(trunc(IV)) == IV (or similarly for sext). If this holds, we can prove equivalence of trunc(IV)==ExitCnt (1) and IV == zext(ExitCnt). Simply take zext of boths sides of (1) and apply the proven equivalence. This commit contains changes in a newly added testcase which was not included in the previous commit (which was reverted later on). https://reviews.llvm.org/D23075 llvm-svn: 278421
* Remove trailing whitespace.Rui Ueyama2016-08-111-1/+1
| | | | llvm-svn: 278420
* Dead strip DESC bits should only be set on object files.Pete Cooper2016-08-112-1/+6
| | | | | | It only makes sense to set on N_NO_DEAD_STRIP on a relocatable object file. Otherwise the bits aren't useful for anything. Matches the ld64 behaviour. llvm-svn: 278419
* [MSSA] Use is_containedDaniel Berlin2016-08-111-1/+1
| | | | llvm-svn: 278418
* Use range algorithms instead of unpacking begin/endDavid Majnemer2016-08-1146-153/+137
| | | | | | No functionality change is intended. llvm-svn: 278417
* [Hexagon] Allow non-returning calls in hardware loopsKrzysztof Parzyszek2016-08-114-2/+72
| | | | llvm-svn: 278416
* [vim] Add more attributes to llvm.vimDavid Majnemer2016-08-111-0/+2
| | | | llvm-svn: 278415
* AMDGPU: Remove unused tablegen utilitiesMatt Arsenault2016-08-111-50/+0
| | | | llvm-svn: 278414
* [SCEV] Update interface to handle SCEVExpander insert point motion.Geoff Berry2016-08-114-16/+73
| | | | | | | | | | | | | | | | | | | | Summary: This is an extension of the fix in r271424. That fix dealt with builder insert points being moved by SCEV expansion, but only for the lifetime of the expand call. This change modifies the interface so that LSR can safely call expand multiple times at the same insert point and do the right thing if one of the expansions decides to move the original insert point. This is a fix for PR28719. Reviewers: sanjoy Subscribers: llvm-commits, mcrosier, mzolotukhin Differential Revision: https://reviews.llvm.org/D23342 llvm-svn: 278413
* Add obj2yaml to the list of tool_patterns in lit. NFCPete Cooper2016-08-111-0/+1
| | | | llvm-svn: 278412
OpenPOWER on IntegriCloud