Commit Graph

210154 Commits

Author SHA1 Message Date
Chris Bieneman 7482709974 [CMake] Making the bootstrap-clear target always delete the boostrap build directories.
llvm-svn: 247436
2015-09-11 17:38:38 +00:00
David Majnemer 0e70598a5b [X86] Make sure startproc/endproc are paired
We used different conditions to determine if we should emit startproc vs
endproc.  Use the same condition to ensure that they will always be
paired.

This fixes PR24374.

llvm-svn: 247435
2015-09-11 17:34:34 +00:00
Reid Kleckner 9e8f2b46b2 Update test expectations for LLVM asm printing change
llvm-svn: 247434
2015-09-11 17:27:53 +00:00
Reid Kleckner 5dbee7baef [IR] Print the label operands of a catchpad like an invoke
The rest of the EH pads are fine, since they have at most one label and
take fewer operands for the personality.

Old catchpad vs. new:
  %5 = catchpad [i8* bitcast (i32 ()* @"\01?filt$0@0@main@@" to i8*)] to label %__except.ret.10 unwind label %catchendblock.9
-----
  %5 = catchpad [i8* bitcast (i32 ()* @"\01?filt$0@0@main@@" to i8*)]
          to label %__except.ret.10 unwind label %catchendblock.9

llvm-svn: 247433
2015-09-11 17:27:52 +00:00
Adrian Prantl 5c8bd88a4c Module Debugging: Emit forward declarations for types that are defined in
clang modules, if -dwarf-ext-refs (DebugTypesExtRefs) is specified.

This reimplements r247369 in about a third of the amount of code.
Thanks to David Blaikie pointing this out in post-commit review!

llvm-svn: 247432
2015-09-11 17:23:08 +00:00
Adrian Prantl ca8441810f Revert "Module Debugging: Emit forward declarations for types that are defined in"
This reverts commit r247369 to facilitate reviewing of the following patch.

llvm-svn: 247431
2015-09-11 17:23:03 +00:00
Gabor Horvath 4df9d8128b [Static Analyzer] Properly clean up the dynamic type information for dead regions.
Differential Revision: http://reviews.llvm.org/D12767

llvm-svn: 247430
2015-09-11 17:19:57 +00:00
Ahmed Bougacha 5246867384 [CodeGen] Refactor TLI/AtomicExpand interface to make LLSC explicit.
We used to have this magic "hasLoadLinkedStoreConditional()" callback,
which really meant two things:
- expand cmpxchg (to ll/sc).
- expand atomic loads using ll/sc (rather than cmpxchg).

Remove it, and, instead, introduce explicit callbacks:
- bool shouldExpandAtomicCmpXchgInIR(inst)
- AtomicExpansionKind shouldExpandAtomicLoadInIR(inst)

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

llvm-svn: 247429
2015-09-11 17:08:28 +00:00
Ahmed Bougacha 9d677131c4 [CodeGen] Rename AtomicRMWExpansionKind to AtomicExpansionKind.
This lets us generalize its usage to the other atomic instructions.

llvm-svn: 247428
2015-09-11 17:08:17 +00:00
NAKAMURA Takumi 25b5bd27ea [PR24785] Appease MSC18 to tweak optimizations.
This brings a warning.

  cl : Command line warning D9035: option 'Og-' has been deprecated and will be removed in a future release

We should resolve PR11951 to remove this tweak.

llvm-svn: 247427
2015-09-11 17:08:02 +00:00
Gabor Horvath 15843343b6 [Static Analyzer] Lambda support.
Differential Revision: http://reviews.llvm.org/D12652

llvm-svn: 247426
2015-09-11 16:55:01 +00:00
Kostya Serebryany 6292128698 [libFuzzer] mention more trophies
llvm-svn: 247425
2015-09-11 16:34:14 +00:00
Reid Kleckner fb06c84be8 [SEH] Port __try / __leave test to new IR
It turns out that the IR we already generate for __leave is fine, so no
code changes were needed.

