Commit Graph

191641 Commits

Author SHA1 Message Date
Rafael Espindola 093dcc43f7 Use isMergeableConst now that it is sane.
llvm-svn: 227441
2015-01-29 14:23:28 +00:00
Rafael Espindola 33804cac96 Remove MergeableConst.
Only the specific ones (MergeableConst4, MergeableConst8, MergeableConst16) are
handled specially.

llvm-svn: 227440
2015-01-29 14:12:41 +00:00
James Molloy 5f255eb48f [LoopReroll] Refactor most of reroll() into a helper class
reroll() was slightly monolithic and a pain to modify. Refactor
a bunch of its state from local variables to member variables
of a helper class, and do some trivial simplification while we're
there.

llvm-svn: 227439
2015-01-29 13:48:05 +00:00
Francois Pichet b4c7a47cd8 Fix Index/print-type.cpp test following r227432.
llvm-svn: 227438
2015-01-29 13:33:44 +00:00
Alex Rosenberg c235500295 Cleanup a few tests on sse4a machines and FileCheckize along the way.
llvm-svn: 227437
2015-01-29 13:31:32 +00:00
Benjamin Kramer eb63e4d6f8 EHPrepare: Remove leftover initialization code for DomTrees.
While there modernize some loops. NFC.

llvm-svn: 227436
2015-01-29 13:26:50 +00:00
Rafael Espindola e2d4b2df39 Use enum values. NFC.
llvm-svn: 227435
2015-01-29 13:25:44 +00:00
NAKAMURA Takumi 4b643c23fd Disable a couple of crash-* tests for now. It seems they might be incompatible to win32.
llvm-svn: 227434
2015-01-29 13:23:23 +00:00
Daniel Jasper 0955cb41eb clang-format: FIXME that led to access of uninitialized memory.
I have so far not succeeded in finding a nicely reduced test case or an
observable difference which could help me create a test failure without
msan.

Committing without test to unblock kcc's further fuzzing progress.

llvm-svn: 227433
2015-01-29 13:11:47 +00:00
Francois Pichet f3be1cc5a9 libclang: Add three functions useful for dealing with anonymous fields:
clang_Cursor_getOffsetOfField
   clang_Cursor_isAnonymous
   clang_Type_visitFields
Python: Add corresponding methods for dealing with anonymous fields.

Patch by Loïc Jaquemet

llvm-svn: 227432
2015-01-29 12:45:29 +00:00
Rafael Espindola fad3901095 Don't create multiple mergeable sections with -fdata-sections.
ELF has support for sections that can be split into fixed size or
null terminated entities.

Since these sections can be split by the linker, it is not necessary
to split them in codegen.

This reduces the combined .o size in a llvm+clang build from
202,394,570 to 173,819,098 bytes.

The time for linking clang with gold (on a VM, on a laptop) goes
from 2.250089985 to 1.383001792 seconds.

The flip side is the size of rodata in clang goes from 10,926,785
to 10,929,345 bytes.

The increase seems to be because of http://sourceware.org/bugzilla/show_bug.cgi?id=17902.

llvm-svn: 227431
2015-01-29 12:43:28 +00:00
Vladimir Medic df464ae224 [Mips][Disassembler] When disassembler meets cache/pref instructions for r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method for R6 CACHE_HINT_DESC class that properly handles decoding of these instructions.
llvm-svn: 227430
2015-01-29 11:33:41 +00:00
Charlie Turner ed76a05c4d Add a missing Tag_DIV_use test for Cortex-M7.
llvm-svn: 227429
2015-01-29 11:19:54 +00:00
NAKAMURA Takumi 8182818a53 CommandLineParser: Avoid non-static member nitializer(s).
llvm-svn: 227428
2015-01-29 11:06:59 +00:00
Daniel Jasper 47b35aeaa1 clang-format: Fix crasher caused by not properly setting dry-run.
llvm-svn: 227427
2015-01-29 10:47:14 +00:00
David Majnemer 310e3a8f60 MS ABI: Implement proper support for setjmp
On targets which use the MSVCRT, setjmp is a macro which expands to
_setjmp or _setjmpex.

_setjmp and _setjmpex have a secret, hidden argument which is not listed
in the function prototype on X64 and WoA.  This hidden argument always
seems to be the frame pointer.

_setjmpex isn't used on X86, _setjmp is magically replaced with a call
to _setjmp3.  The second argument is zero for 'normal' setjmp/longjmp
pairs, otherwise it is a count of additional variadic arguments.  This
is used when setjmp appears inside of a try or __try.

It is not safe to use a pointer to setjmp because _setjmp, _setjmpex and
_setmp3 are not compatible with setjmp.

llvm-svn: 227426
2015-01-29 09:29:21 +00:00
David Majnemer b9bf14c549 Basic: Re-sort these builtins
No functional change, it just makes it a little easier to find what you
are looking for.

