Commit Graph

255956 Commits

Author SHA1 Message Date
Rui Ueyama 7edde294aa Factor out code to parse -L and -rpath.
llvm-svn: 296224
2017-02-25 01:51:44 +00:00
Rui Ueyama a4a643c6b9 Sort options. NFC.
llvm-svn: 296223
2017-02-25 01:51:25 +00:00
Junmo Park 061bec802e Minor code cleanup. NFC.
llvm-svn: 296222
2017-02-25 01:50:45 +00:00
Richard Trieu ff60e0f898 [ODRHash] Move inherited visitor call to end of function.
llvm-svn: 296221
2017-02-25 01:29:34 +00:00
Zachary Turner 3e2b6925b9 Re-enable BinaryStreamTest.StreamReaderObject.
I had an invalid pointer / size calculation that was causing
a stack smash.  Should be fixed now.

llvm-svn: 296220
2017-02-25 01:20:08 +00:00
Akira Hatanaka f003cd3344 Remove redundant code. NFC.
llvm-svn: 296219
2017-02-25 00:59:49 +00:00
Akira Hatanaka 2b882050ce Clean up ObjCARCOpts.cpp. NFC.
I removed unused functions and variables and moved variables closer to
their uses.

llvm-svn: 296218
2017-02-25 00:53:38 +00:00
Zachary Turner 42d450733b Disable BinaryStreamTest.StreamReaderObject temporarily.
This is crashing on some bots, so I need some time to investigate.

llvm-svn: 296217
2017-02-25 00:52:59 +00:00
Paul Robinson 4032785206 Revert r296209, still one more test to go.
llvm-svn: 296216
2017-02-25 00:50:34 +00:00
Zachary Turner af299ea5d4 [PDB] General improvements to Stream library.
This adds various new functionality and cleanup surrounding the
use of the Stream library.  Major changes include:

* Renaming of all classes for more consistency / meaningfulness
* Addition of some new methods for reading multiple values at once.
* Full suite of unit tests for reader / writer functionality.
* Full set of doxygen comments for all classes.
* Streams now store their own endianness.
* Fixed some bugs in a few of the classes that were discovered
  by the unit tests.

llvm-svn: 296215
2017-02-25 00:44:30 +00:00
Vedant Kumar 42de380765 [ubsan] Detect signed overflow UB in remainder operations
Teach ubsan to diagnose remainder operations which have undefined
behavior due to signed overflow (e.g INT_MIN % -1).

Differential Revision: https://reviews.llvm.org/D29437

llvm-svn: 296214
2017-02-25 00:43:39 +00:00
Vedant Kumar 82ee16beb8 [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)
C requires the operands of arithmetic expressions to be promoted if
their types are smaller than an int. Ubsan emits overflow checks when
this sort of type promotion occurs, even if there is no way to actually
get an overflow with the promoted type.

This patch teaches clang how to omit the superflous overflow checks
(addressing PR20193).

Testing: check-clang and check-ubsan.

Differential Revision: https://reviews.llvm.org/D29369

llvm-svn: 296213
2017-02-25 00:43:36 +00:00
Zachary Turner 65d2e7f72c Remove svn:eol-style=native from Properties.
llvm-svn: 296212
2017-02-25 00:41:19 +00:00
Zachary Turner d2684b7969 [PDB] Rename Stream related source files.
This is part of a larger effort to get the Stream code moved
up to Support.  I don't want to do it in one large patch, in
part because the changes are so big that it will treat everything
as file deletions and add, losing history in the process.
Aside from that though, it's just a good idea in general to
make small changes.

So this change only changes the names of the Stream related
source files, and applies necessary source fix ups.

llvm-svn: 296211
2017-02-25 00:33:34 +00:00
Dean Michael Berris f0cb13d704 [XRAY] A Color Choosing helper for XRay Graph
Summary:
In Preparation for graph comparison, this patch breaks out the color
choice code from xray-graph into a library and adds polynomials for
the Sequential and Difference sets from ColorBrewer.

Depends on D29005

Reviewers: dblaikie, chandlerc, dberris

Reviewed By: dberris

Subscribers: chandlerc, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D29363

llvm-svn: 296210
2017-02-25 00:26:42 +00:00
Paul Robinson 7c344cf2b7 [PS4] Set our default dialect to C++11. NFC for other targets.
llvm-svn: 296209
2017-02-25 00:15:45 +00:00
Easwaran Raman a8b9cdc9e2 [InlineCost] Move the code in isGEPOffsetConstant to a lambda.
Differential revision: https://reviews.llvm.org/D30112

llvm-svn: 296208
2017-02-25 00:10:22 +00:00
Junmo Park 7ff4c045eb Minor code cleanup. NFC.
llvm-svn: 296207
2017-02-25 00:08:53 +00:00
Rong Xu a1a9f70537 [PGO] Directory name stripping in global identifier for static functions
Current internal option -static-func-full-module-prefix keeps all the
directory path the profile counter names for static functions. The default
of this option is false. This strips the directory names from the source
filename which is problematic:

(1) it creates linker errors for profile-generation compilation, exposed in
our internal benchmarks. We are seeing messages like
"warning: relocation refers to discarded section".
This is due to the name conflicts after the stripping.

(2) the stripping only applies to getPGOFuncName.
Current Thin-LTO module importing for the indirect-calls assumes
the source directory name not being stripped. Current default value
for this option can potentially prevent some inter-module
indirect-call-promotions.

This patch turns the default value for -static-func-full-module-prefix to true.

The second part of the patch is to have an alternative implementation under
 the internal option -static-func-strip-dirname-prefix=<value>

This options specifies level of directories to be stripped from the source
filename. Using a large value as the parameter has the same effect as
-static-func-full-module-prefix.

Differential Revision: http://reviews.llvm.org/D29512

llvm-svn: 296206
2017-02-25 00:00:36 +00:00
Mike Aizatsky 3fc6fb7137 [sancov] extending sancov --help documentation
Differential Revision: https://reviews.llvm.org/D30361

llvm-svn: 296205
2017-02-24 23:55:18 +00:00
Dan Gohman 82607f56bd [WebAssembly] Add support for using a wasm global for the stack pointer.
This replaces the __stack_pointer variable which was allocated in linear
memory.

llvm-svn: 296201
2017-02-24 23:46:05 +00:00
Richard Trieu 8d543e2741 [ODRHash] Finish FieldDecl support by handling mutable and initializers.
https://reviews.llvm.org/rL296170