llvm-svn: 247424
2015-09-11 16:29:27 +00:00
Gabor Horvath 3943adb57f [Static Analyzer] Minor cleanups for the nullability checker.
Differential Revision: http://reviews.llvm.org/D12619

llvm-svn: 247423
2015-09-11 16:29:05 +00:00
Daniel Sanders 715f8f1332 [mips] Add missing disassembler tests for MIPS64-MIPS64R5.
llvm-svn: 247422
2015-09-11 16:24:11 +00:00
Vedant Kumar db609471ce [CodeGen] Teach SimplifyPersonality about the updated LandingPadInst
When uses of personality functions were moved from LandingPadInst to
Function, we forgot to update SimplifyPersonality(). This patch corrects
that.

Note: SimplifyPersonality() is an optimization which replaces
personality functions with the default C++ personality when possible.
Without this update, some ObjC++ projects fail to link against C++
libraries (seeing as the exception ABI had effectively changed).

rdar://problem/22155434

llvm-svn: 247421
2015-09-11 15:40:05 +00:00
Daniel Sanders 9676db005e [mips] Add missing MIPS32 - MIPS32R5 disassembler tests.
llvm-svn: 247420
2015-09-11 15:28:19 +00:00
Sylvestre Ledru 3e94031632 Update autoconf too: Analysis/TempScopInfo.cpp has been removed
llvm-svn: 247419
2015-09-11 15:05:29 +00:00
Daniel Sanders aba4daab10 [mips] Attempt to fix llvm-s390x-linux1
It doesn't seem to like the '|&' in the test command.

llvm-svn: 247418
2015-09-11 14:57:54 +00:00
Daniel Sanders 9bbda77006 [mips] Add missing MIPS-IV disassembler tests.
llvm-svn: 247417
2015-09-11 14:54:58 +00:00
Daniel Sanders ff338fa355 [mips] Add missing MIPS-III disassembler tests.
llvm-svn: 247416
2015-09-11 14:48:46 +00:00
Arnaud A. de Grandmaison ba4e977cff Tweak 2 x86 gold tests so they can run on non-x86 platforms
llvm-svn: 247415
2015-09-11 14:45:34 +00:00
Daniel Sanders 3b571d05f8 [mips] Add missing MIPS-II disassembler tests.
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723)
and were verified by checking the disassembler output is accepted by GAS.

llvm-svn: 247414
2015-09-11 14:34:41 +00:00
Adhemerval Zanella 0563686a1c [compiler-rt] [sanitizers] Add VMA size check at runtime
This patch adds a runtime check for asan, dfsan, msan, and tsan for
architectures that support multiple VMA size (like aarch64).  Currently
the check only prints a warning indicating which is the VMA built and
expected against the one detected at runtime.

llvm-svn: 247413
2015-09-11 13:55:00 +00:00
Michael Kruse 07d5df4db8 Fix out-of-range access in test case
The function use_after_scop would iterate from 0 to 1024 and accessing element A[1024] where A has only valid indexes from 0 to 1023. Polly detects the situation of unconditionally undefined behavior and bail out in ScopInfo as non-feasible for optimization.

Other tests add impossible context assumptions as well, hance might show the same problem.

llvm-svn: 247412
2015-09-11 13:45:05 +00:00
Ed Maste 8bc3f5cd50 Demote TestAttachResume back to @expectedFailureFreeBSD
It turns out it fails consistently for me.

llvm.org/pr19310

llvm-svn: 247411
2015-09-11 13:43:07 +00:00
Yaron Keren d2fc591c0b This test requires UTF-8 output to print the UT-8 characters.
llvm-svn: 247410
2015-09-11 13:29:12 +00:00
Yaron Keren 102e3ce5b3 Add #include llvm-config.h to Locale.cpp which depends on LLVM_ON_WIN32.
Source code was assuming that llvm-config.h would be included somehow but
up to r247253 that added #include "llvm/Support/Compiler.h" to StringRef.h
the config file was not actually included. The inclusion of llvm-config.h
caused a change of behaviour in tools/clang/test/Frontend/source-col-map.c:
previously it would output the original UTF-8 but now it outputs <U+03B1>.

