Commit Graph

247275 Commits

Author SHA1 Message Date
Adam Nemet a6adab268d [opt-viewer] Make it work in the absence of hotness information
In this case the index page is sorted by the source location.

llvm-svn: 286572
2016-11-11 06:11:56 +00:00
Mehdi Amini 48f296059d Fix gold plugin after Error API changes
llvm-svn: 286571
2016-11-11 06:04:30 +00:00
Teresa Johnson 5923864597 Fix examples files to reflect header split in r286566.
I missed these files in examples/

llvm-svn: 286570
2016-11-11 06:02:04 +00:00
Teresa Johnson e5de162e09 Add missing file from r286566
Add the new BitcodeWriter.h header, which was missed in my r286566
commit, and should fix all the bot failures.

llvm-svn: 286569
2016-11-11 05:46:30 +00:00
Teresa Johnson 1e390897ba Mirror the llvm changes that split Bitcode/ReaderWriter.h
The change in D26502 splits ReaderWriter.h, which contains the APIs
into both the BitReader and BitWriter libraries, into BitcodeReader.h
and BitcodeWriter.h.

Change lld uses to the appropriate split header, removing it
completely in one case where it wasn't needed.

llvm-svn: 286568
2016-11-11 05:35:22 +00:00
Teresa Johnson ffc4e2420f Mirror the llvm changes that split Bitcode/ReaderWriter.h
The change in D26502 splits ReaderWriter.h, which contains the APIs
into both the BitReader and BitWriter libraries, into BitcodeReader.h
and BitcodeWriter.h.

Change clang uses to the appropriate split header(s).

llvm-svn: 286567
2016-11-11 05:35:12 +00:00
Teresa Johnson ad17679abd Split Bitcode/ReaderWriter.h into separate reader and writer headers
Summary:
Split ReaderWriter.h which contains the APIs into both the BitReader and
BitWriter libraries into BitcodeReader.h and BitcodeWriter.h.

This is to address Chandler's concern about sharing the same API header
between multiple libraries (BitReader and BitWriter). That concern is
why we create a single bitcode library in our downstream build of clang,
which led to r286297 being reverted as it added a dependency that
created a cycle only when there is a single bitcode library (not two as
in upstream).

Reviewers: mehdi_amini

Subscribers: dlj, mehdi_amini, llvm-commits

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

llvm-svn: 286566
2016-11-11 05:34:58 +00:00
Mehdi Amini 665be50e37 Revert unwanted changes in lldb when updating llvm::Error()
My script updated lldb::Errors, and I failed to fix it entirely
before pushing. This restore everything in lldb as it was before
r286561.

llvm-svn: 286565
2016-11-11 05:07:57 +00:00
Mandeep Singh Grang e25e6da917 [opt-viewer] PEPify opt-viewer.py
Reviewers: anemet

Subscribers: fhahn

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

llvm-svn: 286564
2016-11-11 04:51:27 +00:00
Mehdi Amini 2aad046165 Fix build failure, update llvm-strings for the new Error API
llvm-svn: 286563
2016-11-11 04:50:18 +00:00
Mehdi Amini c1edf566b9 Prevent at compile time converting from Error::success() to Expected<T>
This would trigger an assertion at runtime otherwise.

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

llvm-svn: 286562
2016-11-11 04:29:25 +00:00
Mehdi Amini 41af43092c Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority
of cases a lot more readable.

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

llvm-svn: 286561
2016-11-11 04:28:40 +00:00
Mehdi Amini e8e98dcb74 CMake: make LLVM_OPTIMIZED_TABLEGEN friendly with LLVM_EXTERNAL_CLANG_SOURCE_DIR
This is need because of clang-tblgen

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

llvm-svn: 286560
2016-11-11 04:27:59 +00:00
Davide Italiano 0970ddb242 [ADT/MathExtras] Make buildbot happy again.
llvm-svn: 286559
2016-11-11 04:03:29 +00:00
Saleem Abdulrasool 2dcea63b4d llvm-strings: explicitly include cctype
Include the cctype header to try to fix windows bots.

llvm-svn: 286558
2016-11-11 04:00:59 +00:00
Rui Ueyama 82664d9d4c Remove a member from InputSectionData and use the pool instead.
llvm-svn: 286557
2016-11-11 03:54:59 +00:00
Saleem Abdulrasool 030ff0f215 llvm-strings: introduce basic strings tool
This is a replacement to binutils' string tool.  It prints strings found in a
binary (object file, executable, or archive library).  It is rather bare and
not functionally equivalent, however, it lays the groundwork necessary for the
strings tool, enabling iterative development of features to reach feature
parity.

