Commit Graph

219483 Commits

Author SHA1 Message Date
Xinliang David Li 891c51b75a [PGO] Introducing version mask macro/NFC
llvm-svn: 257224
2016-01-08 22:55:16 +00:00
Kostya Serebryany abc2c998d2 [tsan] don't crash on closedir(0)
llvm-svn: 257223
2016-01-08 22:48:19 +00:00
Richard Smith f7aeda1f07 [modules] Make sure we always include the contents of private headers when
building a module. Prior to this change, the private header's content would
only be included if the header were included by another header in the same
module. If not (if the private header is only used by the .cc files of the
module, or is included from outside the module via -Wno-private-header),
a #include of that file would be silently ignored.

llvm-svn: 257222
2016-01-08 22:36:45 +00:00
Dan Liew 9d49638f44 Teach the CMake build system to run lit's test suite. These can be run
directy with ``make check-lit`` and are run as part of
``make check-all``.

In principle we should run lit's testsuite before testing LLVM using lit
so that any problems with lit get discovered before testing LLVM so we
can bail out early.  However this implementation (``check-all`` runs all
tests together) seemed simpler and will still report failing lit tests.

Note that the tests and the configured ``lit.site.cfg`` have to be
copied into the build directory to avoid polluting the source tree.

llvm-svn: 257221
2016-01-08 22:36:22 +00:00
Rui Ueyama dba6b576cf COFF: Rename RoundUpToAlignment -> align.
llvm-svn: 257220
2016-01-08 22:24:26 +00:00
Zachary Turner c29de82956 Remove XFAIL from a few tests that have been fixed on Windows.
llvm-svn: 257219
2016-01-08 22:21:40 +00:00
Rui Ueyama 52c7c5fa3e Group members to match a comment. NFC.
llvm-svn: 257218
2016-01-08 22:20:00 +00:00
Rui Ueyama 131e0ffa10 Use shorter name. NFC.
llvm-svn: 257217
2016-01-08 22:17:42 +00:00
Rui Ueyama 683564ea63 Update comments.
llvm-svn: 257216
2016-01-08 22:14:15 +00:00
Tobias Edler von Koch ccd3bfc3c8 [Hexagon] Replace a static member variable in HexagonCVIResource (NFC)
This creates one instance of TUL per HexagonShuffler, which avoids thread-safety
issues with future changes.

llvm-svn: 257215
2016-01-08 22:07:25 +00:00
Rui Ueyama 8b4879aec0 Remove an empty constructor.
We used to have code in SymbolTable constructor to add entry symbols, etc.
That code has been moved to Driver. We can remove the constructor.

llvm-svn: 257214
2016-01-08 22:06:25 +00:00
Sanjay Patel 9f49b683e0 variable names start with an upper case letter; NFC
llvm-svn: 257213
2016-01-08 22:05:03 +00:00
Rui Ueyama b4de595c46 Add comments.
llvm-svn: 257212
2016-01-08 22:01:33 +00:00
Rui Ueyama 79c7373232 ELF: Consistently return SymbolBody * from SymbolTable::add functions.
For historical reasons, some add* functions for SymbolTable returns a
pointer to a SymbolBody, while some are not. This patch is to make them
consistently return a pointer to a newly added symbol.

llvm-svn: 257211
2016-01-08 21:53:28 +00:00
Jason Molenda fd4cea53d5 Re-apply r257117 (reverted in r257138 temporarily),
with the one change that ThreadPlanStepOut::ThreadPlanStepOut
will now only advance the return address breakpoint to
the end of a source line, if we have source line debug information.
It will not advance to the end of a Symbol if we lack source line
information.  This, or the recognition of the LEAVE instruction
in r257209, would have fixed the regression that Siva was seeing.
Both were good changes, so I've made both.

Original commit message:

Performance improvement: Change lldb so that it puts a breakpoint
on the first branch instruction after a function return (or the end
of a source line), instead of a breakpoint on the return address,
to skip an extra stop & start of the inferior process.

I changed Process::AdvanceAddressToNextBranchInstruction to not
take an optional InstructionList argument - no callers are providing
a cached InstructionList today, and if this function was going to
do that, the right thing to do would be to fill out / use a
DisassemblerSP which is a disassembler with the InstructionList for
this address range.


http://reviews.llvm.org/D15708
<rdar://problem/23309838> 