llvm-svn: 247409
2015-09-11 13:22:47 +00:00
Rafael Espindola d67bb26642 Add more information to a comment.
llvm-svn: 247408
2015-09-11 13:20:07 +00:00
Daniel Sanders 44c1d0c4f1 Re-commit r247405: [mips] Add missing MIPS-I disassembler tests.
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723)
and verified by checking the disassembler output is accepted by GAS.

The problematic tests from the previous commit have been moved to
valid-xfail.txt for now.

Also, give invalid instructions some coverage. invalid-xfail.txt contains
instructions that should be invalid but successfully disassemble.

llvm-svn: 247407
2015-09-11 12:59:03 +00:00
Daniel Sanders c6a2034d0f Revert r247405: [mips] Add missing MIPS-I disassembler tests.
A small number of the added tests have operands that change on each round trip.

llvm-svn: 247406
2015-09-11 12:42:38 +00:00
Daniel Sanders f05bf32b38 [mips] Add missing MIPS-I disassembler tests.
These tests were found by llvm-mc-fuzzer (see http://reviews.llvm.org/D12723)
and verified by checking the disassembler output is accepted by GAS.

llvm-svn: 247405
2015-09-11 12:24:06 +00:00
Aaron Ballman b85be665b0 Fixed HasDeclarationMatcher to properly convert all types into decls where possible. Added objcObjectPointerType(), objcInterfaceDecl(), templateTypeParmType(), injectedClassNameType(), and unresolvedUsingTypenameDecl(). Updated documentation for pointerType() to call out that it does not match ObjCObjectPointerType types. Changed pointsTo() to handle ObjCObjectPointerType as well as PointerType.
While this may seem like a lot of unrelated changes, they all relate back to fixing HasDeclarationMatcher.

This now allows us to write a matcher like:

varDecl(hasType(namedDecl(hasName("Foo"))))

that matches code using typedefs, objc interfaces, template type parameters, injected class names, or unresolved using typenames.

llvm-svn: 247404
2015-09-11 11:51:24 +00:00
Bruce Mitchener 13ce0fd140 [lldb-mi] No need to call Format with no varargs.
Summary:
There's no need to call CMIUtilString::Format
with a string and no args.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 247403
2015-09-11 11:17:30 +00:00
Bruce Mitchener 82fd1f7d6c Clean up build of JITLoader/GDB in autoconf build.
Summary:
This builds on all platforms, so remove duplication in build
configuration.

Reviewers: labath, clayborg, emaste

Subscribers: lldb-commits

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

llvm-svn: 247402
2015-09-11 10:37:17 +00:00
Alexey Bataev c71a4099cf [OPENMP] Preserve alignment of the original variables for the captured references.
Patch makes codegen to preserve alignment of the shared variables captured and used in OpenMP regions.

llvm-svn: 247401
2015-09-11 10:29:41 +00:00
Tamas Berghammer c7776e4139 Improve the arm/aarch64 mapping symbol handling
Change the mapping symbol handling to handle the case when the mapping
symbols are prefixed with an arbitrary prefix. This isn't strictly standard
compliance, but if all symbols in an object file is prefixed with objcopy
then the prefix will be added to the mapping symbol also. We still want to
treat these symbols as mapping symbols to get the correct address class data.

Differential revision: http://reviews.llvm.org/D12755

llvm-svn: 247400
2015-09-11 10:04:00 +00:00
Angel Garcia Gomez bb9ca54bbe Another patch for modernize-loop-convert.
Summary:
1. Avoid converting loops that iterate over the size of a container and don't use its elements, as this would result in an unused-result warning.
2. Never capture the elements by value on lambdas, thus avoiding doing unnecessary copies and errors with non-copyable types.
3. The 'const auto &' instead of 'auto &' substitution on const containers now works on arrays and pseudoarrays as well.
4. The error about multiple replacements in the same macro call is now documented in the tests (not solved though).
5. Due to [1], I had to add a dummy usage of the range element (like "(void) *It;" or similars) on the tests that had empty loops.
6. I removed the braces from the CHECK comments. I think that there is no need for them, and they confuse vim.

Reviewers: klimek

Subscribers: alexfh, cfe-commits

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

llvm-svn: 247399
2015-09-11 10:02:07 +00:00
Michael Kruse ef3cf01d1c Add Polly header files to IDE projects
llvm-svn: 247398
2015-09-11 09:01:55 +00:00
NAKAMURA Takumi 6d14f6aa4e clang/test/Modules/ExtDebugInfo.cpp: Use %itanium_abi_triple.
llvm-svn: 247397
2015-09-11 08:56:12 +00:00
NAKAMURA Takumi 5f901426e2 clang/test/Modules/ExtDebugInfo.cpp: Use [[@LINE]].
llvm-svn: 247396
2015-09-11 08:53:29 +00:00
NAKAMURA Takumi 8061e8645f PPCFrameLowering::emitEpilogue(): Avoid manipulating MBBI on iterator end.
It caused crash in MachineInstr::hasPropertyInBundle() since r247237.

llvm-svn: 247395
2015-09-11 08:20:56 +00:00
NAKAMURA Takumi d7df405580 clang-tidy/misc-sizeof-container.cpp: Add explicit triple.
For targeting LLP64, like Windows x86, size_t is not unsigned long.

  tools/clang/tools/extra/test/clang-tidy/Output/misc-sizeof-container.cpp.tmp.cpp:33:12: error: target of using declaration conflicts with declaration already in scope [clang-diagnostic-error]
  using std::size_t;
             ^

llvm-svn: 247394
2015-09-11 08:16:30 +00:00
NAKAMURA Takumi c3115d1c28 clang-tidy/readability-inconsistent-declaration-parameter-name.cpp: Appease MS-incompatibility [-fno-delayed-template-parsing]
llvm-svn: 247393
2015-09-11 08:16:22 +00:00
NAKAMURA Takumi 62f0eb53f1 Fix \param in r247251. [-Wdocumentation]
llvm-svn: 247392
2015-09-11 08:13:32 +00:00
NAKAMURA Takumi ecc73e7806 Fix llvm/test/tools/gold/X86/bad-alias.ll.
llvm-svn: 247391
2015-09-11 08:03:17 +00:00
Bruce Mitchener 6a706b7055 [lldb-mi] Fix failure in log file initialization.
I broke this in r247388.

llvm-svn: 247390
2015-09-11 08:02:50 +00:00
Alexey Bataev ed5fb67ad1 [OPENMP] Fix printing of array section with single index.
llvm-svn: 247389
2015-09-11 04:54:28 +00:00
Bruce Mitchener cf1baae6b8 [lldb-mi] Remove MIUtilSystem*.
Summary:
This platform-specific code wasn't fully implemented and wasn't
actually needed. There was one call for the log file path and
that has been addressed.

This lets us also remove an error message from MICmnLogMediumFile
as it is no longer used.

Reviewers: ki.stfu, domipheus, abidh

Subscribers: lldb-commits

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

llvm-svn: 247388
2015-09-11 04:50:44 +00:00
Rui Ueyama 5b93aa51de COFF: Teach ICF to merge cyclic graphs.
Previously, LLD's ICF couldn't merge cyclic graphs. That was unfortunate
because, in COFF, cyclic graphs are not exceptional at all. That is
pretty common.

In this patch, sections are grouped by Tarjan's strongly connected
component algorithm to get acyclic graphs. And then we try to merge
SCCs whose outdegree is zero, and remove them from the graph. This
makes other SCCs to have outdegree zero, so we can repeat the
process until all SCCs are removed. When comparing two SCCs, we handle
cycles properly.

This algorithm works better than previous one. Previously, self-linking
produced a 29.0MB executable. It now produces a 27.7MB. There's still some
gap compared to MSVC linker which produces a 27.1MB executable for the
same input. So the gap is narrowed, but still LLD is not on par with MSVC.
I'll investigate that later.

llvm-svn: 247387
2015-09-11 04:29:03 +00:00