llvm-svn: 227425
2015-01-29 09:29:17 +00:00
Owen Anderson c4d245c391 Fix the preprocessor checks used to determine if backtraces have been enabled.
llvm-svn: 227424
2015-01-29 07:53:13 +00:00
Owen Anderson 9253bb933a Use the existing build configuration parameter ENABLE_BACKTRACE to compile out all pretty stack trace support when backtraces are disabled.
This has the nice secondary effect of allowing LLVM to continue to build
for targets without __thread or thread_local support to continue to work
so long as they build without support for backtraces.

llvm-svn: 227423
2015-01-29 07:35:31 +00:00
Simon Atanasyan 99cd1fb012 [ELFYAML] Provide default value 0 for YAML relocation addendum field
Follow up to r227318.

llvm-svn: 227422
2015-01-29 06:56:24 +00:00
Jason Molenda 3db7ebc87f If lldb is being built with ASAN instrumentation, have lldb
create its own threads with 8MB additional maximum stack size.
Extra room is needed for the bookkeeping needed for this 
instrumentation.

llvm-svn: 227421
2015-01-29 06:28:36 +00:00
Nico Weber 6cf2df29e7 Make a codegen warning a real warning instead of a getCustomDiagID().
Warnings shouldn't use getCustomDiagID(), since then they can't be disabled
via a flag, can't be remapped, etc.

llvm-svn: 227420
2015-01-29 06:25:59 +00:00
Jason Molenda 9a435729b4 When starting a kernel debug session (PlatformDarwinKernel), scan
for executable binaries on the local filesystem so the user doesn't
need to provide the path to the correct binary manually.

Also have lldb search for kexts/the kernel in the current working
directory in addition to all the usual places.

<rdar://problem/18126501> 

llvm-svn: 227419
2015-01-29 06:20:05 +00:00
Francisco Lopes da Silva 8cafefaef2 Sema: Turn some applicable functions static. NBC.
llvm-svn: 227418
2015-01-29 05:54:59 +00:00
Richard Smith 99335be950 Don't use BCPL comments here, in case someone wants to use <stdatomic.h> from C89 mode.
llvm-svn: 227417
2015-01-29 03:34:39 +00:00
Kostya Serebryany 3c052cc051 [asan] use getrusage as an alternative to reading /proc/self/statm. Also move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself)
llvm-svn: 227416
2015-01-29 02:54:39 +00:00
Chandler Carruth a1a622746e Remove an unused private field added r227405 to fix a Clang warning.
llvm-svn: 227415
2015-01-29 02:44:53 +00:00
Chandler Carruth 9cefa9ac2d [LPM] Try again to appease powerpc64 in its self host. I've been unable
to get a powerpc64 host so that I can reproduce and test this, but it
only impacts that platform so trying the only other realistic option.

According to Ulrich, who debugged this initially, initial-exec is likely
to be sufficient for our needs and not subject to this bug. Will watch
the build bots to see.

If this doesn't work, I'll be forced to cut a really ugly pthread-based
approach into the primary user (our stack trace printing) as that user
cannot use the ThreadLocal implementation due to lifetime issues.

llvm-svn: 227414
2015-01-29 02:34:17 +00:00
Alexey Samsonov 7f25a40550 [ASan] Generalize/simplify lit test configs generation.
llvm-svn: 227413
2015-01-29 02:28:53 +00:00
Chandler Carruth 76797c935b [LPM] Fix an "obvious" typo from r227411. Really sorry for the noise.
Too many cases to compile everything quickly.

llvm-svn: 227412
2015-01-29 01:29:22 +00:00
Chandler Carruth fb3139ad9e [LPM] Clean up the use of TLS in pretty stack trace and disable it
entirely when threads are not enabled. This should allow anyone who
needs to bootstrap or cope with a host loader without TLS support to
limp along without threading support.

There is still some bug in the PPC TLS stuff that is not worked around.
I'm getting access to a machine to reproduce and debug this further.
There is some chance that I'll have to add a terrible workaround for
PPC.

There is also some problem with iOS, but I have no ability to really
evaluate what the issue is there. I'm leaving it to folks maintaining
that platform to suggest a path forward -- personally I don't see any
useful path forward that supports threading in LLVM but does so without
support for *very basic* TLS. Note that we don't need more than some
pointers, and we don't need constructors, destructors, or any of the
other fanciness which remains widely unimplemented.

llvm-svn: 227411
2015-01-29 01:23:04 +00:00
Rui Ueyama 9244d95fd8 Fix MSVC C4060 warning (switch statement contains no case or default).
llvm-svn: 227410
2015-01-29 00:56:24 +00:00
Eric Christopher cc7ff50e43 Ensure that -fsyntax-only with fortran 90 passes along silently
to the underlying gcc.
PR22234

Patch by Artem Belevich.

llvm-svn: 227409
2015-01-29 00:56:17 +00:00
Reid Kleckner 8fcb0ad8a6 Remove unused variable
llvm-svn: 227408
2015-01-29 00:55:44 +00:00
Johannes Doerfert cf0e05a58f [FIX] Correct two C snippets in test cases
llvm-svn: 227407
2015-01-29 00:50:46 +00:00
Derek Schuff 71658bd15e Remove NaClX86_64TargetCodeGenInfo and NaClARMTargetCodeGenInfo
Summary:
They just existed before to use NaCl's custom ABIInfos; now that those are gone,
the custom TargetCodeGenInfos are no longer needed either.

