Reid Kleckner [Wed, 17 Feb 2016 00:17:33 +0000 (00:17 +0000)]
[X86] Fix a shrink-wrapping miscompile around __chkstk
__chkstk clobbers EAX. If EAX is live across the prologue, then we have
to take extra steps to save it. We already had code to do this if EAX
was a register parameter. This change adapts it to work when shrink
wrapping is used.
llvm-svn: 261039
Xinliang David Li [Wed, 17 Feb 2016 00:14:52 +0000 (00:14 +0000)]
New test case: make sure alloc bit is not set for covmap section on Linux
llvm-svn: 261038
Dan Gohman [Wed, 17 Feb 2016 00:14:03 +0000 (00:14 +0000)]
[WebAssembly] Use SDValue::getConstantOperandVal. NFC.
llvm-svn: 261037
Mehdi Amini [Wed, 17 Feb 2016 00:11:59 +0000 (00:11 +0000)]
Fix MSVC bot: apparently visual studio does not like explicitly defaulted move ctor
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 261036
Richard Smith [Wed, 17 Feb 2016 00:04:04 +0000 (00:04 +0000)]
Improve diagnostics for ill-formed literal operator declarations.
Patch by Erik Pilkington!
llvm-svn: 261034
Andrew Kaylor [Tue, 16 Feb 2016 23:52:18 +0000 (23:52 +0000)]
Fix build LLVM with -D LLVM_USE_INTEL_JITEVENTS:BOOL=ON on Windows
Differential Revision: http://reviews.llvm.org/D16940
llvm-svn: 261033
Dan Gohman [Tue, 16 Feb 2016 23:48:04 +0000 (23:48 +0000)]
[WebAssembly] Implement __builtin_frame_address.
Differential Revision: http://reviews.llvm.org/D17307
llvm-svn: 261032
Mehdi Amini [Tue, 16 Feb 2016 23:05:56 +0000 (23:05 +0000)]
Query the StringMap only once when creating MDString (NFC)
Summary: Loading IR with debug info improves MDString::get() from 19ms to 10ms.
Reviewers: dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16597
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 261030
Mehdi Amini [Tue, 16 Feb 2016 23:02:29 +0000 (23:02 +0000)]
Define the ThinLTO Pipeline (experimental)
Summary:
On the contrary to Full LTO, ThinLTO can afford to shift compile time
from the frontend to the linker: both phases are parallel (even if
it is not totally "free": projects like clang are reusing product
from the "compile phase" for multiple link, think about
libLLVMSupport reused for opt, llc, etc.).
This pipeline is based on the proposal in D13443 for full LTO. We
didn't move forward on this proposal because the LTO link was far too
long after that. We believe that we can afford it with ThinLTO.
The ThinLTO pipeline integrates in the regular O2/O3 flow:
- The compile phase perform the inliner with a somehow lighter
function simplification. (TODO: tune the inliner thresholds here)
This is intendend to simplify the IR and get rid of obvious things
like linkonce_odr that will be inlined.
- The link phase will run the pipeline from the start, extended with
some specific passes that leverage the augmented knowledge we have
during LTO. Especially after the inliner is done, a sequence of
globalDCE/globalOpt is performed, followed by another run of the
"function simplification" passes. It is not clear if this part
of the pipeline will stay as is, as the split model of ThinLTO
does not allow the same benefit as FullLTO without added tricks.
The measurements on the public test suite as well as on our internal
suite show an overall net improvement. The binary size for the clang
executable is reduced by 5%. We're still tuning it with the bringup
of ThinLTO and it will evolve, but this should provide a good starting
point.
Reviewers: tejohnson
Differential Revision: http://reviews.llvm.org/D17115
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 261029
Mehdi Amini [Tue, 16 Feb 2016 22:54:27 +0000 (22:54 +0000)]
Refactor the PassManagerBuilder: extract a "addFunctionSimplificationPasses()" (NFC)
It is intended to contains the passes run over a function after the
inliner is done with a function and before it moves to its callers.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 261028
Adam Nemet [Tue, 16 Feb 2016 22:50:19 +0000 (22:50 +0000)]
Fix test from r261013
llvm-svn: 261027
Simon Pilgrim [Tue, 16 Feb 2016 22:33:27 +0000 (22:33 +0000)]
[X86][AVX] Regenerated vselect tests
llvm-svn: 261026
Ahmed Bougacha [Tue, 16 Feb 2016 22:14:12 +0000 (22:14 +0000)]
[X86] Remove the now-unused X86ISD::PSIGN. NFC.
llvm-svn: 261025
Ahmed Bougacha [Tue, 16 Feb 2016 22:14:07 +0000 (22:14 +0000)]
[X86] Generalize logic blend of (x, -x) combine to match (-x, x).
I suspect this is what let PR26110 lie dormant for so long.
llvm-svn: 261024
Ahmed Bougacha [Tue, 16 Feb 2016 22:14:03 +0000 (22:14 +0000)]
[X86] Don't turn (c?-v:v) into (c?-v:0) by blindly using PSIGN.
Currently, we sometimes miscompile this vector pattern:
(c ? -v : v)
We lower it to (because "c" is <4 x i1>, lowered as a vector mask):
(~c & v) | (c & -v)
When we have SSSE3, we incorrectly lower that to PSIGN, which does:
(c < 0 ? -v : c > 0 ? v : 0)
in other words, when c is either all-ones or all-zero:
(c ? -v : 0)
While this is an old bug, it rarely triggers because the PSIGN combine
is too sensitive to operand order. This will be improved separately.
Note that the PSIGN tests are also incorrect. Consider:
%b.lobit = ashr <4 x i32> %b, <i32 31, i32 31, i32 31, i32 31>
%sub = sub nsw <4 x i32> zeroinitializer, %a
%0 = xor <4 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1>
%1 = and <4 x i32> %a, %0
%2 = and <4 x i32> %b.lobit, %sub
%cond = or <4 x i32> %1, %2
ret <4 x i32> %cond
if %b is zero:
%b.lobit = <4 x i32> zeroinitializer
%sub = sub nsw <4 x i32> zeroinitializer, %a
%0 = <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>
%1 = <4 x i32> %a
%2 = <4 x i32> zeroinitializer
%cond = or <4 x i32> %a, zeroinitializer
ret <4 x i32> %a
whereas we currently generate:
psignd %xmm1, %xmm0
retq
which returns 0, as %xmm1 is 0.
Instead, use a pure logic sequence, as described in:
https://graphics.stanford.edu/~seander/bithacks.html#ConditionalNegate
Fixes PR26110.
Differential Revision: http://reviews.llvm.org/D17181
llvm-svn: 261023
Ahmed Bougacha [Tue, 16 Feb 2016 22:13:59 +0000 (22:13 +0000)]
[X86] Extract PSIGN/BLENDVP tests into vector-blend.ll. NFC.
We're going to stop generating PSIGN, so calling a test "psign"
isn't ideal. Instead, call these tests what they really are:
variable blends using logic.
Also add a test to exhibit a case we're currently missing in
the PSIGN combine.
llvm-svn: 261022
Ahmed Bougacha [Tue, 16 Feb 2016 22:13:55 +0000 (22:13 +0000)]
[X86] Extract PSIGN/BLENDVP combine. NFC.
llvm-svn: 261021
Ahmed Bougacha [Tue, 16 Feb 2016 22:13:49 +0000 (22:13 +0000)]
[X86] Extract ANDNP combine. NFC.
This makes it IMO more readable and reduces indentation.
llvm-svn: 261020
Mehdi Amini [Tue, 16 Feb 2016 22:07:03 +0000 (22:07 +0000)]
Bitcode writer: fix a typo, using getName() instead of getSourceFileName()
When emitting the source filename, the encoding of the string
was checked against the name instead of the filename.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 261019
Artem Belevich [Tue, 16 Feb 2016 22:03:20 +0000 (22:03 +0000)]
[CUDA] pass debug options to ptxas.
ptxas optimizations are disabled if we need to generate debug info
as ptxas does not accept '-g' otherwise.
Differential Revision: http://reviews.llvm.org/D17111
llvm-svn: 261018
Derek Schuff [Tue, 16 Feb 2016 21:52:06 +0000 (21:52 +0000)]
[WebAssembly] Update torture test expectations
These were fixed with r260978
llvm-svn: 261017
Reid Kleckner [Tue, 16 Feb 2016 21:49:26 +0000 (21:49 +0000)]
[codeview] Bail on a DBG_VALUE register operand with no register
This apparently comes up when the register allocator decides that a
variable will become undef along a certain path.
Also improve the error message we emit when we can't map from LLVM
register number to CV register number.
llvm-svn: 261016
Derek Schuff [Tue, 16 Feb 2016 21:44:19 +0000 (21:44 +0000)]
[WebAssemly] Don't move calls or stores past intervening loads
The register stackifier currently checks for intervening stores (and
loads that may alias them) but doesn't account for the fact that the
instruction being moved may affect intervening loads.
Differential Revision: http://reviews.llvm.org/D17298
llvm-svn: 261014
Adam Nemet [Tue, 16 Feb 2016 21:41:51 +0000 (21:41 +0000)]
[LTO] Support Statistics
Summary:
I thought -Xlinker -mllvm -Xlinker -stats worked at some point but maybe
it never did.
For clang, I believe that stats are printed from cc1_main. This patch
also prints them for LTO, specifically right after codegen happens.
I only looked at the C API for LTO briefly to see if this is a good
place. Probably there are still cases where this wouldn't be printed
but it seems to be working for the common case. I also experimented
putting this in the LTOCodeGenerator destructor but that didn't trigger
for me because ld64 does not destroy the LTOCodeGenerator.
Reviewers: dexonsmith, joker.eph
Subscribers: rafael, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D17302
llvm-svn: 261013
Reid Kleckner [Tue, 16 Feb 2016 21:14:51 +0000 (21:14 +0000)]
[codeview] Fix assertion on non-memory, non-register DBG_VALUE instructions
Eventually we should find a way to describe constant variables, but it
is not obvious how to do this at the moment.
llvm-svn: 261010
Aaron Ballman [Tue, 16 Feb 2016 21:06:10 +0000 (21:06 +0000)]
Missing semicolons are kind of important. Who knew?
llvm-svn: 261009
Aaron Ballman [Tue, 16 Feb 2016 21:02:23 +0000 (21:02 +0000)]
Add a nullPointerConstant() AST matcher to handle variations of null pointer constants in one matcher.
llvm-svn: 261008
Colin LeMahieu [Tue, 16 Feb 2016 20:38:17 +0000 (20:38 +0000)]
[Hexagon] Adding relocation for code size, cold path optimization allowing a 23-bit 4-byte aligned relocation to be a valid instruction encoding.
The usual way to get a 32-bit relocation is to use a constant extender which doubles the size of the instruction, 4 bytes to 8 bytes.
Another way is to put a .word32 and mix code and data within a function. The disadvantage is it's not a valid instruction encoding and jumping over it causes prefetch stalls inside the hardware.
This relocation packs a 23-bit value in to an "r0 = add(rX, #a)" instruction by overwriting the source register bits. Since r0 is the return value register, if this instruction is placed after a function call which return void, r0 will be filled with an undefined value, the prefetch won't be confused, and the callee can access the constant value by way of the link register.
llvm-svn: 261006
Reid Kleckner [Tue, 16 Feb 2016 20:34:27 +0000 (20:34 +0000)]
Stop using "template" when printing qualtype names
Summary:
The keyword "template" isn't necessary when
printing a fully-qualified qualtype name, and, in fact,
results in a syntax error if one tries to use it. So stop
printing it.
Reviewers: rsmith, rnk
Subscribers: rnk, klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D17214
llvm-svn: 261005
Jun Bum Lim [Tue, 16 Feb 2016 20:02:39 +0000 (20:02 +0000)]
[AArch64] Add pass to remove redundant copy after RA
Summary:
This change will add a pass to remove unnecessary zero copies in target blocks
of cbz/cbnz instructions. E.g., the copy instruction in the code below can be
removed because the cbz jumps to BB1 when x0 is zero :
BB0:
cbz x0, .BB1
BB1:
mov x0, xzr
Jun
Reviewers: gberry, jmolloy, HaoLiu, MatzeB, mcrosier
Subscribers: mcrosier, mssimpso, haicheng, bmakam, llvm-commits, aemerson, rengolin
Differential Revision: http://reviews.llvm.org/D16203
llvm-svn: 261004
Quentin Colombet [Tue, 16 Feb 2016 19:26:02 +0000 (19:26 +0000)]
[GlobalISel] Re-apply r260922-260923 with MSVC-friendly code.
Original message:
Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.
llvm-svn: 260998
Reid Kleckner [Tue, 16 Feb 2016 19:16:28 +0000 (19:16 +0000)]
Exclude PCH/missing-file.cpp on Windows, it does not pass reliably
Tag the test with "REQUIRES: can-remove-opened-file", which is what we
use for the similar test Modules/explicit-build-missing-file.cpp.
llvm-svn: 260994
Reid Kleckner [Tue, 16 Feb 2016 19:16:20 +0000 (19:16 +0000)]
[typo-correction] Apply name specifier corrections when forming a NNS
Previously we would leave behind the old name specifier prefix, which
creates an invalid AST. Other callers of CorrectTypo update their
CXXScopeSpec objects with the correction specifier if one is present.
llvm-svn: 260993
Nico Weber [Tue, 16 Feb 2016 19:05:50 +0000 (19:05 +0000)]
clang-cl: Expose -isystem.
Like cl.exe, clang-cl allows adding system include directories via the
INCLUDE env var. Having a driver flag for this functionality is useful,
so add this too.
(In the future, we probably also want to have a flag alternative to
VCINSTALLDIR as used in MSVCToolChain::getVisualStudioBinaries(), and
a way to override the registry accesses in MSVCToolChain::getWindowsSDKDir()
-- maybe -ivcroot= and -iwinsdkroot=?).
llvm-svn: 260990
Rafael Espindola [Tue, 16 Feb 2016 18:50:12 +0000 (18:50 +0000)]
Pass a std::unique_ptr to IRMover::move.
It was already the one "destroying" the source module, now the API
reflects that.
llvm-svn: 260989
Derek Schuff [Tue, 16 Feb 2016 18:18:36 +0000 (18:18 +0000)]
[WebAssembly] Insert COPY_LOCAL between CopyToReg and FrameIndex DAG nodes
CopyToReg nodes don't support FrameIndex operands. Other targets select
the FI to some LEA-like instruction, but since we don't have that, we
need to insert some kind of instruction that can take an FI operand and
produces a value usable by CopyToReg (i.e. in a vreg). So insert a dummy
copy_local between Op and its FI operand. This results in a redundant
copy which we should optimize away later (maybe in the post-FI-lowering
peephole pass).
Differential Revision: http://reviews.llvm.org/D17213
llvm-svn: 260987
Tom Stellard [Tue, 16 Feb 2016 18:14:56 +0000 (18:14 +0000)]
[AMDGPU] Rename $dst operand to $vdst for VOP instructions.
Summary: This change renames output operand for VOP instructions from dst to vdst. This is needed to enable decoding named operands for disassembler.
Reviewers: vpykhtin, tstellarAMD, arsenm
Subscribers: arsenm, llvm-commits, nhaustov
Projects: #llvm-amdgpu-spb
Differential Revision: http://reviews.llvm.org/D16920
llvm-svn: 260986
Philip Reames [Tue, 16 Feb 2016 17:14:30 +0000 (17:14 +0000)]
Revert 260705, it appears to be causing pr26628
The root issue appears to be a confusion around what makeNoWrapRegion actually does. It seems likely we need two versions of this function with slightly different semantics.
llvm-svn: 260981
Rafael Espindola [Tue, 16 Feb 2016 16:46:31 +0000 (16:46 +0000)]
Don't create multiple .got.plt entries for the same symbol.
We were doing it for ifunc symbols.
llvm-svn: 260980
Andrey Turetskiy [Tue, 16 Feb 2016 16:41:38 +0000 (16:41 +0000)]
[X86] Enable the LEA optimization pass by default.
Differential Revision: http://reviews.llvm.org/D16877
llvm-svn: 260979
Dan Gohman [Tue, 16 Feb 2016 16:22:41 +0000 (16:22 +0000)]
[WebAssembly] Switch from RPO sorting to topological sorting.
WebAssembly doesn't require full RPO; topological sorting is sufficient and
can preserve more of the MachineBlockPlacement ordering. Unfortunately, this
still depends a lot on heuristics, because while we use the
MachineBlockPlacement ordering as a guide, we can't use it in places where
it isn't topologically ordered. This area will require further attention.
llvm-svn: 260978
Rafael Espindola [Tue, 16 Feb 2016 16:12:06 +0000 (16:12 +0000)]
Merge multiple tdata.* into a single section.
llvm-svn: 260977
Rafael Espindola [Tue, 16 Feb 2016 16:05:27 +0000 (16:05 +0000)]
Merge multiple .gcc_except_table.* into a single section.
llvm-svn: 260976
Marshall Clow [Tue, 16 Feb 2016 16:05:15 +0000 (16:05 +0000)]
Add some status
llvm-svn: 260975
Rafael Espindola [Tue, 16 Feb 2016 15:57:07 +0000 (15:57 +0000)]
Merge multiple .tbss.* sections into one output section.
llvm-svn: 260974
Aaron Ballman [Tue, 16 Feb 2016 15:35:51 +0000 (15:35 +0000)]
A signed bitfield's range is [-1,0], so assigning 1 is technically an overflow. However, the other bitfield requires a signed value (it supports negative offsets), so it is slightly better to retain a signed 1-bit bitfield and use -1 instead of 1. Silences an MSVC warning.
llvm-svn: 260973
Aaron Ballman [Tue, 16 Feb 2016 15:29:06 +0000 (15:29 +0000)]
Reverting r260922-260923; they cause link failures with MSVC.
http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/15436/steps/build/logs/stdio
http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/961/steps/build_llvm/logs/stdio
llvm-svn: 260972
Dan Gohman [Tue, 16 Feb 2016 15:17:21 +0000 (15:17 +0000)]
[WebAssembly] Create new registers instead of reusing old ones in RegStackify.
This avoids some complications updating LiveIntervals to be aware of the new
register lifetimes, because we can just compute new intervals from scratch
rather than describe how the old ones have been changed.
llvm-svn: 260971
Rafael Espindola [Tue, 16 Feb 2016 15:16:00 +0000 (15:16 +0000)]
Reapply r260489.
Original commit message:
[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.
The bits of r260488 it depends on have been committed.
llvm-svn: 260970
Tamas Berghammer [Tue, 16 Feb 2016 15:14:36 +0000 (15:14 +0000)]
Revert "Use BKPT instead of UDF for arm/thumb breakpoints"
This reverts commit
293c18e067d663e0fe93e6f3d800c2a4bfada2b0.
The BKPT instruction generates SIGBUS instead of SIGTRAP in the Linux
kernel on Nexus 6 - 5.1.1 (kernel version 3.10.40). Revert the CL
until we can figure out how can we hanble the SIGBUS or how to get
back a SIGTRAP using the BKPT instruction.
llvm-svn: 260969
Dan Gohman [Tue, 16 Feb 2016 15:14:23 +0000 (15:14 +0000)]
[WebAssembly] Implement support for custom NaN bit patterns.
llvm-svn: 260968
Rafael Espindola [Tue, 16 Feb 2016 14:50:39 +0000 (14:50 +0000)]
Introduce a getAsRange helper.
This requires making an error message a bit more generic, but that seems
a reasonable tradeoff.
Extracted from r260488 but simplified a bit.
llvm-svn: 260967
Marshall Clow [Tue, 16 Feb 2016 14:42:23 +0000 (14:42 +0000)]
Add some comments
llvm-svn: 260966
Tobias Grosser [Tue, 16 Feb 2016 14:37:24 +0000 (14:37 +0000)]
ScopDectect: Allow memory accesses with different element types by default (try 3)
First support for this feature was committed in r259784. Support for
loop invariant load hoisting with different types was added by
Johannes Doerfert in r260045 and r260886.
llvm-svn: 260965
Marshall Clow [Tue, 16 Feb 2016 14:35:56 +0000 (14:35 +0000)]
Added a (private) status page for the Jacksonville meeting
llvm-svn: 260964
Rafael Espindola [Tue, 16 Feb 2016 14:27:33 +0000 (14:27 +0000)]
Move DynRegionInfo out of the ELFDumper.
This reduces indentation in preparation to adding a bit more code to it.
Extracted from r260488.
llvm-svn: 260963
Rafael Espindola [Tue, 16 Feb 2016 14:17:48 +0000 (14:17 +0000)]
This reverts commit r260488 and r260489.
Original messages:
Revert "[readobj] Handle ELF files with no section table or with no program headers."
Revert "[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations."
r260489 depends on r260488 and among other issues r260488 deleted error
handling code.
llvm-svn: 260962
Vasileios Kalintiris [Tue, 16 Feb 2016 14:15:27 +0000 (14:15 +0000)]
Issue a warning instead of fatal errors when checks for libatomic fail.
This should fix PR26631, PR26622 and has the nice property that the addition
of the CheckLibcxxAtomic.cmake module acts as an NFC on the platforms of the
reporters (at least for the time being).
As these bug reports explain, CMake fails the atomic check because the
include headers might not exist in the host environment. We could
potentially point to the headers provided by libcxx itself.
llvm-svn: 260961
Rafael Espindola [Tue, 16 Feb 2016 13:12:55 +0000 (13:12 +0000)]
Start adding release notes for lld.
llvm-svn: 260960
Andrey Turetskiy [Tue, 16 Feb 2016 12:47:45 +0000 (12:47 +0000)]
[X86] PR26575: Fix LEA optimization pass.
Add a missing check for a type of address displacement operand of the load/store instruction being a candidate for LEA substitution.
Ref: https://llvm.org/bugs/show_bug.cgi?id=26575
Differential Revision: http://reviews.llvm.org/D17261
llvm-svn: 260959
Johannes Doerfert [Tue, 16 Feb 2016 12:36:14 +0000 (12:36 +0000)]
Replace getLoopForInst by getLoopForStmt
This patch was extracted from http://reviews.llvm.org/D13611.
llvm-svn: 260958
Alexey Bataev [Tue, 16 Feb 2016 12:13:49 +0000 (12:13 +0000)]
[OPENMP] Allow to use compound assignment operators.
Loop-based directives allow to use iterators as loop counters. Iterators are allowed to define their own operators. This patch allows to use compound assignment operators for iterators.
llvm-svn: 260957
Johannes Doerfert [Tue, 16 Feb 2016 12:11:03 +0000 (12:11 +0000)]
Set AST Build for all statements [NFC]
llvm-svn: 260956
Johannes Doerfert [Tue, 16 Feb 2016 12:10:42 +0000 (12:10 +0000)]
[FIX] LICM test case
llvm-svn: 260955
Alexey Bataev [Tue, 16 Feb 2016 11:18:12 +0000 (11:18 +0000)]
[OPENMP] Improved handling of pseudo-captured expressions in OpenMP.
Expressions inside 'schedule'|'dist_schedule' clause must be captured in
combined directives to avoid possible crash during codegen. Patch
improves handling of such constructs
llvm-svn: 260954
Haojian Wu [Tue, 16 Feb 2016 10:36:51 +0000 (10:36 +0000)]
[clang-tidy] Fix an assert failure in `modernize-loop-convert`.
Summary:
The test code will trigger following an assert failure:
assert.h assertion failed at LoopConvertUtils.cpp:560 in
bool clang::tidy::modernize::ForLoopIndexUseVisitor::TraverseMemberExpr(clang::MemberExpr*): ExprType->isPointerType() && "Operator-> returned non-pointer type"
Reviewers: alexfh
Differential Revision: http://reviews.llvm.org/D17287
llvm-svn: 260953
Haojian Wu [Tue, 16 Feb 2016 10:31:33 +0000 (10:31 +0000)]
[clang-tidy] Fix an assert failure of ForStmt in `readability-braces-around-statements` check.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17134
llvm-svn: 260952
Pavel Labath [Tue, 16 Feb 2016 09:58:50 +0000 (09:58 +0000)]
Bump up timeout in TestChangeProcessGroup
The test fails very rarely. I suspect this is simply because the inferior does not have enough
time to create the file under heavy load.
llvm-svn: 260951
Pavel Labath [Tue, 16 Feb 2016 09:58:47 +0000 (09:58 +0000)]
Mark TestLldbGdbServer.test_written_M_content_reads_back_correctly as flaky on linux
I believe the root cause is the asynchronous arrival of inferior stdio (pr25652).
llvm-svn: 260950
Benjamin Kramer [Tue, 16 Feb 2016 09:53:47 +0000 (09:53 +0000)]
[Hexagon] Hoist nonnull assert up.
Once a pointer is turned into a reference it cannot be nullptr, clang
rightfully warns about this assert being a tautology. Put the assert
before the reference is created.
llvm-svn: 260949
Alexander Kornienko [Tue, 16 Feb 2016 09:49:05 +0000 (09:49 +0000)]
[clang-tidy] Enhance modernize-redundant-void-arg check to apply fixes to header files
Fixes http://llvm.org/PR25894
Patch by Richard Thomson!
Differential revision: http://reviews.llvm.org/D16953
llvm-svn: 260948
Amaury Sechet [Tue, 16 Feb 2016 08:37:01 +0000 (08:37 +0000)]
Make sure the functions' range is empty before going through it in the LLVM C API test
llvm-svn: 260947
Mohit K. Bhakkad [Tue, 16 Feb 2016 08:33:37 +0000 (08:33 +0000)]
[Compiler-rt][MSan][MIPS] Resolve gethostbyname_r_erange for MIPS
Reviewers: eugenis, kcc, samsonov
Subscribers: jaydeep, sagar, llvm-commits
Differential Revision: http://reviews.llvm.org/D17135
llvm-svn: 260946
NAKAMURA Takumi [Tue, 16 Feb 2016 08:13:36 +0000 (08:13 +0000)]
clang-tools-extra/test/Unit/lit.site.cfg.in: Prune on_clone. I guess it has been unused since r188006.
llvm-svn: 260944
Craig Topper [Tue, 16 Feb 2016 07:45:07 +0000 (07:45 +0000)]
[X86] Fix typos. NFC
llvm-svn: 260943
Craig Topper [Tue, 16 Feb 2016 07:45:04 +0000 (07:45 +0000)]
[X86] Use range-based for loop. NFC
llvm-svn: 260942
Amaury Sechet [Tue, 16 Feb 2016 07:33:23 +0000 (07:33 +0000)]
Do some refactoring in constant generation in the C API echo test. NFC
llvm-svn: 260941
Craig Topper [Tue, 16 Feb 2016 07:28:03 +0000 (07:28 +0000)]
[X86] Fix typo in comment. NFC
llvm-svn: 260940
Amaury Sechet [Tue, 16 Feb 2016 07:08:49 +0000 (07:08 +0000)]
Generate functions in 2 steps in the C API echo test. NFC
llvm-svn: 260939
Junmo Park [Tue, 16 Feb 2016 06:46:58 +0000 (06:46 +0000)]
[SCEVExpander] Make findExistingExpansion smarter
Summary:
Extending findExistingExpansion can use existing value in ExprValueMap.
This patch gives 0.3~0.5% performance improvements on
benchmarks(test-suite, spec2000, spec2006, commercial benchmark)
Reviewers: mzolotukhin, sanjoy, zzheng
Differential Revision: http://reviews.llvm.org/D15559
llvm-svn: 260938
Argyrios Kyrtzidis [Tue, 16 Feb 2016 05:39:33 +0000 (05:39 +0000)]
[Frontend] Make sure WrapperFrontendAction updates CurrentInput after calling BeginSourceFileAction.
I don't have a test case to add unfortunately.
llvm-svn: 260937
Amaury Sechet [Tue, 16 Feb 2016 05:11:24 +0000 (05:11 +0000)]
Restore the capability to manipulate datalayout from the C API
Summary:
This consist in variosu addition to the C API:
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M);
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL);
LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T);
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: axw
Differential Revision: http://reviews.llvm.org/D17255
llvm-svn: 260936
Craig Topper [Tue, 16 Feb 2016 04:24:58 +0000 (04:24 +0000)]
[TableGen] Fix inconsistent spacing. NFC
llvm-svn: 260935
Craig Topper [Tue, 16 Feb 2016 04:24:56 +0000 (04:24 +0000)]
[TableGen] Stop passing by reference an integer that doesn't get modified. NFC
llvm-svn: 260934
Craig Topper [Tue, 16 Feb 2016 04:24:54 +0000 (04:24 +0000)]
[TableGen] Remove unused member variable. NFC
llvm-svn: 260933
Jason Molenda [Tue, 16 Feb 2016 04:20:56 +0000 (04:20 +0000)]
Fix buildbot failure because I got an include path wrong.
llvm-svn: 260932
Craig Topper [Tue, 16 Feb 2016 04:17:42 +0000 (04:17 +0000)]
Remove an unnecessary std::move to fix -Wpessimizing-move warning.
llvm-svn: 260931
Jason Molenda [Tue, 16 Feb 2016 04:14:33 +0000 (04:14 +0000)]
Add -Wimplicit-fallthrough command line option to clang in
the xcode project file to catch switch statements that have a
case that falls through unintentionally.
Define LLVM_FALLTHROUGH to indicate instances where a case has code
and intends to fall through. This should be in llvm/Support/Compiler.h;
Peter Collingbourne originally checked in there (r237766), then
reverted (r237941) because he didn't have time to mark up all the
'case' statements that were intended to fall through. I put together
a patch to get this back in llvm http://reviews.llvm.org/D17063 but
it hasn't been approved in the past week. I added a new
lldb-private-defines.h to hold the definition for now.
Every place in lldb where there is a comment that the fall-through
is intentional, I added LLVM_FALLTHROUGH to silence the warning.
I haven't tried to identify whether the fallthrough is a bug or
not in the other places.
I haven't tried to add this to the cmake option build flags.
This warning will only work for clang.
This build cleanly (with some new warnings) on macosx with clang
under xcodebuild, but if this causes problems for people on other
configurations, I'll back it out.
llvm-svn: 260930
NAKAMURA Takumi [Tue, 16 Feb 2016 03:17:13 +0000 (03:17 +0000)]
clang/test/Driver/ps4-linker-win.c: Tweak substitutions if %PATH% ends with '\\', or lit complains with "parser error".
llvm-svn: 260929
Craig Topper [Tue, 16 Feb 2016 02:48:30 +0000 (02:48 +0000)]
[TableGen] Use range-based for loop. NFC
llvm-svn: 260928
Vedant Kumar [Tue, 16 Feb 2016 02:14:44 +0000 (02:14 +0000)]
Simplify users of StringRef::{l,r}trim (clang) (NFC)
r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in clang.
llvm-svn: 260927
Vedant Kumar [Tue, 16 Feb 2016 02:06:01 +0000 (02:06 +0000)]
Simplify users of StringRef::{l,r}trim (NFC)
r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in llvm.
llvm-svn: 260926
Vedant Kumar [Tue, 16 Feb 2016 01:48:39 +0000 (01:48 +0000)]
[ADT] Add StringRef::{l,r}trim(char) overloads (NFC)
Add support for trimming a single kind of character from a StringRef.
This makes the common case of trimming null bytes much neater. It's also
probably a bit speedier too, since it avoids creating a std::bitset in
find_{first,last}_not_of.
llvm-svn: 260925
Quentin Colombet [Tue, 16 Feb 2016 01:38:09 +0000 (01:38 +0000)]
[GlobalISel][IRTranslator] Override getPassName.
llvm-svn: 260924
Quentin Colombet [Tue, 16 Feb 2016 01:05:16 +0000 (01:05 +0000)]
[GlobalISel] Add missing file in previous commit.
llvm-svn: 260923
Quentin Colombet [Tue, 16 Feb 2016 00:57:44 +0000 (00:57 +0000)]
[GlobalISel] Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.
llvm-svn: 260922
Akira Hatanaka [Tue, 16 Feb 2016 00:46:03 +0000 (00:46 +0000)]
Remove unnecessary regex in the test cases I fixed in r260496.
llvm-svn: 260921
Amaury Sechet [Tue, 16 Feb 2016 00:23:52 +0000 (00:23 +0000)]
Deprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr
Summary: The name is confusing as it matche another method on the module.
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17283
llvm-svn: 260920
Amaury Sechet [Tue, 16 Feb 2016 00:22:02 +0000 (00:22 +0000)]
Kill LLVMAddTargetData
Summary: It's red, it's dead.
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D17282
llvm-svn: 260919
NAKAMURA Takumi [Tue, 16 Feb 2016 00:17:56 +0000 (00:17 +0000)]
MITests: Update libdeps. llvm/Target/TargetOptions.h depends on MC.
llvm-svn: 260918