- Jun 25, 2016
-
-
Peter Collingbourne authored
Differential Revision: http://reviews.llvm.org/D21054 llvm-svn: 273730
-
Peter Collingbourne authored
The bitset metadata currently used in LLVM has a few problems: 1. It has the wrong name. The name "bitset" refers to an implementation detail of one use of the metadata (i.e. its original use case, CFI). This makes it harder to understand, as the name makes no sense in the context of virtual call optimization. 2. It is represented using a global named metadata node, rather than being directly associated with a global. This makes it harder to manipulate the metadata when rebuilding global variables, summarise it as part of ThinLTO and drop unused metadata when associated globals are dropped. For this reason, CFI does not currently work correctly when both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable globals, and fails to associate metadata with the rebuilt globals. As I understand it, the same problem could also affect ASan, which rebuilds globals with a red zone. This patch solves both of those problems in the following way: 1. Rename the metadata to "type metadata". This new name reflects how the metadata is currently being used (i.e. to represent type information for CFI and vtable opt). The new name is reflected in the name for the associated intrinsic (llvm.type.test) and pass (LowerTypeTests). 2. Attach metadata directly to the globals that it pertains to, rather than using the "llvm.bitsets" global metadata node as we are doing now. This is done using the newly introduced capability to attach metadata to global variables (r271348 and r271358). See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html Differential Revision: http://reviews.llvm.org/D21053 llvm-svn: 273729
-
Evgeniy Stepanov authored
These syscalls write two file descriptors into the output buffer, not one. llvm-svn: 273728
-
David Majnemer authored
llvm-svn: 273727
-
Rafael Espindola authored
Patch by Lei Zhang! llvm-svn: 273726
-
Chris Bieneman authored
Thanks Kevin! llvm-svn: 273725
-
Michael Kuperstein authored
Passes should depend on CodeGen, as that contains some IR-to-IR passes. llvm-svn: 273724
-
George Burgess IV authored
This patch moves MSSA's caching walker into MemorySSA, and moves the actual definition of MSSA's caching walker out of MemorySSA.h. This is done in preparation for the new walker, which should be out for review soonish. Also, this patch removes a field from UpwardsMemoryQuery and has a few lines of diff from clang-format'ing MemorySSA.cpp. llvm-svn: 273723
-
David Majnemer authored
This fixes PR28294. llvm-svn: 273722
-
Enrico Granata authored
The Objective-C Class type should not be treated as a potential dynamic type, since it actually doesn't resolve to the type of the class it points to Fixes rdar://26535584 llvm-svn: 273721
-
Francis Ricci authored
Reviewers: zturner, clayborg, tfiala Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D21648 llvm-svn: 273720
-
Chris Bieneman authored
This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets. llvm-svn: 273719
-
Sean Callanan authored
<rdar://problem/17990991> llvm-svn: 273718
-
Ahmed Bougacha authored
The opcodes are used, but only by DAG->DAG. llvm-svn: 273717
-
Ahmed Bougacha authored
llvm-svn: 273716
-
Sanjay Patel authored
llvm-svn: 273715
-
Chris Bieneman authored
I added this option in r257827 to try and add compatibility with autoconf. At the time I misunderstood the problem. Our CMake automatically generates the SVN revision information and generates a build action to update it so builds don't need to be re-configured on SCM update (which is a better solution than we had in autoconf). The problem I was actually seeing was isolated cases where SVN revision information isn't available because the repository structures have been removed. This happens in some automated testing systems. This patch allows SVN_REVISION to be overridden if the build configuration could not find the SCM repository structures, and removes the code from my original patch because it is unnecessary. llvm-svn: 273714
-
Michael Kuperstein authored
llvm-svn: 273713
-
David Majnemer authored
We cannot remove an instruction with no uses just because SimplifyInstruction succeeds. It may have side effects. llvm-svn: 273711
-
David Majnemer authored
Make sure strings don't get too big for a record, truncate them if need-be. llvm-svn: 273710
-
Carlo Bertolli authored
[OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' llvm-svn: 273709
-
Evandro Menezes authored
llvm-svn: 273708
-
Peter Collingbourne authored
as it caused PR28295. llvm-svn: 273707
-
Sanjay Patel authored
Tests to verify that the commuted variants are all exercised were added with: http://reviews.llvm.org/rL273702 llvm-svn: 273706
-
Carlo Bertolli authored
http://reviews.llvm.org/D21564 This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. llvm-svn: 273705
-
Rafael Espindola authored
This makes it slightly more powerful for dynamic-no-pic. llvm-svn: 273704
-
Reid Kleckner authored
This reverts commit r273608. Broke building code with sanitizers, where apparently these kinds of loads, casts, and truncations are common: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24502 http://crbug.com/623099 llvm-svn: 273703
-
Sanjay Patel authored
By putting all the possible commutations together, we simplify the code. Note that this is NFCI, but I'm adding tests that actually exercise each commutation pattern because we don't have this anywhere else. llvm-svn: 273702
-
Kevin Enderby authored
a good error message to be produced. This is nearly the last libObject interface that used ErrorOr and the last one that appears in llvm/include/llvm/Object/MachO.h . For Mach-O objects this is just a clean up because it’s version of getSymbolAddress() can’t return an error. I will leave it to the experts on COFF and ELF to actually add meaning full error messages in their tests if they wish. And also leave it to these experts to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h for createCOFFObjectFile() and createELFObjectFile() if they wish. Since there are no test cases for COFF and ELF error cases with respect to getSymbolAddress() in the test suite this is no functional change (NFC). llvm-svn: 273701
-
Kyle Butt authored
Tail merge was making the assumption that a layout successor or predecessor was always a cfg successor/predecessor. Remove that assumption. Changes to tests are necessary because the errant cfg edges were preventing optimizations. llvm-svn: 273700
-
Rafael Espindola authored
llvm-svn: 273699
-
Davide Italiano authored
PR: 28257 Differential Revision: http://reviews.llvm.org/D21628 llvm-svn: 273698
-
Weiming Zhao authored
Summary: this fixes build error when built with c++14 and no exceptions Reviewers: rmaprath Subscribers: weimingz, grandinj, rmaprath, cfe-commits Differential Revision: http://reviews.llvm.org/D21673 llvm-svn: 273697
-
Reid Kleckner authored
Clang emits them in reverse order to conform to the ABI, which requires left-to-right destruction. As a result, the order doesn't fall out naturally, and we have to sort things out in the backend. Fixes PR28213 llvm-svn: 273696
-
Enrico Granata authored
Fix an issue where LLDB would show the key and value of a single entry NSDictionary in the wrong order Fixes rdar://26478641 llvm-svn: 273695
-
Martin Probst authored
Checking Line.MustBeDeclaration does actually break the field and param initializer use case. llvm-svn: 273694
-
Xinliang David Li authored
llvm-svn: 273693
-
Peter Collingbourne authored
Differential Revision: http://reviews.llvm.org/D21624 llvm-svn: 273692
-
Reid Kleckner authored
We bailed out while printing codeview for an MSVC compiled SemaExprCXX.cpp that used this record. The MS reference headers look incorrect here, which is probably why we had this bug. They use a 32-bit enum as the field type, but the actual record appears to use one byte for the cookie kind followed by a flags byte. llvm-svn: 273691
-
Chad Rosier authored
llvm-svn: 273690
-