Evgeniy Stepanov [Fri, 11 Nov 2016 21:39:35 +0000 (21:39 +0000)]
[cfi] Test case for weak symbol handling.
llvm-svn: 286637
Evgeniy Stepanov [Fri, 11 Nov 2016 21:39:26 +0000 (21:39 +0000)]
[cfi] Fix weak functions handling.
When a function pointer is replaced with a jumptable pointer, special
case is needed to preserve the semantics of extern_weak functions.
Since a jumptable entry can not be extern_weak, we emulate that
behaviour by replacing all references to F (the extern_weak function)
with the following expression: F != nullptr ? JumpTablePtr : nullptr.
Extra special care is needed for global initializers, since most (or
probably all) backends can not lower an initializer that includes
this kind of constant expression. Initializers like that are replaced
with a global constructor (i.e. a runtime initializer).
llvm-svn: 286636
Rafael Espindola [Fri, 11 Nov 2016 21:36:25 +0000 (21:36 +0000)]
Avoid a crash with -r and .comment.
We would create a MergeInputSection for the synthetic .comment and
crash trying to add it to a regular output section.
With this we just don't add the synthetic section with -r. That is
consistent with gold that doesn't create .note.gnu.gold-version with
-r.
llvm-svn: 286635
Tom Stellard [Fri, 11 Nov 2016 21:34:47 +0000 (21:34 +0000)]
Fix build since llvm r286566 and require at least llvm 4.0
llvm-svn: 286634
Devin Coughlin [Fri, 11 Nov 2016 21:31:38 +0000 (21:31 +0000)]
[analyzer] Teach RetainCountChecker about VTCompressionSessionEncodeFrame()
The context argument passed to VideoToolbox's
VTCompressionSessionEncodeFrame() function is ultimately passed to a callback
supplied when creating the compression session and so may be freed by that
callback. To suppress false positives in this case, teach the retain count
checker to stop tracking that argument.
This isn't suppressed by the usual callback context mechanism because the call
to VTCompressionSessionEncodeFrame() doesn't include the callback itself.
rdar://problem/
27685213
llvm-svn: 286633
Erik Eckstein [Fri, 11 Nov 2016 21:15:13 +0000 (21:15 +0000)]
Make the FunctionComparator of the MergeFunctions pass a stand-alone utility.
This is pure refactoring. NFC.
This change moves the FunctionComparator (together with the GlobalNumberState
utility) in to a separate file so that it can be used by other passes.
For example, the SwiftMergeFunctions pass in the Swift compiler:
https://github.com/apple/swift/blob/master/lib/LLVMPasses/LLVMMergeFunctions.cpp
Details of the change:
*) The big part is just moving code out of MergeFunctions.cpp into FunctionComparator.h/cpp
*) Make FunctionComparator member functions protected (instead of private)
so that a derived comparator class can use them.
Following refactoring helps to share code between the base FunctionComparator
class and a derived class:
*) Add a beginCompare() function
*) Move some basic function property comparisons into a separate function compareSignature()
*) Do the GEP comparison inside cmpOperations() which now has a new
needToCmpOperands reference parameter
https://reviews.llvm.org/D25385
llvm-svn: 286632
Todd Fiala [Fri, 11 Nov 2016 21:06:40 +0000 (21:06 +0000)]
Remove weak-linked symbols for SBBreakpointListImpl
Summary:
Similar to SBStructuredData's Impl class, SBBreakpointListImpl was
getting weak-link exported in the lldb namespace. This change list fixes
that by moving out of the lldb public namespace, which removes it from
public export visibility.
Fixes:
rdar://
28960344
Reviewers: jingham
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D26553
llvm-svn: 286631
Richard Trieu [Fri, 11 Nov 2016 20:51:04 +0000 (20:51 +0000)]
When a DecompositionDecl is marked invalid, also set the child BindingDecl's to
invalid.
llvm-svn: 286630
Rui Ueyama [Fri, 11 Nov 2016 20:39:02 +0000 (20:39 +0000)]
Fix -Wpessimizing-move warning.
llvm-svn: 286629
Artem Dergachev [Fri, 11 Nov 2016 20:29:59 +0000 (20:29 +0000)]
[ASTMatchers] Fix a typo in cStyleCastExpr() docs. NFC.
llvm-svn: 286628
Nemanja Ivanovic [Fri, 11 Nov 2016 19:56:17 +0000 (19:56 +0000)]
[PowerPC] Add vector conversion builtins to altivec.h - clang portion
This patch corresponds to review:
https://reviews.llvm.org/D26308
It adds a number of vector type conversion builtins to altivec.h.
llvm-svn: 286627
Vyacheslav Klochkov [Fri, 11 Nov 2016 19:55:29 +0000 (19:55 +0000)]
Fixed the lost FastMathFlags for FCmp operations in SLPVectorizer.
Reviewer: Michael Zolotukhin.
Differential Revision: https://reviews.llvm.org/D26543
llvm-svn: 286626
Chad Rosier [Fri, 11 Nov 2016 19:52:45 +0000 (19:52 +0000)]
[AArch64] Update a FIXME comment to reflect current state. NFC.
llvm-svn: 286625
Peter Collingbourne [Fri, 11 Nov 2016 19:50:39 +0000 (19:50 +0000)]
Bitcode: Change getModuleSummaryIndex() to return an llvm::Expected.
Differential Revision: https://reviews.llvm.org/D26539
llvm-svn: 286624
Peter Collingbourne [Fri, 11 Nov 2016 19:50:24 +0000 (19:50 +0000)]
Bitcode: Clean up error handling for certain bitcode query functions.
The functions getBitcodeTargetTriple(), isBitcodeContainingObjCCategory(),
getBitcodeProducerString() and hasGlobalValueSummary() now return errors
via their return value rather than via the diagnostic handler.
To make this work, re-implement these functions using non-member functions
so that they can be used without the LLVMContext required by BitcodeReader.
Differential Revision: https://reviews.llvm.org/D26532
llvm-svn: 286623
Peter Collingbourne [Fri, 11 Nov 2016 19:50:10 +0000 (19:50 +0000)]
Bitcode: Prepare to move bitcode readers to free functions.
Make initStream() a free function, and change BitcodeReaderBase ctor to take
a BitstreamCursor.
llvm-svn: 286622
Lang Hames [Fri, 11 Nov 2016 19:46:46 +0000 (19:46 +0000)]
[ORC] Revert r286620 while I investigate a bot failure.
llvm-svn: 286621
Lang Hames [Fri, 11 Nov 2016 19:42:44 +0000 (19:42 +0000)]
[ORC] Refactor the ORC RPC utilities to add some new features.
(1) Add support for function key negotiation.
The previous version of the RPC required both sides to maintain the same
enumeration for functions in the API. This means that any version skew between
the client and server would result in communication failure.
With this version of the patch functions (and serializable types) are defined
with string names, and the derived function signature strings are used to
negotiate the actual function keys (which are used for efficient call
serialization). This allows clients to connect to any server that supports a
superset of the API (based on the function signatures it supports).
(2) Add a callAsync primitive.
The callAsync primitive can be used to install a return value handler that will
run as soon as the RPC function's return value is sent back from the remote.
(3) Launch policies for RPC function handlers.
The new addHandler method, which installs handlers for RPC functions, takes two
arguments: (1) the handler itself, and (2) an optional "launch policy". When the
RPC function is called, the launch policy (if present) is invoked to actually
launch the handler. This allows the handler to be spawned on a background
thread, or added to a work list. If no launch policy is used, the handler is run
on the server thread itself. This should only be used for short-running
handlers, or entirely synchronous RPC APIs.
(4) Zero cost cross type serialization.
You can now define serialization from any type to a different "wire" type. For
example, this allows you to call an RPC function that's defined to take a
std::string while passing a StringRef argument. If a serializer from StringRef
to std::string has been defined for the channel type this will be used to
serialize the argument without having to construct a std::string instance.
This allows buffer reference types to be used as arguments to RPC calls without
requiring a copy of the buffer to be made.
llvm-svn: 286620
Sanjay Patel [Fri, 11 Nov 2016 19:37:54 +0000 (19:37 +0000)]
[InstCombine] add tests to show size-increasing select transforms
llvm-svn: 286619
Reid Kleckner [Fri, 11 Nov 2016 19:27:52 +0000 (19:27 +0000)]
Add a test that uses coverage and printf from a DLL
This test fails without LLVM r286615
llvm-svn: 286618
Chad Rosier [Fri, 11 Nov 2016 19:25:48 +0000 (19:25 +0000)]
[AArch64] Add test to show narrow zero store merging is disabled with strict align. NFC.
llvm-svn: 286617
Geoff Berry [Fri, 11 Nov 2016 19:25:20 +0000 (19:25 +0000)]
[AArch64] Fix bugs in isel lowering replaceSplatVectorStore.
Summary:
Fix off-by-one indexing error in loop checking that inserted value was a
splat vector.
Add code to check that INSERT_VECTOR_ELT nodes constructing the splat
vector have the expected constant index values.
Reviewers: t.p.northover, jmolloy, mcrosier
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: https://reviews.llvm.org/D26409
llvm-svn: 286616
Reid Kleckner [Fri, 11 Nov 2016 19:18:45 +0000 (19:18 +0000)]
[sancov] Don't instrument MSVC CRT stdio config helpers
They get called before initialization, which is a problem for winasan.
Test coming in compiler-rt.
llvm-svn: 286615
Petr Hosek [Fri, 11 Nov 2016 19:12:58 +0000 (19:12 +0000)]
[CMake] Check runtimes subdir when looking for libcxx and libuwind
The runtimes subdir is the new location for runtimes, we should
include it when looking for libcxx and libunwind headers.
Differential Revision: https://reviews.llvm.org/D26362
llvm-svn: 286614
Evgeniy Stepanov [Fri, 11 Nov 2016 18:49:49 +0000 (18:49 +0000)]
[cfi] Enable cfi-icall on ARM and AArch64.
llvm-svn: 286613
Evgeniy Stepanov [Fri, 11 Nov 2016 18:49:15 +0000 (18:49 +0000)]
[cfi] Tweak a test for the cfi-icall change.
llvm-svn: 286612
Evgeniy Stepanov [Fri, 11 Nov 2016 18:49:09 +0000 (18:49 +0000)]
[cfi] Implement cfi-icall using inline assembly.
The current implementation is emitting a global constant that happens
to evaluate to the same bytes + relocation as a jump instruction on
X86. This does not work for PIE executables and shared libraries
though, because we end up with a wrong relocation type. And it has no
chance of working on ARM/AArch64 which use different relocation types
for jump instructions (R_ARM_JUMP24) that is never generated for
data.
This change replaces the constant with module-level inline assembly
followed by a hidden declaration of the jump table. Works fine for
ARM/AArch64, but has some drawbacks.
* Extra symbols are added to the static symbol table, which inflate
the size of the unstripped binary a little. Stripped binaries are not
affected. This happens because jump table declarations must be
external (because their body is in the inline asm).
* Original functions that were anonymous are now named
<original name>.cfi, and it affects symbolization sometimes. This is
necessary because the only user of these functions is the (inline
asm) jump table, so they had to be added to @llvm.used, which does
not allow unnamed functions.
llvm-svn: 286611
Adrian Prantl [Fri, 11 Nov 2016 18:22:51 +0000 (18:22 +0000)]
Fix comments according to the LLVM coding guidelines.
llvm-svn: 286610
Reid Kleckner [Fri, 11 Nov 2016 18:11:33 +0000 (18:11 +0000)]
Add missing %run to test to fix AArch64 buildbot
llvm-svn: 286609
Reid Kleckner [Fri, 11 Nov 2016 17:51:51 +0000 (17:51 +0000)]
[asan/win] Fix wrong TerminateProcess exit code
Add a test for it.
llvm-svn: 286608
Adrian Prantl [Fri, 11 Nov 2016 17:50:09 +0000 (17:50 +0000)]
Revert "Use private linkage for MergedGlobals variables" on Darwin.
This is a partial revert of r244615 (http://reviews.llvm.org/D11942),
which caused a major regression in debug info quality.
Turning the artificial __MergedGlobal symbols into private symbols
(l__MergedGlobal) means that the linker will not include them in the
symbol table of the final executable. Without a symbol table entry
dsymutil is not be able to process the debug info for any of the
merged globals and thus drops the debug info for all of them.
This patch is enabling the old behavior for all MachO targets while
leaving all other targets unaffected.
rdar://problem/
29160481
https://reviews.llvm.org/D26531
llvm-svn: 286607
Chad Rosier [Fri, 11 Nov 2016 17:49:34 +0000 (17:49 +0000)]
[AArch64] Remove lots of redundant code. NFC.
llvm-svn: 286606
Sylvestre Ledru [Fri, 11 Nov 2016 17:46:51 +0000 (17:46 +0000)]
Force the locale when executing ld gold
Summary:
If run with other locales (like French),
the decode operation might fail
This is the same change as in r246421 for llvm.
llvm-svn: 286605
Sanjay Patel [Fri, 11 Nov 2016 17:42:16 +0000 (17:42 +0000)]
[InstCombine] fix formatting of FoldOpIntoSelect(); NFCI
llvm-svn: 286604
Greg Clayton [Fri, 11 Nov 2016 17:38:14 +0000 (17:38 +0000)]
Fixed issues found by Paul Robinson with my patch for:
https://reviews.llvm.org/D26526
- Fixed DW_FORM_strp to be correctly sized and extracted for DWARF64
- Added some missing strp variants as well
- Fixed comment typo
llvm-svn: 286603
Sylvestre Ledru [Fri, 11 Nov 2016 17:29:56 +0000 (17:29 +0000)]
Add a new optimization option -Og
Summary:
Just like gcc, we should have the -Og option as more and more software are using it:
https://llvm.org/bugs/show_bug.cgi?id=20765
Reviewers: echristo, dberlin, dblaikie, keith.walker.arm, rengolin
Subscribers: aprantl, friss, mehdi_amini, RKSimon, probinson, majnemer, cfe-commits
Differential Revision: https://reviews.llvm.org/D24998
llvm-svn: 286602
Chad Rosier [Fri, 11 Nov 2016 17:07:37 +0000 (17:07 +0000)]
[AArch64] Early return and minor renaming/refactoring to ease code review. NFC.
llvm-svn: 286601
Greg Clayton [Fri, 11 Nov 2016 16:55:31 +0000 (16:55 +0000)]
Fix windows buildbot where warnings are errors. We had a switch statement where all enumerations were handled, but some compilers don't recognize this. Simplify the logic so that all compilers will know a return value is returned in all cases.
llvm-svn: 286600
Douglas Katzman [Fri, 11 Nov 2016 16:51:40 +0000 (16:51 +0000)]
Fix mismatched enum value name and diagnostic text.
ExpectedFunctionGlobalVarMethodOrProperty
would previously say "functions and global variables"
instead of "functions, methods, properties, and global variables"
The newly added ExpectedFunctionOrGlobalVariable
says "functions and global variables"
Differential Revision: https://reviews.llvm.org/D26459
llvm-svn: 286599
Greg Clayton [Fri, 11 Nov 2016 16:23:47 +0000 (16:23 +0000)]
Fix code to deal with recent LLVM changes.
https://reviews.llvm.org/D26526
llvm-svn: 286598
Greg Clayton [Fri, 11 Nov 2016 16:21:37 +0000 (16:21 +0000)]
Clean up DWARFFormValue by reducing duplicated code and removing DWARFFormValue::getFixedFormSizes()
In preparation for a follow on patch that improves DWARF parsing speed, clean up DWARFFormValue so that we have can get the fixed byte size of a form value given a DWARFUnit or given the version, address byte size and dwarf32/64.
This patch cleans up code so that everyone is using one of the new DWARFFormValue functions:
static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, const DWARFUnit *U = nullptr);
static Optional<uint8_t> DWARFFormValue::getFixedByteSize(dwarf::Form Form, uint16_t Version, uint8_t AddrSize, bool Dwarf32);
This patch changes DWARFFormValue::skipValue() to rely on the output of DWARFFormValue::getFixedByteSize(...) instead of duplicating the code in each function. This will reduce the number of changes we need to make to DWARF to fewer places in DWARFFormValue when we add support for new form.
This patch also starts to support DWARF64 so that we can get correct byte sizes for forms that vary according the DWARF 32/64.
To reduce the code duplication a new FormSizeHelper pure virtual class was created that can be created as a FormSizeHelperDWARFUnit when you have a DWARFUnit, or FormSizeHelperManual where you manually specify the DWARF version, address byte size and DWARF32/DWARF64. There is now a single implementation of a function that gets the fixed byte size (instead of two where one took a DWARFUnit and one took the DWARF version, address byte size and DWARFFormat enum) and one function to skip the form values.
https://reviews.llvm.org/D26526
llvm-svn: 286597
Nemanja Ivanovic [Fri, 11 Nov 2016 14:41:19 +0000 (14:41 +0000)]
[PowerPC] Add vector conversion builtins to altivec.h - LLVM portion
This patch corresponds to review:
https://reviews.llvm.org/D26307
Adds all the intrinsics used for various conversion builtins that will
be added to altivec.h. These are type conversions between various types of
vectors.
llvm-svn: 286596
Simon Pilgrim [Fri, 11 Nov 2016 14:38:34 +0000 (14:38 +0000)]
[X86] Merge (near) duplicate scalar non-temporal store code. NFCI.
llvm-svn: 286595
NAKAMURA Takumi [Fri, 11 Nov 2016 14:17:37 +0000 (14:17 +0000)]
llvm-strings: Fix r286556 to add required libraries.
llvm-svn: 286594
John Brawn [Fri, 11 Nov 2016 14:12:15 +0000 (14:12 +0000)]
Fix test/tools/gold/X86/thinlto_funcimport.ll on non-X86 hosts
Pass -m elf_x86_64 to gold, as is done in other tests.
llvm-svn: 286593
Chad Rosier [Fri, 11 Nov 2016 14:10:12 +0000 (14:10 +0000)]
[AArch64] Enable merging of adjacent zero stores for all subtargets.
This optimization merges adjacent zero stores into a wider store.
e.g.,
strh wzr, [x0]
strh wzr, [x0, #2]
; becomes
str wzr, [x0]
e.g.,
str wzr, [x0]
str wzr, [x0, #4]
; becomes
str xzr, [x0]
Previously, this was only enabled for Kryo and Cortex-A57.
Differential Revision: https://reviews.llvm.org/D26396
llvm-svn: 286592
Sam Kolton [Fri, 11 Nov 2016 13:41:52 +0000 (13:41 +0000)]
[AMDGPU] TargetStreamer: Fix .note section name
llvm-svn: 286591
Eugene Leviant [Fri, 11 Nov 2016 13:24:49 +0000 (13:24 +0000)]
[ELF] Attempt to fix PPC buildbot
llvm-svn: 286590
George Rimar [Fri, 11 Nov 2016 13:23:13 +0000 (13:23 +0000)]
[ELF] - Use backward slashes inside response files
Patch replaces forward slashes with backward inside response.txt
This is https://llvm.org/bugs/show_bug.cgi?id=30951.
Differential revision: https://reviews.llvm.org/D26443
llvm-svn: 286589
Eugene Leviant [Fri, 11 Nov 2016 13:03:58 +0000 (13:03 +0000)]
[ELF] Set 'Live = true' in SyntheticSection ctor. NFC.
llvm-svn: 286588
Ulrich Weigand [Fri, 11 Nov 2016 12:48:26 +0000 (12:48 +0000)]
[SystemZ] Support CL(G)T instructions
This adds support for the compare logical and trap (memory)
instructions that were added as part of the miscellaneous
instruction extensions feature with zEC12.
llvm-svn: 286587
Ulrich Weigand [Fri, 11 Nov 2016 12:46:28 +0000 (12:46 +0000)]
[SystemZ] Support load-and-zero-rightmost-byte facility
This adds support for the LZRF/LZRG/LLZRGF instructions that were
added on z13, and uses them for code generation were appropriate.
SystemZDAGToDAGISel::tryRISBGZero is updated again to prefer LLZRGF
over RISBG where both would be possible.
llvm-svn: 286586
Ulrich Weigand [Fri, 11 Nov 2016 12:43:51 +0000 (12:43 +0000)]
[SystemZ] Use LLGT(R) instructions
This adds support for the 31-to-64-bit zero extension instructions
LLGT and LLGTR and uses them for code generation where appropriate.
Since this operation can also be performed via RISBG, we have to
update SystemZDAGToDAGISel::tryRISBGZero so that we prefer LLGT
over RISBG in case both are possible. The patch includes some
simplification to the tryRISBGZero code; this is not intended
to cause any (further) functional change in codegen.
llvm-svn: 286585
Alexey Bataev [Fri, 11 Nov 2016 12:36:20 +0000 (12:36 +0000)]
Fix for PR28523: unexpected compilation error.
Clang emits error message for the following code:
```
template <class F> void parallel_loop(F &&f) { f(0); }
int main() {
int x;
parallel_loop([&](auto y) {
{
x = y;
};
});
}
```
$ clang++ --std=gnu++14 clang_test.cc -o clang_test
clang_test.cc:9:7: error: reference to local variable 'x' declared in enclosing function 'main'
x = y;
^
clang_test.cc:2:48: note: in instantiation of function template specialization 'main()::(anonymous class)::operator()<int>' requested here
template <class F> void parallel_loop(F &&f) { f(0); }
^
clang_test.cc:6:3: note: in instantiation of function template specialization 'parallel_loop<(lambda at clang_test.cc:6:17)>' requested here parallel_loop([&](auto y) {
^
clang_test.cc:5:7: note: 'x' declared here
int x;
^
1 error generated.
Patch fixes this issue.
llvm-svn: 286584
Sagar Thakur [Fri, 11 Nov 2016 12:05:30 +0000 (12:05 +0000)]
[MSAN][MIPS] Fix test Linux/syscalls_sigaction.cc on mips64
Changed the kernel sigaction structure in test syscalls_sigaction.cc for MIPS according to the structure defined in kernel.
Reviewed by eugenis.
Differential: https://reviews.llvm.org/D25814
llvm-svn: 286583
Simon Pilgrim [Fri, 11 Nov 2016 11:51:29 +0000 (11:51 +0000)]
[SelectionDAG] Add support for vector demandedelts in BSWAP opcodes
llvm-svn: 286582
Tamas Berghammer [Fri, 11 Nov 2016 11:39:23 +0000 (11:39 +0000)]
Fix TestHelp on linux after version number syntax change
llvm-svn: 286581
Eugene Leviant [Fri, 11 Nov 2016 11:33:32 +0000 (11:33 +0000)]
[ELF] Convert .got section to input section
Differential revision: https://reviews.llvm.org/D26498
llvm-svn: 286580
Simon Pilgrim [Fri, 11 Nov 2016 11:33:21 +0000 (11:33 +0000)]
[X86] Add knownbits vector BSWAP test
In preparation for demandedelts support
llvm-svn: 286579
Simon Pilgrim [Fri, 11 Nov 2016 11:23:43 +0000 (11:23 +0000)]
[SelectionDAG] Add support for vector demandedelts in UREM/SREM opcodes
llvm-svn: 286578
Simon Pilgrim [Fri, 11 Nov 2016 11:11:40 +0000 (11:11 +0000)]
[X86] Add knownbits vector UREM/SREM tests
In preparation for demandedelts support
llvm-svn: 286577
Simon Pilgrim [Fri, 11 Nov 2016 10:47:24 +0000 (10:47 +0000)]
[SelectionDAG] Add support for vector demandedelts in UDIV opcodes
llvm-svn: 286576
Simon Pilgrim [Fri, 11 Nov 2016 10:39:15 +0000 (10:39 +0000)]
[X86] Add knownbits vector UDIV test
In preparation for demandedelts support
llvm-svn: 286575
Omair Javaid [Fri, 11 Nov 2016 10:00:53 +0000 (10:00 +0000)]
Mark xfail TestNamespaceDefinitions for arm/aarch64 targets
Fails with all versions of arm/aarch64 gcc available on ubuntu 16.04/14.04.
Passes with Linaro GCC version >= 4.8 but fails with >= 5.0. But There are other regressions when we use Linaro GCC.
llvm-svn: 286574
Diana Picus [Fri, 11 Nov 2016 08:27:37 +0000 (08:27 +0000)]
[ARM] Add plumbing for GlobalISel
Add GlobalISel skeleton, up to the point where we can select a ret void.
llvm-svn: 286573
Adam Nemet [Fri, 11 Nov 2016 06:11:56 +0000 (06:11 +0000)]
[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
Mehdi Amini [Fri, 11 Nov 2016 06:04:30 +0000 (06:04 +0000)]
Fix gold plugin after Error API changes
llvm-svn: 286571
Teresa Johnson [Fri, 11 Nov 2016 06:02:04 +0000 (06:02 +0000)]
Fix examples files to reflect header split in r286566.
I missed these files in examples/
llvm-svn: 286570
Teresa Johnson [Fri, 11 Nov 2016 05:46:30 +0000 (05:46 +0000)]
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
Teresa Johnson [Fri, 11 Nov 2016 05:35:22 +0000 (05:35 +0000)]
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
Teresa Johnson [Fri, 11 Nov 2016 05:35:12 +0000 (05:35 +0000)]
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
Teresa Johnson [Fri, 11 Nov 2016 05:34:58 +0000 (05:34 +0000)]
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
Mehdi Amini [Fri, 11 Nov 2016 05:07:57 +0000 (05:07 +0000)]
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
Mandeep Singh Grang [Fri, 11 Nov 2016 04:51:27 +0000 (04:51 +0000)]
[opt-viewer] PEPify opt-viewer.py
Reviewers: anemet
Subscribers: fhahn
Differential Revision: https://reviews.llvm.org/D26535
llvm-svn: 286564
Mehdi Amini [Fri, 11 Nov 2016 04:50:18 +0000 (04:50 +0000)]
Fix build failure, update llvm-strings for the new Error API
llvm-svn: 286563
Mehdi Amini [Fri, 11 Nov 2016 04:29:25 +0000 (04:29 +0000)]
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
Mehdi Amini [Fri, 11 Nov 2016 04:28:40 +0000 (04:28 +0000)]
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
Mehdi Amini [Fri, 11 Nov 2016 04:27:59 +0000 (04:27 +0000)]
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
Davide Italiano [Fri, 11 Nov 2016 04:03:29 +0000 (04:03 +0000)]
[ADT/MathExtras] Make buildbot happy again.
llvm-svn: 286559
Saleem Abdulrasool [Fri, 11 Nov 2016 04:00:59 +0000 (04:00 +0000)]
llvm-strings: explicitly include cctype
Include the cctype header to try to fix windows bots.
llvm-svn: 286558
Rui Ueyama [Fri, 11 Nov 2016 03:54:59 +0000 (03:54 +0000)]
Remove a member from InputSectionData and use the pool instead.
llvm-svn: 286557
Saleem Abdulrasool [Fri, 11 Nov 2016 03:44:12 +0000 (03:44 +0000)]
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
Davide Italiano [Fri, 11 Nov 2016 03:07:45 +0000 (03:07 +0000)]
[lli] Simplify the code a bit. No functional change intended.
llvm-svn: 286555
Davide Italiano [Fri, 11 Nov 2016 03:00:00 +0000 (03:00 +0000)]
[IR/DataLayout] Simplify the code using PowerOf2Ceil. NFCI.
llvm-svn: 286554
Davide Italiano [Fri, 11 Nov 2016 02:53:48 +0000 (02:53 +0000)]
[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
Yaxun Liu [Fri, 11 Nov 2016 02:48:50 +0000 (02:48 +0000)]
AMDGPU: Attempt to fix build failure on x86-64 selfhost build
Remove redundant include file.
llvm-svn: 286552
Davide Italiano [Fri, 11 Nov 2016 02:38:24 +0000 (02:38 +0000)]
[ADT/MathExtras] Add tests for PowerOf2Floor (previously untested).
llvm-svn: 286551
Sean Fertile [Fri, 11 Nov 2016 02:33:17 +0000 (02:33 +0000)]
Add a blank line for a test commit.
llvm-svn: 286550
Davide Italiano [Fri, 11 Nov 2016 02:22:16 +0000 (02:22 +0000)]
[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
Rui Ueyama [Fri, 11 Nov 2016 02:16:15 +0000 (02:16 +0000)]
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
Rui Ueyama [Fri, 11 Nov 2016 02:09:28 +0000 (02:09 +0000)]
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
Mandeep Singh Grang [Fri, 11 Nov 2016 02:01:32 +0000 (02:01 +0000)]
[llvm] Remove duplicate header from PassInfo.h
Reviewers: mehdi_amini
Differential Revision: https://reviews.llvm.org/D26533
llvm-svn: 286546
Adam Nemet [Fri, 11 Nov 2016 01:51:34 +0000 (01:51 +0000)]
[opt-viewer] Add column number support
With this the yellow (bubble) part of the remark shows up under the
corresponding expression.
llvm-svn: 286545
Matthias Braun [Fri, 11 Nov 2016 01:34:21 +0000 (01:34 +0000)]
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
Stephen Hines [Fri, 11 Nov 2016 01:29:39 +0000 (01:29 +0000)]
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
Jordan Rose [Fri, 11 Nov 2016 01:29:18 +0000 (01:29 +0000)]
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
Jordan Rose [Fri, 11 Nov 2016 01:29:15 +0000 (01:29 +0000)]
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
Adam Nemet [Fri, 11 Nov 2016 01:25:04 +0000 (01:25 +0000)]
[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
Adam Nemet [Fri, 11 Nov 2016 01:08:02 +0000 (01:08 +0000)]
[opt-viewer] Add option to set source directory
llvm-svn: 286536
Adam Nemet [Fri, 11 Nov 2016 01:08:00 +0000 (01:08 +0000)]
[opt-viewer] Mention Pygments in the description
llvm-svn: 286535