llvm-svn: 257210
2016-01-08 21:40:11 +00:00
Jason Molenda dae3c57189 Add support for the LEAVE x86 instruction to AssemblyParse_x86.
llvm-svn: 257209
2016-01-08 21:13:26 +00:00
Zachary Turner 256c457170 XFAIL 2 more tests based on SWIG version.
There's a bug in versions of SWIG prior to 3.0.8 that prevent
these tests from succeeding with Python 3.x

llvm-svn: 257208
2016-01-08 21:08:24 +00:00
Zachary Turner cb0c122ed7 Remove XFAIL from TestThreadStates on Windows.
llvm-svn: 257207
2016-01-08 21:08:19 +00:00
David Majnemer d2385c08cf [MS ABI] Complete and base constructor GlobalDecls must have the same name
Clang got itself into the situation where we mangled the same
constructor twice with two different constructor types.  After one of
the constructors were utilized, the tag used for one of the types
changed from class to struct because a class template became complete.
This resulted in one of the constructor types varying from the other
constructor.

Instead, force "base" constructor types to "complete" if the ABI doesn't
have constructor variants.  This will ensure that GlobalDecls for both
variants will get the same mangled name.

This fixes PR26029.

llvm-svn: 257205
2016-01-08 20:48:26 +00:00
Stephane Sezer 728384a05e Prevent infinite recursive loop in AppleObjCTrampolineHandler constructor
Summary:
When we construct AppleObjCTrampolineHandler, if m_impl_fn_addr is
invalid, we call CanJIT(). If the gdb remote process does not support
allocating and deallocating memory, this call stack will include a call
to the AppleObjCRuntime constructor. The AppleObjCRuntime constructor
will then call the AppleObjCTrampolineHandler constructor, creating a
recursive call loop that eventually overflows the stack and segfaults.

Avoid this call loop by not constructing the AppleObjCTrampolineHandler
within AppleObjCRuntime until we actually need to use it.

Reviewers: clayborg, jingham

Subscribers: sas, lldb-commits

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

Change by Francis Ricci <fjricci@fb.com>

llvm-svn: 257204
2016-01-08 20:32:35 +00:00
Rui Ueyama b705b10012 ELF: Remove dead code.
R_X86_64_PLT32 is handled in the same way as R_X86_64_PC32 by
relocateOne(), so this function does not seems to be needed.
Without this code, all tests still pass.

http://reviews.llvm.org/D15971

llvm-svn: 257203
2016-01-08 20:11:47 +00:00
Evgeniy Stepanov cfe331042a Fix CMake warning in CFI tests.
CFI tests do not require the CFI runtime library on Windows.
Do not add "cfi" as a dependency of "check-cfi" in that case.

llvm-svn: 257202
2016-01-08 20:04:01 +00:00
Evgeniy Stepanov 6922ab1ff6 Revert "Fix CMake warning in CFI tests."
This is a bit more complex than that.

llvm-svn: 257201
2016-01-08 19:56:45 +00:00
Sanjay Patel 1dc7dfb9d9 [DAGCombiner] don't dereference an operand that doesn't exist (PR26070)
The bug was introduced with changes for x86-64 fp128:
http://reviews.llvm.org/rL254653

I don't know why an x86 change is here, so I'll follow up in:
http://reviews.llvm.org/D15134

Should fix:
https://llvm.org/bugs/show_bug.cgi?id=26070

llvm-svn: 257200
2016-01-08 19:53:24 +00:00
Evgeniy Stepanov bec6f6b731 Fix CMake warning in CFI tests.
Fix incorrect condition for enabling the CFI tests. This removes the following CMake warnings on Windows:

The dependency target "cfi" of target "check-all" does not exist.
The dependency target "cfi" of target "check-cfi-and-supported" does not exist.

llvm-svn: 257199
2016-01-08 19:46:18 +00:00
Haicheng Wu a6a3279bd3 [JumpThreading] Split select that has constant conditions coming from the PHI node
Look for PHI/Select in the same BB of the form

bb:
  %p = phi [false, %bb1], [true, %bb2], [false, %bb3], [true, %bb4], ...
  %s = select p, trueval, falseval

And expand the select into a branch structure. This later enables
jump-threading over bb in this pass.