llvm-svn: 286556
2016-11-11 03:44:12 +00:00
Davide Italiano 03a856807c [lli] Simplify the code a bit. No functional change intended.
llvm-svn: 286555
2016-11-11 03:07:45 +00:00
Davide Italiano 5e327343f1 [IR/DataLayout] Simplify the code using PowerOf2Ceil. NFCI.
llvm-svn: 286554
2016-11-11 03:00:00 +00:00
Davide Italiano c520e18ce0 [lld/COFF] Don't round alignment if it's already a power-of-two.
This matches link.exe behaviour.

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

llvm-svn: 286553
2016-11-11 02:53:48 +00:00
Yaxun Liu c5bf4b831d AMDGPU: Attempt to fix build failure on x86-64 selfhost build
Remove redundant include file.

llvm-svn: 286552
2016-11-11 02:48:50 +00:00
Davide Italiano 62ede4e3ac [ADT/MathExtras] Add tests for PowerOf2Floor (previously untested).
llvm-svn: 286551
2016-11-11 02:38:24 +00:00
Sean Fertile e1ca561b0a Add a blank line for a test commit.
llvm-svn: 286550
2016-11-11 02:33:17 +00:00
Davide Italiano 1fb1b9cd00 [ADT/MathExtras] Introduce PowerOf2Ceil.
To be used in lld (and probably somewhere else in llvm).

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

llvm-svn: 286549
2016-11-11 02:22:16 +00:00
Rui Ueyama 169e7c4edc Call flush() after llvm_shutdown().
llvm_shutdown could write something to outs or errs,
so we need to flush them after calling llvm_shutdown.

llvm-svn: 286548
2016-11-11 02:16:15 +00:00
Rui Ueyama 049e045c3a Handle Archive::children's error proerly.
The previous code didn't make sense at all. Now an error condition
is handled with fatal(). Thanks to Mehdi for pointing out the issue.

llvm-svn: 286547
2016-11-11 02:09:28 +00:00
Mandeep Singh Grang 432f3ef887 [llvm] Remove duplicate header from PassInfo.h
Reviewers: mehdi_amini

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

llvm-svn: 286546
2016-11-11 02:01:32 +00:00
Adam Nemet 8e232cacae [opt-viewer] Add column number support
With this the yellow (bubble) part of the remark shows up under the
corresponding expression.

llvm-svn: 286545
2016-11-11 01:51:34 +00:00
Matthias Braun 325cd2c98a ScheduleDAGInstrs: Add condjump deps to addSchedBarrierDeps()
addSchedBarrierDeps() is supposed to add use operands to the ExitSU
node. The current implementation adds uses for calls/barrier instruction
and the MBB live-outs in all other cases. The use
operands of conditional jump instructions were missed.

Also added code to macrofusion to set the latencies between nodes to
zero to avoid problems with the fusing nodes lingering around in the
pending list now.

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

llvm-svn: 286544
2016-11-11 01:34:21 +00:00
Stephen Hines a89d8ff0ad Define __ANDROID_API__ when specified as part of an Android target.
Summary:
This macro should be defined only when the user directly specifies an
API level as part of an Android target. For any regular Android target,
we leave this macro undefined.

Bug: https://llvm.org/bugs/show_bug.cgi?id=30940

Reviewers: eugenis, pirama

Subscribers: tberghammer, cfe-commits, pirama, eugenis, danalbert

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

llvm-svn: 286543
2016-11-11 01:29:39 +00:00
Jordan Rose bd1ee4830d Don't require nullability on 'va_list', even when it's a pointer.
Take 3! This should finally fix the Hexagon, PPC, and Windows bots.

rdar://problem/25846421

llvm-svn: 286542
2016-11-11 01:29:18 +00:00
Jordan Rose 9f10af2aa2 Revert "Speculative fix for va_list/nullability test on Hexagon and PPC."
This reverts commit r286533. At this point an array really is still an
array, but the problem is with /non-/array va_lists anyway.

llvm-svn: 286541
2016-11-11 01:29:15 +00:00
Adam Nemet 5bf012baba [opt-viewer] Display inlining context
When a function is inlined, each instance is optimized in their own
inlining context.  This can produce different remarks all pointing to
the same source line.

This adds a new column on the source view to display the inlining
context.

llvm-svn: 286537
2016-11-11 01:25:04 +00:00
Adam Nemet 01823ea2de [opt-viewer] Add option to set source directory
llvm-svn: 286536
2016-11-11 01:08:02 +00:00
Adam Nemet 8efa090661 [opt-viewer] Mention Pygments in the description
llvm-svn: 286535
2016-11-11 01:08:00 +00:00
Richard Smith a271686ce2 PR30937: don't devirtualize if we find that the callee is a pure virtual
function. In that case, there is no requirement that the callee is actually
defined, and the code may in fact be valid and have defined behavior if the
virtual call is unreachable.

