- Aug 12, 2016
-
-
Gor Nishanov authored
Summary: 1. Make coroutine representation more robust against optimization that may duplicate instruction by introducing coro.id intrinsics that returns a token that will get fed into coro.alloc and coro.begin. Due to coro.id returning a token, it won't get duplicated and can be used as reliable indicator of coroutine identify when a particular coroutine call gets inlined. 2. Move last three arguments of coro.begin into coro.id as they will be shared if coro.begin will get duplicated. 3. doc + test + code updated to support the new intrinsic. Reviewers: mehdi_amini, majnemer Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23412 llvm-svn: 278481
-
Simon Atanasyan authored
llvm-svn: 278480
-
Duncan P. N. Exon Smith authored
Remove all ilist_iterator to pointer casts. There were two reasons for casts: - Checking for an uninitialized (i.e., null) iterator. I added MachineInstrBundleIterator::isValid() to check for that case. - Comparing an iterator against the underlying pointer value while avoiding converting the pointer value to an iterator. This is occasionally necessary in MachineInstrBundleIterator, since there is an assertion in the constructors that the underlying MachineInstr is not bundled (but we don't care about that if we're just checking for pointer equality). To support the latter case, I rewrote the == and != operators for ilist_iterator and MachineInstrBundleIterator. - The implicit constructors now use enable_if to exclude const-iterator => non-const-iterator conversions from overload resolution (previously it was a compiler error on instantiation, now it's SFINAE). - The == and != operators are now global (friends), and are not templated. - MachineInstrBundleIterator has overloads to compare against both const_pointer and const_reference. This avoids the implicit conversions to MachineInstrBundleIterator that assert, instead just checking the address (and I added unit tests to confirm this). Notably, the only remaining uses of ilist_iterator::getNodePtrUnchecked are in ilist.h, and no code outside of ilist*.h directly relies on this UB end-iterator-to-pointer conversion anymore. It's still needed for ilist_*sentinel_traits, but I'll clean that up soon. llvm-svn: 278478 -
David Majnemer authored
No functionality change is intended. llvm-svn: 278477
-
David Majnemer authored
No functionality change is intended. llvm-svn: 278476
-
David Majnemer authored
No functionality change is intended. llvm-svn: 278475
-
David Majnemer authored
No functionality change is intended. llvm-svn: 278474
-
Rui Ueyama authored
llvm-svn: 278473
-
George Burgess IV authored
llvm-svn: 278472
-
George Burgess IV authored
Currently, when trying to evaluate an enable_if condition, we try to evaluate all arguments a user passes to a function. Given that we can't use variadic arguments from said condition anyway, not converting them is a reasonable thing to do. So, this patch makes us ignore any varargs when attempting to check an enable_if condition. We'd crash because, in order to convert an argument, we need its ParmVarDecl. Variadic arguments don't have ParmVarDecls. llvm-svn: 278471
-
Rui Ueyama authored
We have getSectionSize for SIZEOF command. So, I think getHeaderSize is a better name for SIZEOF_HEADERS. llvm-svn: 278470
-
David Majnemer authored
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: 278469
-
Duncan P. N. Exon Smith authored
There's nothing special about the _next/_prev pointers in SimpleReference, so just use ilist_node to do the work. llvm-svn: 278468
-
Duncan P. N. Exon Smith authored
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
-
Wei Mi authored
"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
-
Rui Ueyama authored
llvm-svn: 278465
-
Rui Ueyama authored
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
-
Haicheng Wu authored
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
-
Rui Ueyama authored
llvm-svn: 278462
-
Rui Ueyama authored
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
-
Richard Smith authored
llvm-svn: 278460
-
Bruno Cardoso Lopes authored
Breaking bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/27281/ This reverts commit r278457. llvm-svn: 278459
-
Richard Smith authored
llvm-svn: 278458
-
Bruno Cardoso Lopes authored
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 -
Bruno Cardoso Lopes authored
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
-
Ivan Krasin authored
Summary: This is a follow up to r278389 and r278442. Differential Revision: https://reviews.llvm.org/D23438 llvm-svn: 278455
-
Chris Bieneman authored
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
-
Rui Ueyama authored
llvm-svn: 278453
-
Rui Ueyama authored
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
-
Eli Friedman authored
Issue exposed by noalias or more aggressive alias analysis. Fixes http://llvm.org/PR25422. Differential revision: https://reviews.llvm.org/D21007 llvm-svn: 278451
-
Pete Cooper authored
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
-
Rui Ueyama authored
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
-
Richard Smith authored
llvm-svn: 278448
-
Richard Smith authored
llvm-svn: 278447
-
Rui Ueyama authored
llvm-svn: 278446
-
Rui Ueyama authored
Also avoid to use a lambda that is called only once. llvm-svn: 278445
-
Vedant Kumar authored
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
-
David Majnemer authored
No functionality change is intended. llvm-svn: 278443
-
Ivan Krasin authored
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
-
Todd Fiala authored
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
-