Using the similar approach of SimplifyCFG::FoldCondBranchOnPHI(), unfold
select if the associated PHI has at least one constant.  If the unfolded
select is not jump-threaded, it will be folded again in the later
optimizations.

llvm-svn: 257198
2016-01-08 19:39:39 +00:00
Justin Lebar fe88373dca Fix incorrectly line-broken comment in Driver.h.
Also sort includes.

llvm-svn: 257197
2016-01-08 19:28:34 +00:00
Matthias Braun 2072b28a06 LiveInterval: Adapt commen to the LI->LR change.
llvm-svn: 257196
2016-01-08 19:25:31 +00:00
Xinliang David Li bc1197e3ca Sync up InstrProfData.inc
llvm-svn: 257195
2016-01-08 19:22:05 +00:00
Xinliang David Li 2fbde4d022 Minor fix -- use the right version enum/NFC
llvm-svn: 257194
2016-01-08 19:21:32 +00:00
Evgeniy Stepanov c86b392078 Revert "Remove visibility attributes from out-of-class method definitions in iostreams."
llvm-svn: 257193
2016-01-08 19:21:02 +00:00
Tim Shen 9b68bd48ca Test commit access - add a blank line in comment.
llvm-svn: 257192
2016-01-08 19:20:23 +00:00
Justin Bogner e9fb228d59 LoopInfo: Simplify ownership of Loop objects
It's strange that LoopInfo mostly owns the Loop objects, but that it
defers deleting them to the loop pass manager. Instead, change the
oddly named "updateUnloop" to "markAsRemoved" and have it queue the
Loop object for deletion. We can't delete the Loop immediately when we
remove it, since we need its pointer identity still, so we'll mark the
object as "invalid" so that clients can see what's going on.

llvm-svn: 257191
2016-01-08 19:08:53 +00:00
Justin Lebar 23bcef990e Update code in buildCudaActions and BuildActions to latest idiom.
Summary:
Use llvm::any_of, llvm::find, etc.

No functional changes.

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 257190
2016-01-08 19:04:11 +00:00
Justin Lebar dc3ad6fc1c Add note about the "thread until" command to the llvm-gdb cheatsheet.
Differential Revision: http://reviews.llvm.org/D15684

llvm-svn: 257189
2016-01-08 18:56:18 +00:00
Weiming Zhao 4b3b13d3bc RBIT Instruction only available for ARMv6t2 and above.
Summary:
r255334 matches bit-reverse pattern in InstCombine and generates calls to Instrinsic::bitreverse.

RBIT instruction is only available for ARMv6t2 and above. This patch has the intrinsic expanded during legalization for ARMv4 and ARMv5.

Patch by Z. Zheng <zhaoshiz@codeaurora.org>

Reviewers: apazos, jmolloy, weimingz

Subscribers: aemerson, rengolin, llvm-commits

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

llvm-svn: 257188
2016-01-08 18:43:41 +00:00
Weiming Zhao 48c033e021 Disable shrink-wrap for Thumb1
Summary: In ARMConstantIslandPass, which runs after Shrink Wrap pass, long jumps will be fixed up as BL (tBfar) which depends on spilling LR in epilogue.  However, shrink-wrap may remove the LR, which causes issues when the function returns.

Reviewers: qcolombet, rengolin

Subscribers: aemerson, rengolin

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

llvm-svn: 257187
2016-01-08 18:37:43 +00:00
Adrian McCarthy 6788b62f09 Treat an embedded int3/__debugbreak() as a breakpoint on Windows, includes a cross-platform test.
llvm-svn: 257186
2016-01-08 18:28:03 +00:00
Easwaran Raman 7f18729039 Remove CloningDirector and associated code
With the removal of the old landing pad code in r249918, CloningDirector is not
 used anywhere else. NFCI.

llvm-svn: 257185
2016-01-08 18:23:17 +00:00
Pirama Arumuga Nainar bf5ccdccb2 Do not ASSERTZEXT for i16 result of bitcast from f16 operand
Summary:
During legalization if i16, do not ASSERTZEXT the result of FP_TO_FP16.
Directly return an FP_TO_FP16 node with return type as the
promote-to-type of i16.

This patch also removes extraneous length check.  This legalization
should be valid even if integer and float types are of different
lengths.

This patch breaks a hard-float test for fp16 args.  The test is changed
to allow a vmov to zero-out the top bits, and also ensure that the
return value is in an FP register.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

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