llvm-svn: 286534
2016-11-11 01:01:31 +00:00
Jordan Rose b07c0d7085 Speculative fix for va_list/nullability test on Hexagon and PPC.
PowerPC's va_list, at least, is a typedef for an array, which means it
decays to a pointer in parameter position. Since the decayed type is
built from the array element type, the typedef sugar is lost.

More rdar://problem/25846421.

llvm-svn: 286533
2016-11-11 00:55:14 +00:00
Adam Nemet ad94840df3 [opt-viewer] Add syntax highlighting
Uses pygments.

llvm-svn: 286532
2016-11-11 00:51:32 +00:00
Jordan Rose 0f94d97cba Don't require nullability on 'va_list' harder.
Platform headers don't always define 'va_list' in terms of Clang's
'__builtin_va_list', so in addition to checking for our own
synthesized decl, also just look for typedefs literally named
'va_list'. Better to err on the side of false negatives here.

Fix-up for rdar://problem/25846421.

llvm-svn: 286531
2016-11-11 00:23:59 +00:00
Stanislav Mekhanoshin 6fc8a1cdaa Revert "[AMDGPU] Allow hoisting of comparisons out of a loop and eliminate condition copies"
This reverts commit r286171, it breaks piglit test fs-discard-exit-2

llvm-svn: 286530
2016-11-11 00:22:34 +00:00
Davide Italiano b69f38f7a7 [ELF] Remove extra semicolon to placate GCC. NFCI.
llvm-svn: 286529
2016-11-11 00:05:41 +00:00
Chris Bieneman 1c9da8bc55 [CMake] Fixing CMake to append source properties instead of overwrite them.
This is a small fix to the version output.

llvm-svn: 286528
2016-11-10 23:56:32 +00:00
Joerg Sonnenberger 618d475c03 Fix requirements.
llvm-svn: 286527
2016-11-10 23:53:45 +00:00
Matthias Braun f29b12dca8 ScheduleDAGInstrs: Ignore dependencies of constant physregs
There is no need to track dependencies for constant physregs, as they
don't change their value no matter in what order you read/write to them.

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

llvm-svn: 286526
2016-11-10 23:46:44 +00:00
Jordan Rose ff82547f98 [Sema] Fix-up for MSVC, which is stricter about template types.
llvm-svn: 286525
2016-11-10 23:41:18 +00:00
Matthias Braun d67fa9dc6a Timer: Remove group-less NamedRegionTimer constructor.
The NamedRegionTimer initializer without a group name puts the Timer
into the "Misc" group and is (nearly) unused. Remove it.

The only user of this constructor appears to be the HexagonGenInsert pass,
which creates a counter without group to count the complete execution
time of that pass, however since every pass gets a counter by the
PassManager anyway this should be unnecessary. Also removed the
pointless TimerGroup there.

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

llvm-svn: 286524
2016-11-10 23:36:44 +00:00
Evandro Menezes 21f9ce1a0d [DAG Combiner] Fix the native computation of the Newton series for reciprocals
The generic infrastructure to compute the Newton series for reciprocal and
reciprocal square root was conceived to allow a target to compute the series
itself.  However, the original code did not properly consider this condition
if returned by a target.  This patch addresses the issues to allow a target
to compute the series on its own.

Differential revision: https://reviews.llvm.org/D22975

llvm-svn: 286523
2016-11-10 23:31:06 +00:00
Jordan Rose 16d52a2a72 Don't require nullability on 'va_list'.
There are many non-portable typedefs, but va_list is one that nobody
ever thinks of as a pointer or an array. (When's the last time you saw
someone check for a NULL va_list?) Make an exception for this one
special type.

Part of rdar://problem/25846421.

llvm-svn: 286522
2016-11-10 23:28:34 +00:00
Jordan Rose 3b917fe019 Warn when 'assume_nonnull' infers nullability within an array.
...or within a reference. Both of these add an extra level of
indirection that make us less certain that the pointer really was
supposed to be non-nullable. However, changing the default behavior
would be a breaking change, so we'll just make it a warning instead.

Part of rdar://problem/25846421

llvm-svn: 286521
2016-11-10 23:28:30 +00:00
Jordan Rose f85a9b06b8 Add -Wnullability-completeness-on-arrays.
This is an addition to (and sub-warning of) -Wnullability-completeness
that warns when an array parameter is missing nullability. When the
specific warning is switched off, the compiler falls back to only
warning on pointer types written as pointer types.

Note that use of nullability /within/ an array triggers the
completeness checks regardless of whether or not the array-specific
warning is enabled; the intent there is simply to determine whether a
particular header is trying to be nullability-aware at all.

Part of rdar://problem/25846421.

llvm-svn: 286520
2016-11-10 23:28:26 +00:00