Nico Weber [Wed, 20 Apr 2016 23:30:14 +0000 (23:30 +0000)]
unbreak COFF/out.test after r266929
llvm-svn: 266935
Kostya Serebryany [Wed, 20 Apr 2016 23:28:06 +0000 (23:28 +0000)]
[sanitizer] update the sanitizer_allocator_testlib
llvm-svn: 266934
Kevin Enderby [Wed, 20 Apr 2016 23:10:14 +0000 (23:10 +0000)]
Fix another compilation error from r266919 for clang-atom-d525-fedora-rel which
is another place that libObject’s getName() for symbols returns Expected<...>
that needed to be updated.
llvm-svn: 266933
Evgeniy Stepanov [Wed, 20 Apr 2016 22:45:25 +0000 (22:45 +0000)]
[asan] Increase LocatePcInTrace threshold.
Not sure what changed, but on my machine this is literally one byte
short. Only happens when malloc_context_size <= 2 due to the special
case in GET_STACK_TRACE definition (see asan_stack.h):
StackTrace::GetCurrentPc() on the right (context size > 2) branch
returns the address that is 200-something bytes from the return
address it is later matched to, while the same call on the left
branch is 321 bytes away from it.
This fixes the double-free test on my machine.
llvm-svn: 266932
Evgeniy Stepanov [Wed, 20 Apr 2016 22:45:23 +0000 (22:45 +0000)]
[asan] Add __strdup interceptor.
This happens on Linux when building as C (not C++) with optimization.
llvm-svn: 266931
Evgeniy Stepanov [Wed, 20 Apr 2016 22:44:40 +0000 (22:44 +0000)]
Fix compilation error in r266919.
lib/Object/MachOObjectFile.cpp:53:44: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
return malformedError(Obj.getFileName(), std::move(Msg.str()), ECOverride);
llvm-svn: 266930
Nico Weber [Wed, 20 Apr 2016 22:34:15 +0000 (22:34 +0000)]
lld-link: Fix default output name with /dll flag.
If /dll is passed, the default output filename should be foo.dll,
not foo.exe.
http://reviews.llvm.org/D19321
llvm-svn: 266929
Vedant Kumar [Wed, 20 Apr 2016 22:24:01 +0000 (22:24 +0000)]
[test/PGOProfile] Make tests independent of the raw profile version (NFC)
Differential Revision: http://reviews.llvm.org/D19290
llvm-svn: 266928
Saleem Abdulrasool [Wed, 20 Apr 2016 22:18:50 +0000 (22:18 +0000)]
unwind: remove another instance of -Wexpansion-to-defined
Remove the use of undefined behaviour in the c preprocessor by always defining
the value according to the state that was being checked. NFC.
llvm-svn: 266927
Saleem Abdulrasool [Wed, 20 Apr 2016 22:18:47 +0000 (22:18 +0000)]
unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS
Unify the definition of the _LIBUNWIND_SUPPORT_FRAME_APIS macro. This is in
preparation to remove another instance of -Wexpansion-to-defined. NFC.
llvm-svn: 266926
Chaoren Lin [Wed, 20 Apr 2016 22:12:07 +0000 (22:12 +0000)]
[Tooling] Fix getting fully qualified names of template alias types.
Reviewers: rsmith, rnk
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D19253
llvm-svn: 266925
Kate Stone [Wed, 20 Apr 2016 21:59:43 +0000 (21:59 +0000)]
Removed extraneous print() in decorator for enabling module debugging
llvm-svn: 266924
Simon Atanasyan [Wed, 20 Apr 2016 21:57:51 +0000 (21:57 +0000)]
[ELF][MIPS] Treat R_MIPS_TLS_{D}TPREL_HI16/LO16 as relative relocations
These relocations are calculated as S + A - DTPREL or S + A - TPREL,
where DTPREL = TlsVA - 0x8000, TPREL = TlsVA - 0x7000. So the result
is relative to the TLS output section and is not an absolut value
The fix allows to escape creation of unnecessary dynamic relocations
in case of DSO linking.
llvm-svn: 266923
Greg Clayton [Wed, 20 Apr 2016 21:47:56 +0000 (21:47 +0000)]
When making an array or stuct/union/class elements, make sure the type is complete. If the type isn't complete, complete the type so that clang won't assert and kill your program. Since the DWARF assists in doing layout, it won't show the array or struct/unions/class elements correctly, but it will stop you from crashing if you have a struct/union/class that contains one of these arrays.
<rdar://problem/
25057391>
llvm-svn: 266922
Simon Atanasyan [Wed, 20 Apr 2016 21:40:33 +0000 (21:40 +0000)]
[ELF][MIPS] Create GOT entries for R_MIPS_REL32 dynamic relocations
MIPS ABI turns using of GOT and dynamic relocations inside out. While
regular ABI uses dynamic relocations to fill up GOT entries MIPS ABI
requires dynamic linker to fills up GOT entries using specially sorted
dynamic symbol table. This affects even dynamic relocations against
symbols which do not require GOT entries creation explicitly, i.e. do
not have any GOT-relocations. So if a preemptible symbol has a dynamic
relocation we anyway have to create a GOT entry for it.
If a non-preemptible symbol has a dynamic relocation against it, dynamic
linker takes it st_value, adds offset and writes down result of the
dynamic relocation. In case of preemptible symbol dynamic linker
performs symbol resolution, writes the symbol value to the GOT entry and
reads the GOT entry when it needs to perform a dynamic relocation.
Differential Revision: http://reviews.llvm.org/D18948
llvm-svn: 266921
Kevin Enderby [Wed, 20 Apr 2016 21:24:51 +0000 (21:24 +0000)]
Needed change to lld for the change to libObject’s getName() for symbols now returning Expected<...>
With the llvm change in r266919 this is the matching needed change to the lld code
now that libObject’s getName() for symbols now returning Expected<...> .
llvm-svn: 266920
Kevin Enderby [Wed, 20 Apr 2016 21:24:34 +0000 (21:24 +0000)]
Thread Expected<...> up from libObject’s getName() for symbols to allow llvm-objdump to produce a good error message.
Produce another specific error message for a malformed Mach-O file when a symbol’s
string index is past the end of the string table. The existing test case in test/Object/macho-invalid.test
for macho-invalid-symbol-name-past-eof now reports the error with the message indicating
that a symbol at a specific index has a bad sting index and that bad string index value.
Again converting interfaces to Expected<> from ErrorOr<> does involve
touching a number of places. Where the existing code reported the error with a
string message or an error code it was converted to do the same. There is some
code for this that could be factored into a routine but I would like to leave that for
the code owners post-commit to do as they want for handling an llvm::Error. An
example of how this could be done is shown in the diff in
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h which had a Check() routine
already for std::error_code so I added one like it for llvm::Error .
Also there some were bugs in the existing code that did not deal with the
old ErrorOr<> return values. So now with Expected<> since they must be
checked and the error handled, I added a TODO and a comment:
“// TODO: Actually report errors helpfully” and a call something like
consumeError(NameOrErr.takeError()) so the buggy code will not crash
since needed to deal with the Error.
Note there fixes needed to lld that goes along with this that I will commit right after this.
So expect lld not to built after this commit and before the next one.
llvm-svn: 266919
Krzysztof Parzyszek [Wed, 20 Apr 2016 21:17:40 +0000 (21:17 +0000)]
[Hexagon] Add -mv.. options to override CPU selection
This is for compatibility with scripts that use -mv5, etc. with the
assembler.
llvm-svn: 266918
Todd Fiala [Wed, 20 Apr 2016 20:54:59 +0000 (20:54 +0000)]
update Jenkins Xcode buildbot target for r266885
llvm-svn: 266917
Saleem Abdulrasool [Wed, 20 Apr 2016 20:54:55 +0000 (20:54 +0000)]
unwind: remove a second instance of -Wexpansion-to-defined
Remove the use of undefined behaviour in the c preprocessor by always defining
the value according to the state that was being checked. NFC.
llvm-svn: 266916
Saleem Abdulrasool [Wed, 20 Apr 2016 20:54:51 +0000 (20:54 +0000)]
unwind: remove an instance of -Wexpansion-to-defined
This follows the pattern in the Apple clause duplicating a tuple of definitions.
However, it will define them to a value rather than a defined check to remove
the `-Wexpansion-to-defined` warning (which may be treated as an error).
This also opens the door to unifying the two code paths into one.
NFC.
llvm-svn: 266915
Rui Ueyama [Wed, 20 Apr 2016 20:54:13 +0000 (20:54 +0000)]
Define and use a utility function. NFC.
llvm-svn: 266914
Saleem Abdulrasool [Wed, 20 Apr 2016 20:53:40 +0000 (20:53 +0000)]
unwind: unify _LIBUNWIND_SUPPORT_DWARF_UNWIND
Join the two paths for this macro. At the end of the day, the difference was
that MIPS and ARM on Apple have different behaviour. This is a setup change to
remove an instance of -Wexpansion-to-defined. NFC.
llvm-svn: 266913
Rui Ueyama [Wed, 20 Apr 2016 20:48:25 +0000 (20:48 +0000)]
ELF: Redefine parseExpr to parse an expression. NFC.
Previously the function reads an operator and the rest of
the expressions. This patch makes it to actually parse an expression
which starts with a primary pexression followed by other expressions
concatenated with operators.
llvm-svn: 266912
Enrico Granata [Wed, 20 Apr 2016 20:48:05 +0000 (20:48 +0000)]
Fix a bug where LLDB would crash if 'apropos <anything>' was used after spawning an inferior process
llvm-svn: 266911
Evgeniy Stepanov [Wed, 20 Apr 2016 20:32:18 +0000 (20:32 +0000)]
[msan] Implement GetPageSize in the test.
Instead of calling a sanitizer_common function, implement GetPageSize in the
test directly. MSan runtime does not export __sanitizer::* symbols, and the
current code breaks when the test and the runtime library are in the separate
link units (ex. when the test is built as a shared library).
llvm-svn: 266910
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 20:14:09 +0000 (20:14 +0000)]
IR: Use SmallVector instead of std::vector of TrackingMDRef
Don't use std::vector<TrackingMDRef>, since (at least in some versions
of libc++) std::vector apparently copies values on grow operations
instead of moving them. Found this when I was temporarily deleting the
copy constructor for TrackingMDRef to investigate a performance
bottleneck.
llvm-svn: 266909
Rui Ueyama [Wed, 20 Apr 2016 20:13:41 +0000 (20:13 +0000)]
ELF: Template LinkerScript class.
Originally, linker scripts were basically an alternative way to specify
options to the command line options. But as we add more features to hanlde
symbols and sections, many member functions needed to be templated.
Now most the members are templated. It is probably time to template the
entire class.
Previously, LinkerScript is an executor of the linker script as well as
a storage of linker script configurations. This is not suitable to template
the class because when we are reading linker script files, we don't know
the ELF type yet, so we can't instantiate ELF-templated classes.
In this patch, I defined a new class, ScriptConfiguration, to store
linker script configurations. ScriptParser writes parse results to it,
and LinkerScript uses them.
Differential Revision: http://reviews.llvm.org/D19302
llvm-svn: 266908
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 20:03:59 +0000 (20:03 +0000)]
IR: Stop copying vectors of TrackingMDRef in DIBuilder
No real functionality change here, just avoiding an unnecessary copy of
std::vector<TrackingMDRef> for every subprogram with variables.
llvm-svn: 266907
Kostya Serebryany [Wed, 20 Apr 2016 20:02:58 +0000 (20:02 +0000)]
Rename asan-check-lifetime into asan-stack-use-after-scope
Summary:
This is done for consistency with asan-use-after-return.
I see no other users than tests.
Reviewers: aizatsky, kcc
Differential Revision: http://reviews.llvm.org/D19306
llvm-svn: 266906
Chad Rosier [Wed, 20 Apr 2016 19:16:23 +0000 (19:16 +0000)]
Typo.
llvm-svn: 266905
Chad Rosier [Wed, 20 Apr 2016 19:15:26 +0000 (19:15 +0000)]
[ValueTracking] Make isImpliedCondition return an Optional<bool>. NFC.
Phabricator Revision: http://reviews.llvm.org/D19277
llvm-svn: 266904
Nico Weber [Wed, 20 Apr 2016 19:09:26 +0000 (19:09 +0000)]
Replace a loop with a for-each loop. No behavior change.
llvm-svn: 266903
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 19:05:59 +0000 (19:05 +0000)]
IR: Avoid mallocs in constructor of ModuleSlotTracker
A ModuleSlotTracker can be created without actually being used (e.g.,
r266889 added one to the Verifier). Create the SlotTracker within it
lazily on the first call to ModuleSlotTracker::getMachine.
llvm-svn: 266902
Davide Italiano [Wed, 20 Apr 2016 18:45:31 +0000 (18:45 +0000)]
[MC] Silence warning due to unused variable in !Debug builds.
llvm-svn: 266901
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 18:42:51 +0000 (18:42 +0000)]
Verifier: Add ModuleSlotTracker to printAsOperand call
I missed this site in r266889.
llvm-svn: 266900
Davide Italiano [Wed, 20 Apr 2016 18:38:09 +0000 (18:38 +0000)]
[LTO] Another type merge test.
llvm-svn: 266899
Jacques Pienaar [Wed, 20 Apr 2016 18:28:55 +0000 (18:28 +0000)]
[lanai] Add subword scheduling itineraries.
Differentiate between word and subword memory operations as they take different
amount of cycles to complete. This just adds a basic model of the subword
latency to the scheduler.
llvm-svn: 266898
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 18:27:18 +0000 (18:27 +0000)]
Verifier: Prefer early continue over if-nesting, NFC
llvm-svn: 266897
Davide Italiano [Wed, 20 Apr 2016 18:10:25 +0000 (18:10 +0000)]
[LTO] Add a test to ensure we handle basic type merging correctly.
llvm-svn: 266896
Davide Italiano [Wed, 20 Apr 2016 17:53:21 +0000 (17:53 +0000)]
[MC] EmitNop: Make an assertion more useful.
Differential Revision: http://reviews.llvm.org/D19334
llvm-svn: 266895
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 17:48:22 +0000 (17:48 +0000)]
LTO: Verify the input even if optimize() isn't called
Clients may call writeMergedModules before calling optimize, or call
compileOptimized without calling optimize. Make sure they don't sneak
past the verifier. This adds LTOCodeGenerator::verifyMergedModuleOnce,
and calls it from writeMergedModule, optimize, and codegenOptimized.
I couldn't find a good way to test this. I tried writing broken IR to
send into llvm-lto, but LTOCodeGenerator doesn't understand textual IR,
and assembler runs the verifier itself anyway. Checking in
valid-but-doesn't-verify bitcode here doesn't seem valuable.
llvm-svn: 266894
Mehdi Amini [Wed, 20 Apr 2016 17:47:42 +0000 (17:47 +0000)]
ModuleLinker: only import what is in GlobalsToImport, regarless if it is a function or not.
The alias handling was specific to the old iterative inlining
mechanism, so that is dead now. The variable handling could make a
difference, since we were previously falling through to the normal
selection logic, but we don't observe changes in the validation
because no client seems to rely on it.
Differential Revision: http://reviews.llvm.org/D19307
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266893
Saleem Abdulrasool [Wed, 20 Apr 2016 17:43:43 +0000 (17:43 +0000)]
builtins: fix -Werror,-Wunused-variable warning
This removes the unused variable `flags`. NFC
llvm-svn: 266892
Saleem Abdulrasool [Wed, 20 Apr 2016 17:43:40 +0000 (17:43 +0000)]
builtins: remove use of __attribute__((pcs("aapcs"))) on Windows
Windows does not honour the __attribute__((pcs)) on ARM. Although this will
result in ABI mismatches, compiler-rt should largely be unneeded for resolving
dependencies as we generate MS ABI compliant library calls now for the most
part.
llvm-svn: 266891
Rafael Espindola [Wed, 20 Apr 2016 17:30:22 +0000 (17:30 +0000)]
Delete refersToGotEntry.
It can be computed from the expression.
llvm-svn: 266890
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 17:27:44 +0000 (17:27 +0000)]
IR: Use a single ModuleSlotTracker in the Verifier
Speed up Verifier output by sharing a single ModuleSlotTracker for the
duration. There should be no functionality change here except for much
faster output when there's more than one statement.
Now the Verifier won't be traversing the full Metadata graph every time
it prints an error. The TypePrinter is still not shared, but that would
take some extra plumbing.
llvm-svn: 266889
Rafael Espindola [Wed, 20 Apr 2016 17:20:49 +0000 (17:20 +0000)]
Simplify mips gp0 handling.
In all currently supported cases this is a nop.
llvm-svn: 266888
Adrian McCarthy [Wed, 20 Apr 2016 16:43:34 +0000 (16:43 +0000)]
Add warning about CR+LF line endings on Windows.
s/checkout/check out/ when used as a verb.
Differential Revision: http://reviews.llvm.org/D19285
llvm-svn: 266887
Zachary Turner [Wed, 20 Apr 2016 16:41:02 +0000 (16:41 +0000)]
Add missing file needed for PDB unittests.
llvm-svn: 266886
Todd Fiala [Wed, 20 Apr 2016 16:27:27 +0000 (16:27 +0000)]
test infra: move test event-related handling into its own package
This change moves all the test event handling and its related
ResultsFormatter classes out of the packages/Python/lldbsuite/test dir
into a packages/Python/lldbsuite/test_event package. Formatters are
moved into a sub-package under that.
I am limiting the scope of this change to just the motion and a few
minor issues caught by a static Python checker (e.g. removing unused
import statements).
This is a pre-step for adding package-level tests to the test event
system. I also intend to simplify test event results formatter selection
after I make sure this doesn't break anybody.
See:
http://reviews.llvm.org/D19288
Reviewed by:
Pavel Labath
llvm-svn: 266885
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 16:17:37 +0000 (16:17 +0000)]
IR: Don't use raw_null_ostream in Verifier
While using a raw_null_ostream meant that the Verifier didn't have to
think about whether to print, it's actually quite expensive to print out
IR. Only print if the output is going somewhere.
llvm-svn: 266884
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 15:55:24 +0000 (15:55 +0000)]
IR: Use default member initialization in Verifier, NFC
llvm-svn: 266883
Krzysztof Parzyszek [Wed, 20 Apr 2016 15:54:13 +0000 (15:54 +0000)]
[Hexagon] Fix handling of lcomm directive
Patch by Colin LeMahieu.
llvm-svn: 266882
Teresa Johnson [Wed, 20 Apr 2016 15:16:57 +0000 (15:16 +0000)]
Re-enable "[gold-plugin] Disable name for values other than GlobalValue"
This restores r266871 with a fix for gold tests relying on the value
names, when using a release compiler, by adding a way to disable the
default discarding. Update affected tests to use the new mechanism so
that value names are preserved as expected, regardless of how the
compiler was built.
llvm-svn: 266881
Rafael Espindola [Wed, 20 Apr 2016 15:01:42 +0000 (15:01 +0000)]
Inline canRelaxTls.
It was always called in a position where the relocation type was already
known.
llvm-svn: 266880
Rafael Espindola [Wed, 20 Apr 2016 14:52:18 +0000 (14:52 +0000)]
Simplify canRelaxTls.
Check isTls in the called and pass a SymbolBody&.
llvm-svn: 266879
Rafael Espindola [Wed, 20 Apr 2016 14:41:55 +0000 (14:41 +0000)]
Move canRelaxTls to Writer.cpp. NFC.
llvm-svn: 266878
Teresa Johnson [Wed, 20 Apr 2016 14:39:45 +0000 (14:39 +0000)]
[ThinLTO] Prevent importing of "llvm.used" values
Summary:
This patch prevents importing from (and therefore exporting from) any
module with a "llvm.used" local value. Local values need to be promoted
and renamed when importing, and their presense on the llvm.used variable
indicates that there are opaque uses that won't see the rename. One such
example is a use in inline assembly.
See also the discussion at:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098047.html
As part of this, move collectUsedGlobalVariables out of Transforms/Utils
and into IR/Module so that it can be used more widely. There are several
other places in LLVM that used copies of this code that can be cleaned
up as a follow on NFC patch.
Reviewers: joker.eph
Subscribers: pcc, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D18986
llvm-svn: 266877
Rafael Espindola [Wed, 20 Apr 2016 14:36:24 +0000 (14:36 +0000)]
Delete needsDynRelative.
It is now redundant. Writer.cpp can reason that 2 dynamic relocations
are needed: one to find the final got entry address and one to fill the
got entry.
llvm-svn: 266876
Krzysztof Parzyszek [Wed, 20 Apr 2016 14:33:23 +0000 (14:33 +0000)]
[RDF] Consider register as live if any alias is live
This only affects the recomputation of kill flags.
llvm-svn: 266875
NAKAMURA Takumi [Wed, 20 Apr 2016 14:14:16 +0000 (14:14 +0000)]
IncludeFixerTest.cpp: Tweak not to assume clang-tools-extra were onto clang/tools/extra.
llvm-svn: 266874
Zoran Jovanovic [Wed, 20 Apr 2016 14:07:46 +0000 (14:07 +0000)]
[mips][microMIPS] Implement BGEC, BGEUC, BLTC, BLTUC, BEQC and BNEC instructions
Differential Revision: http://reviews.llvm.org/D14206
llvm-svn: 266873
Teresa Johnson [Wed, 20 Apr 2016 13:18:47 +0000 (13:18 +0000)]
Revert "[gold-plugin] Disable name for values other than GlobalValue"
This reverts commit r266871. Setting the default based on the NDEBUG
flag is causing test failures. Need to figure out whether to change this
approach or update tests.
llvm-svn: 266872
Teresa Johnson [Wed, 20 Apr 2016 13:01:37 +0000 (13:01 +0000)]
[gold-plugin] Disable name for values other than GlobalValue
Summary:
Applies Mehdi's optimization (r263086) to disable value names other than
for GlobalValues to LTO/ThinLTO performed via the gold-plugin, in the
same manner as it is applied in libLTO.
Reviewers: rafael, joker-eph
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19269
llvm-svn: 266871
Benjamin Kramer [Wed, 20 Apr 2016 12:43:43 +0000 (12:43 +0000)]
[include-fixer] Add a prototype for a new include fixing tool.
Summary:
The goal of this tool is fairly simple, look up unknown identifiers in a
global database and add the corresponding #include line. It accomplishes
this by hooking into Sema as an ExternalSemaSource and responding to typo
correction callbacks. This means we can see the unknown identifier before
it's being munged by error recovery.
This doesn't work perfectly yet as some typo corrections don't emit
callbacks (delayed typos), but I think this is fixable. We also handle
only one include at a time as this is meant to be run directly from
the editing environment eventually. Adding multiple includes at the same
time is tricky because of error recovery.
This version only has a a dummy database, so all you can do is fixing
missing includes of <string>, but the indexer to build a database will
follow soon.
Reviewers: djasper
Subscribers: ioeric, hokein, cfe-commits
Differential Revision: http://reviews.llvm.org/D19314
llvm-svn: 266870
Chuang-Yu Cheng [Wed, 20 Apr 2016 10:28:41 +0000 (10:28 +0000)]
Always inlining PrintCurrentStackSlow of tsan library to fix tail-call issue
The real problem is that sanitizer_print_stack_trace obtains current PC and
expects the PC to be in the stack trace after function calls. We don't
prevent tail calls in sanitizer runtimes, so this assumption does not
necessary hold.
We add "always inline" attribute on PrintCurrentStackSlow to address this
issue, however this solution is not reliable enough, but unfortunately, we
don't see any simple, reliable solution.
Reviewers: samsonov hfinkel kbarton tjablin dvyukov kcc
http://reviews.llvm.org/D19148
Thanks Hal, dvyukov, and kcc for invaluable discussion, I have even borrowed
part of dvyukov's summary as my commit message!
llvm-svn: 266869
Maxim Ostapenko [Wed, 20 Apr 2016 10:22:37 +0000 (10:22 +0000)]
[sanitizer] Fix 'dyld: Symbol not found: _dyldVersionNumber' link error on old Darwin systems.
This patch fixes https://github.com/google/sanitizers/issues/669. On older Darwin systems (in particular, Darwin 10),
dyld doesn't export '_dyldVersionNumber' symbol so we would have 'undefined reference' error in sanitzer library. Although
sanitizers support was added to LLVM on OS X 10.7+ where '_dyldVersionNumber' symbol is already exported, GCC users still
may want use them on older systems.
Differential Revision: http://reviews.llvm.org/D19218
llvm-svn: 266868
Tamas Berghammer [Wed, 20 Apr 2016 09:54:47 +0000 (09:54 +0000)]
Fix xfail for test_tilde_home_directory on windows
llvm-svn: 266867
Daniel Jasper [Wed, 20 Apr 2016 09:48:56 +0000 (09:48 +0000)]
clang-tidy: [misc-unused-using-decls] Support template types.
This fixes llvm.org/PR27429.
llvm-svn: 266866
Nikolay Haustov [Wed, 20 Apr 2016 09:34:48 +0000 (09:34 +0000)]
AMDGPU/SI: Assembler: improvements to support trap handlers.
Add ParseAMDGPURegister which can be invoked recursively for parsing lists.
Rename getRegForName to getSpecialRegForName.
Support legacy SP3 register list syntax: [s2,s3,s4,s5] or [flat_scratch_lo,flat_scratch_hi].
Add 64-bit registers TBA, TMA where missing.
Add some tests.
Differential Revision: http://reviews.llvm.org/D19163
llvm-svn: 266865
Daniel Jasper [Wed, 20 Apr 2016 08:58:27 +0000 (08:58 +0000)]
clang-tidy: [misc-unused-using-decls] Always use the canonical decl to
identify things.
This fixes llvm.org/PR27430.
llvm-svn: 266864
Asaf Badouh [Wed, 20 Apr 2016 08:32:57 +0000 (08:32 +0000)]
[X86] enable PIE for functions
Call locally defined function directly for PIE/fPIE
Differential Revision: http://reviews.llvm.org/D19226
llvm-svn: 266863
Haojian Wu [Wed, 20 Apr 2016 08:29:08 +0000 (08:29 +0000)]
Fix a crash in cppcoreguidelines-pro-type-member-init related to missing constructor bodies.
Summary: Fixes a crash in cppcoreguidelines-pro-type-member-init when checking some record types with a constructor without a body. We now check to make sure the constructor has a body before looking for missing members and base initializers.
Patch by Michael Miller!
Reviewers: aaron.ballman, alexfh, hokein
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19270
llvm-svn: 266862
Hrvoje Varga [Wed, 20 Apr 2016 06:34:48 +0000 (06:34 +0000)]
[mips][microMIPS]Implement CFC*, CTC* and LDC* instructions
Differential Revision: http://reviews.llvm.org/D18640
llvm-svn: 266861
Craig Topper [Wed, 20 Apr 2016 05:19:01 +0000 (05:19 +0000)]
[AVX512] Add avx512cd+vl runs to vector-tzcnt-128/256 tests to show using the vplzcntd/q instructions.
llvm-svn: 266860
Craig Topper [Wed, 20 Apr 2016 05:18:58 +0000 (05:18 +0000)]
[AVX512] Update vector-tzcnt-512 test to show how bad v32i16 and v64i8 is with avx512bw enabled.
llvm-svn: 266859
Craig Topper [Wed, 20 Apr 2016 05:18:55 +0000 (05:18 +0000)]
[AVX512] Add popcount support for v32i16 and v64i8.
llvm-svn: 266858
Sean Silva [Wed, 20 Apr 2016 04:26:16 +0000 (04:26 +0000)]
Revert "[ELF] - Avoid using memset for zero-initialization of struct member. NFC."
This reverts commit r266618. It breaks basically everything.
I think VS2013 doesn't interpret this code in the same way.
The size field (at least) is left uninitialized, causing all sorts of havok
(e.g. creating a 34GB file for a trivial hello world program).
The offending compiler reports itself as follows:
c:\release-vs2013>cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
llvm-svn: 266857
Mehdi Amini [Wed, 20 Apr 2016 04:18:11 +0000 (04:18 +0000)]
ThinLTO: never promote as external weak
This linkage is *not* intended to express that a declaration refers
to a weak symbol, but that the symbol might not be present at link
time. I don't believe it was the intent.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266856
Eric Fiselier [Wed, 20 Apr 2016 04:17:39 +0000 (04:17 +0000)]
Add cxx_runtime_root options for testing against a different libc++ at runtime
llvm-svn: 266855
Mehdi Amini [Wed, 20 Apr 2016 04:17:36 +0000 (04:17 +0000)]
FunctionImport: make sure we always select the right callee in presence of alias
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266854
Alexey Bataev [Wed, 20 Apr 2016 04:01:36 +0000 (04:01 +0000)]
[OPENMP] Codegen for untied tasks.
If the untied clause is present on a task construct, any thread in the
team can resume the task region after a suspension. Patch adds proper
codegen for untied tasks.
llvm-svn: 266853
Teresa Johnson [Wed, 20 Apr 2016 02:23:52 +0000 (02:23 +0000)]
Enable ODR uniquing of DITypes for ThinLTO backends
Summary:
This is a follow-on to apply Duncan's new DIType ODR uniquing from
r266549 and r266713 in more places.
When invoking ThinLTO backend compiles via clang (for a distributed
build), invoke enableDebugTypeODRUniquing() before parsing the module.
Reviewers: dexonsmith, joker.eph
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D19264
llvm-svn: 266852
Eric Fiselier [Wed, 20 Apr 2016 02:21:33 +0000 (02:21 +0000)]
[libcxx] Fix PR15638 - Only allocate in parent when starting a thread to prevent calling terminate.
Summary:
Hi,
When creating a new thread libc++ performs at least 2 allocations. The first allocates a tuple of args and the functor that will be passed to the new thread. The second allocation is for the thread local storage needed internally by libc++. Currently the second allocation happens in the child thread, meaning that if it throws the program will terminate with an uncaught bad alloc.
The solution to this is to allocate ALL memory in the parent thread and then pass it to the child.
See https://llvm.org/bugs/show_bug.cgi?id=15638
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13748
llvm-svn: 266851
Craig Topper [Wed, 20 Apr 2016 01:57:44 +0000 (01:57 +0000)]
[X86] Mark some floating point operations that are always expanded for vector types as Expand in a floating point only loop instead of looping through all vector types.
llvm-svn: 266850
Craig Topper [Wed, 20 Apr 2016 01:57:42 +0000 (01:57 +0000)]
[X86] Don't mark vector loads and shifts Expand in advance. Loads are always marked Legal or Promote for all the legal types later. Shifts are always marked custom. NFC
llvm-svn: 266849
Craig Topper [Wed, 20 Apr 2016 01:57:40 +0000 (01:57 +0000)]
[X86] Merge the two different SSE2 blocks in the X86TargetLowering constructor. Also qualfiy the XOP block with !useSoftFloat to match the other vector blocks.
llvm-svn: 266848
Craig Topper [Wed, 20 Apr 2016 01:57:38 +0000 (01:57 +0000)]
[X86] Don't set vector FADD,FSUB,FMUL,FDIV,FNEG,FSQRT to Expand early. For every legal FP type we either set them to Legal or Custom anyway. So let them stay defaulted to Legal and only change when they need to be Custom.
llvm-svn: 266847
Mehdi Amini [Wed, 20 Apr 2016 01:04:26 +0000 (01:04 +0000)]
llvm-lto: run the module verifier when doing IR level work
It seems it was only running during CodeGen previously.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266846
Mehdi Amini [Wed, 20 Apr 2016 01:04:20 +0000 (01:04 +0000)]
ThinLTO: Move alias importing decision on the summary
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266845
Marcin Koscielnicki [Wed, 20 Apr 2016 01:03:48 +0000 (01:03 +0000)]
[SystemZ] Add support for llvm.thread.pointer intrinsic.
Differential Revision: http://reviews.llvm.org/D19054
llvm-svn: 266844
Mandeep Singh Grang [Wed, 20 Apr 2016 01:02:18 +0000 (01:02 +0000)]
[Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
Summary:
Removed unwanted --check-prefix=CHECK from the following unit tests:
test/CXX/special/class.copy/implicit-move-def.cpp
test/CodeGen/cleanup-destslot-simple.c
test/CodeGen/inline-asm-immediate-ubsan.c
test/CodeGen/mips-interrupt-attr.c
test/CodeGenCXX/cfi-stats.cpp
test/CodeGenCXX/copy-constructor-elim.cpp
test/CodeGenCXX/microsoft-templ-uuidof.cpp
test/CodeGenCXX/vtable-linkage.cpp
test/CodeGenObjC/messages-2.m
test/Driver/noinline.c
test/Index/remap-load.c
test/Index/retain-comments-from-system-headers.c
test/OpenMP/task_if_codegen.cpp
test/Preprocessor/comment_save_macro.c
Patch by: Mandeep Singh Grang (mgrang)
Reviewers: rafael, ABataev, rengolin
Projects: #clang-c
Differential Revision: http://reviews.llvm.org/D19232
llvm-svn: 266843
Amaury Sechet [Wed, 20 Apr 2016 01:02:12 +0000 (01:02 +0000)]
Add LLVMGetAttrKindID in the C API in order to facilitate migration away from LLVMAttribute
Summary:
LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values.
See D18749 for reference.
Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19081
llvm-svn: 266842
NAKAMURA Takumi [Wed, 20 Apr 2016 00:55:38 +0000 (00:55 +0000)]
MipsAsmParser::loadImmediate(): Prune an obsolete \param in r266602. [-Wdocumentation]
llvm-svn: 266841
Stephen Hines [Wed, 20 Apr 2016 00:33:06 +0000 (00:33 +0000)]
MarkEOLs should only be true for clang-cl.exe.
Summary:
https://llvm.org/bugs/show_bug.cgi?id=27396
This fixes an issue in response files where "\r\n" was being interpreted
as two EOL markers (i.e. we consumed the '\r' as terminating the
previous token, and then parsed the '\n' as a significant EOL). This
breaks response files where joined arguments get split across multiple
lines (like "-x\r\nc"). I also fixed an accidental issue in the
response-file.c test, where the response file is appended to, instead of
being overwritten.
Reviewers: rnk
Subscribers: danalbert, llvm-commits
Differential Revision: http://reviews.llvm.org/D19289
llvm-svn: 266840
Duncan P. N. Exon Smith [Wed, 20 Apr 2016 00:29:48 +0000 (00:29 +0000)]
IR: Use HANDLE_METADATA_LEAF to define MetadataKind enum, NFC
llvm-svn: 266839
Kostya Serebryany [Wed, 20 Apr 2016 00:24:21 +0000 (00:24 +0000)]
[libFuzzer] added -detect_leaks flag (0 by default for now). When enabled, it will help finding leaks while fuzzing
llvm-svn: 266838
Mehdi Amini [Wed, 20 Apr 2016 00:21:24 +0000 (00:21 +0000)]
ScoreboardHazardRecognizer: unbreak TSAN by moving a static mutated variable to a member
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266837
Eric Fiselier [Wed, 20 Apr 2016 00:14:32 +0000 (00:14 +0000)]
Add 'is_callable' and 'is_nothrow_callable' traits and cleanup INVOKE.
The primary purpose of this patch is to add the 'is_callable' traits.
Since 'is_nothrow_callable' required making 'INVOKE' conditionally noexcept
I also took this oppertunity to implement a constexpr version of INVOKE.
This fixes 'std::experimental::apply' which required constexpr 'INVOKE support'.
This patch will be followed up with some cleanup. Primarly removing most
of "__member_function_traits" since it's no longer used by INVOKE (in C++11 at least).
llvm-svn: 266836