llvm-svn: 257184
2016-01-08 17:46:05 +00:00
Nico Weber 2beaab358c Make ubsan suppression test pass on Windows.
llvm-svn: 257183
2016-01-08 17:26:03 +00:00
David Majnemer 2a6368f609 [WinEH] CatchHandler which don't have catch objects in StackColoring
StackColoring rewrites the frame indicies of operations involving
allocas if it can find that the life time of two objects do not overlap.
MSVC EH needs to be kept aware of this if happens in the event that a
catch object has moved around.  However, we represent the non-existance
of a catch object with a sentinel frame index (INT_MAX).  This sentinel
also happens to be the EmptyKey of the SlotRemap DenseMap.  Testing for
whether or not we need to translate the frame index fails in this case
because we call the count method on the DenseMap with the EmptyKey,
leading to assertions.  Instead, check if it is our sentinel value
before trying to look into the DenseMap.

This fixes PR26073.

llvm-svn: 257182
2016-01-08 17:24:47 +00:00
Teresa Johnson 1b00f2d99a [ThinLTO] Use new in-place symbol changes for exporting module
Due to the new in-place ThinLTO symbol handling support added in
r257174, we now invoke renameModuleForThinLTO on the current
module from within the FunctionImport pass.

Additionally, renameModuleForThinLTO no longer needs to return the
Module as it is performing the renaming in place on the one provided.

This commit will be immediately preceeded by a companion clang patch to
remove its invocation of renameModuleForThinLTO.

llvm-svn: 257181
2016-01-08 17:06:29 +00:00
Paul Robinson d4db94846a How to close a review manually.
llvm-svn: 257180
2016-01-08 17:05:12 +00:00
Teresa Johnson 4b4f4b90ed [ThinLTO] Leverage new in-place renaming support
Due to the new in-place renaming support added in r257174, we no
longer need to invoke ThinLTO global renaming from clang. It will be
invoked on the module in the FunctionImport pass (by an immediately
following llvm commit).

As a result, we don't need to load the FunctionInfoIndex as early,
so that is moved down into EmitAssemblyHelper::EmitAssembly.

llvm-svn: 257179
2016-01-08 17:04:29 +00:00
Alexander Kornienko b816ba0fb3 [clang-tidy] Add non-inline function definition and variable definition check in header files.
Summary: The new check will find all functionand variable definitions which may violate cpp one definition rule in header file.

Reviewers: aaron.ballman, alexfh

Subscribers: aaron.ballman, cfe-commits

Patch by Haojian Wu!

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

llvm-svn: 257178
2016-01-08 16:37:11 +00:00
Aaron Ballman c00ad6c5fb Disable part of the misc-move-constructor-init checker when the check is enabled through cert-oop11-cpp. The CERT guideline does not cover moveable parameters as part of the OOP11-CPP recommendation, just copy construction from move constructors.
llvm-svn: 257177
2016-01-08 15:50:51 +00:00
Alexander Kornienko b1b2f87e37 [clang-tidy] Use proper capitalization and punctuation for diagnostic messages.
Use diagnostic parameters where possible instead of string concatenation.

llvm-svn: 257176
2016-01-08 15:21:40 +00:00
Tom Stellard 0e04f6c30f Driver: Use the new ELF lld linker for AMDGPU
Summary: 'gnu-old' has been deprecated in favor or 'gnu'.

Reviewers: arsenm, ruiu, rafael

Subscribers: cfe-commits

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

llvm-svn: 257175
2016-01-08 15:14:31 +00:00
Teresa Johnson 4504c1bc80 [ThinLTO] Enable in-place symbol changes for exporting module
Summary:
Move ThinLTO global value processing functions out of ModuleLinker and
into a new ThinLTOGlobalProcessor class, which performs any necessary
linkage and naming changes on the given module in place.

As a result, renameModuleForThinLTO no longer needs to create a new
Module when performing any necessary local to global promotion on a
module that we are possibly exporting from during a ThinLTO backend
compilation.

During function importing the ThinLTO processing is still invoked from
the ModuleLinker (via the new class), as it needs to perform renaming and
linkage changes on the source module, e.g. in order to get the correct
renaming during local to global promotion.

Reviewers: joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

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

llvm-svn: 257174
2016-01-08 15:00:00 +00:00