llvm-svn: 296198
2017-02-24 23:35:37 +00:00
Krzysztof Parzyszek 0d67b10a3c [Hexagon] Undo shift folding where it could simplify addressing mode
For example, avoid (single shift):
  r0 = and(##536870908,lsr(r0,#3))
  r0 = memw(r1+r0<<#0)

in favor of (two shifts):
  r0 = lsr(r0,#5)
  r0 = memw(r1+r0<<#2)

llvm-svn: 296196
2017-02-24 23:34:24 +00:00
Charles Li 6de8aca1d0 [Test] Make Lit tests C++11 compatible #10
Differential Revision: https://reviews.llvm.org/D21626

llvm-svn: 296193
2017-02-24 23:23:53 +00:00
Dan Gohman d934cb8806 [WebAssembly] Basic support for Wasm object file encoding.
With the "wasm32-unknown-unknown-wasm" triple, this allows writing out
simple wasm object files, and is another step in a larger series toward
migrating from ELF to general wasm object support. Note that this code
and the binary format itself is still experimental.

llvm-svn: 296190
2017-02-24 23:18:00 +00:00
Chris Bieneman fb34a35c4e [.gitignore] Update .gitignore to ignore a nested build directory
Summary:
A number of tools and common workflows include putting a build directory inside the source checkout under the folder "build". Adding this to .gitignore seems useful.

As an example, the CMake Tools plugin for VSCode does this.

Reviewers: chandlerc, echristo, zturner

Reviewed By: zturner

Subscribers: MatzeB, mehdi_amini, llvm-commits, jgosnell

Differential Revision: https://reviews.llvm.org/D30346

llvm-svn: 296188
2017-02-24 23:09:30 +00:00
Krzysztof Parzyszek be5028aed3 [Hexagon] Prettify code in HexagonDAGToDAGISel::Select
llvm-svn: 296187
2017-02-24 23:00:40 +00:00
Wei Ding 4d3d4ca1b3 AMDGPU : Replace FMAD with FMA when denormals are enabled.
Differential Revision: http://reviews.llvm.org/D29958

llvm-svn: 296186
2017-02-24 23:00:29 +00:00
Charles Li 9ea0817c5a [Test] Make Lit tests C++11 compatible #9
[Test] Make Lit tests C++11 compatible #9

Differential Revision: https://reviews.llvm.org/D20710

llvm-svn: 296184
2017-02-24 22:22:05 +00:00
Michal Gorny 018d13597a [test] Try to link -latomic to provide atomics when available
When using -rtlib=libgcc, the fallback implementation of __atomic_*
builtins is provided via libatomic (included in GCC). However, neither
GCC itself nor clang link libatomic implicitly, and it seems that GCC
upstream expects projects to link it explicitly as necessary.

Since compiler-rt provides __atomic_* builtins directly in the main
library, check if they are provided by the default libraries first.
If they are not, check if -latomic is available to provide them
and add explicit -latomic for tests in this case.

This fixes unresolved __atomic_load() references when running openmp
tests on i386 with libgcc backend.

Differential Revision: https://reviews.llvm.org/D30083

llvm-svn: 296183
2017-02-24 22:15:24 +00:00
Stanislav Mekhanoshin 42259cf35e Revert "Correct register pressure calculation in presence of subregs"
This reverts commit r296009. It broke one out of tree target and also
does not account for all partial lines added or removed when calculating
PressureDiff.

llvm-svn: 296182
2017-02-24 21:56:16 +00:00
Sanjay Patel 588e41586e [utils] allow auto-generation of checks for thumb triples
If there's some reason not to do this, feel free to revert and/or fix, but
for the cases I'm looking at, the script appears to do fine for these targets.

llvm-svn: 296181
2017-02-24 21:47:44 +00:00
Evgeniy Stepanov 00400d36c9 Disallow redefinition of section symbols.
Differential Revision: https://reviews.llvm.org/D30235

llvm-svn: 296180
2017-02-24 21:44:58 +00:00
Evgeniy Stepanov 0338ce83cd Initialize MCContext::InlineSrcMgr in the constructor.
Found with ASan (and a local source change) on test/CodeGen/XCore/section-name.ll.

llvm-svn: 296179
2017-02-24 21:44:52 +00:00
Sanjay Patel ab08bb8da9 [ARM] add tests for alternate forms of select-of-constants; NFC
llvm-svn: 296178
2017-02-24 21:36:34 +00:00
Dan Gohman 9e188e3366 [WebAssembly] Define an initial set of relocation types for Wasm.
This set will likely evolve, along with the Wasm linking ABI.

llvm-svn: 296177
2017-02-24 21:21:44 +00:00
Tim Northover ef29e7284b GlobalISel: check for CImm rather than Imm on G_CONSTANTs.
All G_CONSTANTS created by the MachineIRBuilder have an operand of type CImm
(i.e. a ConstantInt), so that's what the selector needs to look for.

llvm-svn: 296176
2017-02-24 21:21:38 +00:00
Sanjay Patel cd72f156d6 [ARM] auto-generate complete checks; NFC
The affected test may change with a patch I'm looking at for DAGCombiner,
so I want to make sure it's not a regression.

llvm-svn: 296175
2017-02-24 21:19:09 +00:00
Richard Smith 6f0e63eab3 Factor out more commonality between handling of deletion and exception specifications for special member functions.
llvm-svn: 296173
2017-02-24 21:18:47 +00:00
Dan Gohman 6999c4fd28 [WebAssembly] Handle f16 in fast-isel.
llvm-svn: 296172
2017-02-24 21:05:35 +00:00
Nico Weber 0760360dcc Try to unbreak tests after r296166
Looks like %T isn't per-test but per-test-directory, and
the rm was deleting temp files written by other tests in
test/Format.  Limit the rm's scope a bit.

llvm-svn: 296171
2017-02-24 21:01:43 +00:00
Richard Trieu 93772fcfc7 [ODRHash] Add handling of bitfields
Differential Revision: https://reviews.llvm.org/D21675

llvm-svn: 296170
2017-02-24 20:59:28 +00:00
Xin Tong 68ea9aa23a Fix Indentation. NFCI
llvm-svn: 296169
2017-02-24 20:59:26 +00:00
Lang Hames 630d2639f9 [Orc][RPC] Accept both const char* and char* arguments for string serialization.
llvm-svn: 296168
2017-02-24 20:56:43 +00:00
Eli Friedman c12a5a7595 [CodeGenPrepare] Make -addr-sink-using-gep work with address spaces.
When we construct addressing modes, we use isNoopAddrSpaceCast to ignore
addrspacecast instructions. Make sure we insert the correct addrspacecast
when we reconstruct the addressing mode.

Differential Revision: https://reviews.llvm.org/D30114

llvm-svn: 296167
2017-02-24 20:51:36 +00:00
Nico Weber cc0573b03f clang-format: Don't leave behind temp files in -i mode on Windows, PR26125
Fix and analysis by Wei Mao <weimao1@gmail.com> (see bug), test by me.

llvm-svn: 296166
2017-02-24 20:49:00 +00:00
Jan Vesely c3868c8f8d .gitignore: Ignore amdgcn-mesa object directory
llvm-svn: 296164
2017-02-24 20:32:18 +00:00
Yaxun Liu e6d1ce59c0 [InstCombine] Fix bug in pointer replacement
This optimisation was crashing when there was a chain of more than one bitcast
instruction to replace, as a result of the changes in D27283.

Patch by James Price.

Differential Revision: https://reviews.llvm.org/D30347

llvm-svn: 296163
2017-02-24 20:27:25 +00:00
Rui Ueyama 9cc84384ad Use uint64_t instead of uintX_t where the larger type just works.
llvm-svn: 296162
2017-02-24 19:52:52 +00:00
Nico Weber 004d5245c0 clang-format: Enable include sorting for style=Chromium
llvm-svn: 296161
2017-02-24 19:13:59 +00:00