Test Plan: don't break the existing tests

Reviewers: jvoung

Subscribers: jfb, cfe-commits

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

llvm-svn: 227406
2015-01-29 00:47:04 +00:00
Reid Kleckner 1185fced3d Add a Windows EH preparation pass that zaps resumes
If the personality is not a recognized MSVC personality function, this
pass delegates to the dwarf EH preparation pass. This chaining supports
people on *-windows-itanium or *-windows-gnu targets.

Currently this recognizes some personalities used by MSVC and turns
resume instructions into traps to avoid link errors.  Even if cleanups
are not used in the source program, LLVM requires the frontend to emit a
code path that resumes unwinding after an exception.  Clang does this,
and we get unreachable resume instructions. PR20300 covers cleaning up
these unreachable calls to resume.

Reviewers: majnemer

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

llvm-svn: 227405
2015-01-29 00:41:44 +00:00
Johannes Doerfert ef61def9d5 [FIX] Handle pointer-pointer comparisons
This should fix a problem introduced by r225464.

llvm-svn: 227404
2015-01-29 00:41:33 +00:00
Andrew Wilkins 72b5e5f5b4 irgen: don't emit debug metadata for locals
Summary:
The debug metadata we generate is wrong, and is
now causing build failures. This revision disables
the only llvm.dbg.declare calls we make.

(There is also a drive-by fix to CMakeLists.txt,
adding in a missing .go dependency.)

Fixes http://llvm.org/bugs/show_bug.cgi?id=22330

Reviewers: pcc

Reviewed By: pcc

Subscribers: dblaikie, llvm-commits

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

llvm-svn: 227403
2015-01-29 00:34:30 +00:00
Eric Christopher 905f12d96d Remove getSubtargetImpl from AArch64ISelLowering and cache the
correct subtarget by passing it in during the constructor as
TargetLowering is Subtarget specific.

llvm-svn: 227402
2015-01-29 00:19:42 +00:00
Eric Christopher 1889fdc142 Remove getSubtargetImpl from ARMISelLowering and cache the
correct subtarget by passing it in during the constructor as
TargetLowering is Subtarget specific.

llvm-svn: 227401
2015-01-29 00:19:39 +00:00
Eric Christopher c125e12261 Small cleanup in ARMFastISel initialization.
llvm-svn: 227400
2015-01-29 00:19:37 +00:00
Eric Christopher 1b21f00904 Migrate ARM except for TTI, AsmPrinter, and frame lowering
away from getSubtargetImpl.

llvm-svn: 227399
2015-01-29 00:19:33 +00:00
Manuel Jacob 6f508c578b Add nullptr checks for TargetSelectionDAGInfo in SelectionDAG.
TSI is not guaranteed be non-null in SelectionDAG.

llvm-svn: 227397
2015-01-28 23:50:40 +00:00
Kostya Serebryany 265cf04f9c [fuzzer] add option -save_minimized_corpus
llvm-svn: 227395
2015-01-28 23:48:39 +00:00
Joerg Sonnenberger 1689d3f732 For the --be8 flag, check explicitly for pre-v7 / pre-v6m cores.
Those used the old Big Endian support on ARM and don't need flags.
Refactor the logic in a separate common function, which also looks at
-march. Add corresponding logic for the Linux toolchain.

llvm-svn: 227393
2015-01-28 23:30:39 +00:00
Dan Albert 6f2875d834 [clang] Use -android environment for all compiler-rt libs.
Summary:
This was already done for the sanitizers, but it needs to be done for
the profile and builtin libs as well.

Reviewers: srhines, timmurray, eugenis, samsonov

Reviewed By: samsonov

Subscribers: compnerd, cfe-commits

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

llvm-svn: 227392
2015-01-28 23:23:36 +00:00
Chandler Carruth b2fe3e5c35 [LPM] Fix the PPC attribute to be spelled 'global-dynamic'. This should
let the build bot make finish compiling stage2.

llvm-svn: 227391
2015-01-28 23:10:57 +00:00
Philip Reames 9198b33b48 Teach SplitBlockPredecessors how to handle landingpad blocks.
Patch by: Igor Laevsky <igor@azulsystems.com>

"Currently SplitBlockPredecessors generates incorrect code in case if basic block we are going to split has a landingpad. Also seems like it is fairly common case among it's users to conditionally call either SplitBlockPredecessors or SplitLandingPadPredecessors. Because of this I think it is reasonable to add this condition directly into SplitBlockPredecessors."

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

llvm-svn: 227390
2015-01-28 23:06:47 +00:00
Kostya Serebryany a8fbcf0c1f Add lit-style tests for the Fuzzer library
Summary: Add test targets and the lit-style runner.

Test Plan: Run the tests on bot.

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

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

llvm-svn: 227389
2015-01-28 22:49:25 +00:00