Reid Kleckner [Thu, 29 Jan 2015 23:58:04 +0000 (23:58 +0000)]
x86: Fix large model calls to __chkstk for dynamic allocas
In the large code model, we now put __chkstk in %r11 before calling it.
Refactor the code so that we only do this once. Simplify things by using
__chkstk_ms instead of __chkstk on cygming. We already use that symbol
in the prolog emission, and it simplifies our logic.
Second half of PR18582.
llvm-svn: 227519
Filipe Cabecinhas [Thu, 29 Jan 2015 23:56:43 +0000 (23:56 +0000)]
Add some more PS4 driver settings related to rtti and exceptions.
Summary:
The PS4 defaults to -fno-rtti, and has to have rtti enabled when enabling
exceptions.
This commit makes clang add the -fno-rtti by default on the PS4, unless
-frtti was passed in.
It also diagnoses misuses for the PS4:
- Exceptions need rtti. Warn and enable rtti if no rtti flag was passed,
error if -fno-rtti was passed.
I also added a more general warning for when -fno-rtti is the default
(currently it's only on the PS4) and the vptr sanitizer is on.
Fixed a few tests, due to different flag order when passing cc1 arguments.
Reviewers: chandlerc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7250
llvm-svn: 227518
Eric Christopher [Thu, 29 Jan 2015 23:46:42 +0000 (23:46 +0000)]
Remove unnecessary calls to getSubtarget/getSubtargetImpl from the
MSP430 backend.
llvm-svn: 227517
Eric Christopher [Thu, 29 Jan 2015 23:46:39 +0000 (23:46 +0000)]
Remove unused header.
llvm-svn: 227516
Sanjay Patel [Thu, 29 Jan 2015 23:35:04 +0000 (23:35 +0000)]
Change SmallVector param to the more general ArrayRef; NFCI
llvm-svn: 227514
Eric Christopher [Thu, 29 Jan 2015 23:27:45 +0000 (23:27 +0000)]
Get rid of a few calls through the subtarget to get the ABI
that's actually sitting on the target machine.
llvm-svn: 227513
Eric Christopher [Thu, 29 Jan 2015 23:27:36 +0000 (23:27 +0000)]
Remove most of the TargetMachine::getSubtarget/getSubtargetImpl
calls that don't take a Function argument from Mips. Notable
exceptions: the AsmPrinter and MipsTargetObjectFile. The
latter needs to be fixed, and the former will be fixed when the
general AsmPrinter changes happen.
llvm-svn: 227512
Chandler Carruth [Thu, 29 Jan 2015 23:26:37 +0000 (23:26 +0000)]
[LPM] Remove a PPC64 hack to try to work around a bad interaction
between the linker's TLS optimizations and Clang's TLS code generation.
For now, Clang has been changed to disable linker TLS optimizations
until it (and LLVM more generally) are emitting TLS code sequences
compatible with the old bugs found in the linkers. That's a better fix
to handle bootstrapping on that platform.
llvm-svn: 227511
Rui Ueyama [Thu, 29 Jan 2015 23:23:57 +0000 (23:23 +0000)]
ELF: Check StringRef::getAsInteger's return value.
getAsInteger may partially update its result argument. We need to
check function return value to handle errors reliably.
llvm-svn: 227510
Kuba Brecka [Thu, 29 Jan 2015 23:19:26 +0000 (23:19 +0000)]
[compiler-rt] OS X: Update the CMake and Make builds to explicitely use libc++, mmacosx-version-min and SDKs
In both CMake and Makefiles, we are inconsistent about the use of libstdc++ vs. libc++, SDKs and minimum deployment targets for OS X. Let's fix the detection of SDKs, and let's explicitely set that we link against libc++ and mmacosx-version-min is 10.7.
llvm-svn: 227509
Reid Kleckner [Thu, 29 Jan 2015 23:09:37 +0000 (23:09 +0000)]
x86: Remove the W64ALLOCA pseudo
This is just an alias for CALL64pcrel32, and we can just use that opcode
with explicit defs in the MI.
No functionality change.
llvm-svn: 227508
Kostya Serebryany [Thu, 29 Jan 2015 23:01:07 +0000 (23:01 +0000)]
[fuzzer] add -use_full_coverage_set=1 which solves FullCoverageSetTest. This does not scale very well yet, but might be a good start.
llvm-svn: 227507
Chad Rosier [Thu, 29 Jan 2015 22:57:37 +0000 (22:57 +0000)]
[AArch64] Add INITIALIZE_PASS macros to AArch64A57FPLoadBalancing.
These are needed so this pass will produce output when
e.g. -print-after-all is used.
Phabricator Review: http://reviews.llvm.org/D7264
Patch by Geoff Berry <gberry@codeaurora.org>!
llvm-svn: 227506
Rui Ueyama [Thu, 29 Jan 2015 22:39:43 +0000 (22:39 +0000)]
Add an assert to check atom ordinal.
No two atoms are allowed to have the same file and atom ordinals.
If there's such atoms, there's a bug in the reader.
llvm-svn: 227504
Reid Kleckner [Thu, 29 Jan 2015 22:33:00 +0000 (22:33 +0000)]
Update comments to use unreachable instead of llvm.trap, as implemented now
win64: Call __chkstk through a register with the large code model
Fixes half of PR18582. True dynamic allocas will still have a
CALL64pcrel32 which will fail.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D7267
llvm-svn: 227503
Reid Kleckner [Thu, 29 Jan 2015 22:32:26 +0000 (22:32 +0000)]
Update comments to use unreachable instead of llvm.trap, as implemented now
llvm-svn: 227502
Rui Ueyama [Thu, 29 Jan 2015 22:18:28 +0000 (22:18 +0000)]
ELF: Remove dead code.
_runLayoutPass is always true. No way to set a new value to the
member variable.
llvm-svn: 227501
Rui Ueyama [Thu, 29 Jan 2015 22:12:50 +0000 (22:12 +0000)]
PECOFF: Do not use LayoutPass and instead use simpler one.
The LayoutPass is one of the slowest pass. This change is to skip
that pass. This change not only improve performance but also improve
maintainability of the code because the LayoutPass is pretty complex.
Previously we used the LayoutPass to sort all atoms in a specific way,
and reorder them again for PE/COFF in GroupedSectionPass.
I spent time on improving and fixing bugs in the LayoutPass (e.g.
r193029), but the pass is still hard to understand and hard to use.
It's better not to depend on that if we don't need. For PE/COFF, we
just wanted to sort atoms in the same order as the file order in the
command line.
The feature we used in the LayoutPass is now simplified to
compareByPosition function in OrderPass.cpp. The function is just 5
lines.
This patch changes the order of final output because it changes the
sort order a bit. The output is still correct, though.
llvm-svn: 227500
James Molloy [Thu, 29 Jan 2015 21:52:03 +0000 (21:52 +0000)]
[LoopReroll] Alter the data structures used during reroll validation.
The validation algorithm used an incremental approach, building each
iteration's data structures temporarily, validating them, then
adding them to a global set.
This does not scale well to having multiple sets of Root nodes, as the
set of instructions used in each iteration is the union over all
the root nodes. Therefore, refactor the logic to create a single, simple
container to which later logic then refers. This makes it simpler
control-flow wise to make the creation of the container more complex with
the addition of multiple root sets.
llvm-svn: 227499
Colin LeMahieu [Thu, 29 Jan 2015 21:47:15 +0000 (21:47 +0000)]
[Hexagon] Organizing tests and adding a few missing jump instruction encodings.
llvm-svn: 227498
Alexey Samsonov [Thu, 29 Jan 2015 21:32:34 +0000 (21:32 +0000)]
[CMake] Get rid of TARGET_64_BIT_CFLAGS: explicitly list required flags for each architecture.
llvm-svn: 227496
Colin LeMahieu [Thu, 29 Jan 2015 21:30:22 +0000 (21:30 +0000)]
[Hexagon] Adding missing instruction encodings and tests.
llvm-svn: 227495
Colin LeMahieu [Thu, 29 Jan 2015 21:09:30 +0000 (21:09 +0000)]
[Hexagon] Adding alu vector instructions
llvm-svn: 227493
Sanjay Patel [Thu, 29 Jan 2015 20:51:49 +0000 (20:51 +0000)]
[GVN] don't propagate equality comparisons of FP zero (PR22376)
In http://reviews.llvm.org/D6911, we allowed GVN to propagate FP equalities
to allow some simple value range optimizations. But that introduced a bug
when comparing to -0.0 or 0.0: these compare equal even though they are not
bitwise identical.
This patch disallows propagating zero constants in equality comparisons.
Fixes: http://llvm.org/bugs/show_bug.cgi?id=22376
Differential Revision: http://reviews.llvm.org/D7257
llvm-svn: 227491
Aaron Ballman [Thu, 29 Jan 2015 20:48:34 +0000 (20:48 +0000)]
All signal handlers are required to have C language linkage in C++. This does not fix all signal handlers, but does fix the most recent one.
llvm-svn: 227490
David Blaikie [Thu, 29 Jan 2015 20:25:46 +0000 (20:25 +0000)]
Add missing test from r227488
llvm-svn: 227489
David Blaikie [Thu, 29 Jan 2015 20:23:47 +0000 (20:23 +0000)]
Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps.
llvm-svn: 227488
David Blaikie [Thu, 29 Jan 2015 20:21:24 +0000 (20:21 +0000)]
Refactor test to be reused across architectures
llvm-svn: 227487
David Blaikie [Thu, 29 Jan 2015 20:17:15 +0000 (20:17 +0000)]
Remove erroneous REQUIRES: object-emission for asm test.
llvm-svn: 227486
David Blaikie [Thu, 29 Jan 2015 19:40:02 +0000 (19:40 +0000)]
Missing test case for r227481
llvm-svn: 227485
Matt Arsenault [Thu, 29 Jan 2015 19:34:32 +0000 (19:34 +0000)]
R600/SI: Implement enableAggressiveFMAFusion
Add tests for the various combines. This should
always be at least cycle neutral on all subtargets for f64,
and faster on some. For f32 we should prefer selecting
v_mad_f32 over v_fma_f32.
llvm-svn: 227484
Matt Arsenault [Thu, 29 Jan 2015 19:34:25 +0000 (19:34 +0000)]
R600/SI: Add subtarget feature for if f32 fma is fast
llvm-svn: 227483
Matt Arsenault [Thu, 29 Jan 2015 19:34:18 +0000 (19:34 +0000)]
R600/SI: Fix tonga's basic scheduling model
llvm-svn: 227482
David Blaikie [Thu, 29 Jan 2015 19:09:18 +0000 (19:09 +0000)]
DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps
The use of the DbgLoc in FastISel is probably something we should fix.
It's prone to leaking the wrong location into instructions - we should
have a clear chain of custody from the debug location of an IR
Instruction to that of a MachineInstr to avoid such leakage.
llvm-svn: 227481
Ulrich Weigand [Thu, 29 Jan 2015 19:08:51 +0000 (19:08 +0000)]
[PowerPC] Work around TLS linker bug
Work around a bug in GNU ld (and gold) linker versions up to 2.25
that may mis-optimize code generated by this version of clang/LLVM
to access general-dynamic or local-dynamic TLS variables.
Bug is fixed here:
https://sourceware.org/ml/binutils/2015-01/msg00318.html
llvm-svn: 227480
Zachary Turner [Thu, 29 Jan 2015 18:44:14 +0000 (18:44 +0000)]
Disable compilation of llvm-pdbdump for versions of MSVC < 2013.
Certain aspects of llvm-pdbdump require language support only present in
MSVC 2013 and higher. Since this is strictly a utility, and since we hope
to drop support for MSVC 2012 soon, don't build this unless MSVC 2013 or
higher.
llvm-svn: 227479
Kostya Serebryany [Thu, 29 Jan 2015 18:13:36 +0000 (18:13 +0000)]
[fuzzer] fix warning in a test
llvm-svn: 227478
Rafael Espindola [Thu, 29 Jan 2015 17:33:21 +0000 (17:33 +0000)]
Compute the ELF SectionKind from the flags.
Any code creating an MCSectionELF knows ELF and already provides the flags.
SectionKind is an abstraction used by common code that uses a plain
MCSection.
Use the flags to compute the SectionKind. This removes a lot of
guessing and boilerplate from the MCSectionELF construction.
llvm-svn: 227476
Colin LeMahieu [Thu, 29 Jan 2015 17:26:56 +0000 (17:26 +0000)]
[Hexagon] Deleting old variants of intrinsics and adding missing tests.
llvm-svn: 227474
Evgeniy Stepanov [Thu, 29 Jan 2015 17:24:21 +0000 (17:24 +0000)]
[asan] Add one more wait-for-device in the Android setup script.
llvm-svn: 227473
Rafael Espindola [Thu, 29 Jan 2015 17:22:53 +0000 (17:22 +0000)]
This reverts commit r227432, r227438 and r227448.
It should bring the bots back.
Original messagses:
r227448:
Remove unnecessary default.
r227438:
Fix Index/print-type.cpp test following r227432.
r227432:
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: 227472
Michael J. Spencer [Thu, 29 Jan 2015 17:20:41 +0000 (17:20 +0000)]
[lto] Disable dialog boxes on crash on Windows.
This has to be done in the DLL because the state doesn't cross DLL boundaries.
llvm-svn: 227471
Michael J. Spencer [Thu, 29 Jan 2015 17:20:29 +0000 (17:20 +0000)]
[Support][Windows] Unify dialog box suppression and print stack traces on abort.
llvm-svn: 227470
Andrey Churbanov [Thu, 29 Jan 2015 17:18:20 +0000 (17:18 +0000)]
Pin the libiomp5.dll for the lifetime of application, Windows-specific
llvm-svn: 227469
Kostya Serebryany [Thu, 29 Jan 2015 17:16:23 +0000 (17:16 +0000)]
[fuzzer] minor cleanup based on reviews: remove redundant includes, fix a copy-pasto in tests
llvm-svn: 227468
Andrey Churbanov [Thu, 29 Jan 2015 17:14:58 +0000 (17:14 +0000)]
enable environment variable KMP_PLACE_THREADS also for non-MIC architectures
llvm-svn: 227467
Kostya Serebryany [Thu, 29 Jan 2015 17:11:30 +0000 (17:11 +0000)]
[fuzzer] add FAQ section to the README.txt
llvm-svn: 227466
Aaron Ballman [Thu, 29 Jan 2015 16:58:53 +0000 (16:58 +0000)]
Reverting r227453, which adds back the fuzzer library. Now excluding the clang-format fuzzer functionality based on LLVM_USE_SANITIZE_COVERAGE being set or unset.
llvm-svn: 227465
Aaron Ballman [Thu, 29 Jan 2015 16:58:29 +0000 (16:58 +0000)]
Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset.
llvm-svn: 227464
Colin LeMahieu [Thu, 29 Jan 2015 16:55:37 +0000 (16:55 +0000)]
[Hexagon] Adding CR intrinsic tests.
llvm-svn: 227463
Tom Stellard [Thu, 29 Jan 2015 16:55:28 +0000 (16:55 +0000)]
R600/SI: Remove stray debug statements
llvm-svn: 227462
Tom Stellard [Thu, 29 Jan 2015 16:55:25 +0000 (16:55 +0000)]
R600/SI: Define a schedule model and enable the generic machine scheduler
The schedule model is not complete yet, and could be improved.
llvm-svn: 227461
Colin LeMahieu [Thu, 29 Jan 2015 16:35:38 +0000 (16:35 +0000)]
[Hexagon] Deleting unused classes.
llvm-svn: 227460
Aaron Ballman [Thu, 29 Jan 2015 16:18:59 +0000 (16:18 +0000)]
Oops -- accidentally commit some debug code! Removing that code; NFC (this time for real).
llvm-svn: 227459
Robert Lougher [Thu, 29 Jan 2015 16:18:29 +0000 (16:18 +0000)]
[X86] Use single add/sub for large stack offsets
For large stack offsets the compiler generates multiple immediate mode
sub/add instructions in the prologue/epilogue. This patch makes the
compiler place the final amount to be added/subtracted into a register,
which is then added/substracted with a single operation.
Differential Revision: http://reviews.llvm.org/D7226
llvm-svn: 227458
Colin LeMahieu [Thu, 29 Jan 2015 16:08:43 +0000 (16:08 +0000)]
[Hexagon] Adding XTYPE/PRED intrinsic tests. Converting predicate types to i32 instead of i1.
llvm-svn: 227457
Aaron Ballman [Thu, 29 Jan 2015 16:02:06 +0000 (16:02 +0000)]
Attempting to fix a build issue with MSVC 2012; NFC
llvm-svn: 227456
Bill Schmidt [Thu, 29 Jan 2015 15:59:09 +0000 (15:59 +0000)]
[PowerPC] Complete setting the baseline for ppc64le
Patch by Nemanja Ivanovic.
As was uncovered by the failing test case (when run on non-PPC
platforms), the feature set when compiling with -march=ppc64le was not
being picked up. This change ensures that if the -mcpu option is not
specified, the correct feature set is picked up regardless of whether
we are on PPC or not.
llvm-svn: 227455
Andrey Churbanov [Thu, 29 Jan 2015 15:52:20 +0000 (15:52 +0000)]
fix that sets proc-bind-var to proc_bind_false if affinity is not supported
llvm-svn: 227454
Aaron Ballman [Thu, 29 Jan 2015 15:49:46 +0000 (15:49 +0000)]
Temporarily reverting the fuzzer library as it causes too many build issues for MSVC users. This reverts: 227354
llvm-svn: 227453
Aaron Ballman [Thu, 29 Jan 2015 15:49:22 +0000 (15:49 +0000)]
Temporarily reverting the fuzzer library as it causes too many build issues for MSVC users. This reverts: 227445, 227395, 227389, 227357, 227254, 227252
llvm-svn: 227452
Andrey Churbanov [Thu, 29 Jan 2015 15:49:22 +0000 (15:49 +0000)]
fixing typo in error message
llvm-svn: 227451
Andrey Churbanov [Thu, 29 Jan 2015 15:48:21 +0000 (15:48 +0000)]
fixing mistake in kmp_get_affinity_max_proc() api function
llvm-svn: 227450
Andrey Churbanov [Thu, 29 Jan 2015 15:43:48 +0000 (15:43 +0000)]
fixing the Fortran modules dependencies
llvm-svn: 227449
Francois Pichet [Thu, 29 Jan 2015 15:42:56 +0000 (15:42 +0000)]
Remove unnecessary default.
llvm-svn: 227448
Andrey Churbanov [Thu, 29 Jan 2015 15:37:15 +0000 (15:37 +0000)]
adding the jobs variable for parallel build
llvm-svn: 227447
Alex Rosenberg [Thu, 29 Jan 2015 15:19:54 +0000 (15:19 +0000)]
Make the test actually test what it's supposed to test. Add a test for the from memory variant of vcvtph2ps for 256-bit.
llvm-svn: 227446
Aaron Ballman [Thu, 29 Jan 2015 15:19:13 +0000 (15:19 +0000)]
Adding missing #includes to try to get this to compile on Windows with Visual Studio.
llvm-svn: 227445
Alexander Kornienko [Thu, 29 Jan 2015 15:17:13 +0000 (15:17 +0000)]
[clang-tidy] Fix some false positives in google-readability-casting
Summary:
Ignore C-style casts in extern "C" {} sections. Be more careful when
detecting redundant casts between typedefs to the same type - emit a more
specific warning and don't automatically fix them.
Reviewers: klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D7247
llvm-svn: 227444
Filipe Cabecinhas [Thu, 29 Jan 2015 15:03:36 +0000 (15:03 +0000)]
[xcore] Make the exceptions test actually check for the absence of -fexceptions in the proper place
llvm-svn: 227443
Sean Silva [Thu, 29 Jan 2015 14:45:09 +0000 (14:45 +0000)]
Remove unused tokens in the ll lexer.
Patch by Robin Eklind!
llvm-svn: 227442
Rafael Espindola [Thu, 29 Jan 2015 14:23:28 +0000 (14:23 +0000)]
Use isMergeableConst now that it is sane.
llvm-svn: 227441
Rafael Espindola [Thu, 29 Jan 2015 14:12:41 +0000 (14:12 +0000)]
Remove MergeableConst.
Only the specific ones (MergeableConst4, MergeableConst8, MergeableConst16) are
handled specially.
llvm-svn: 227440
James Molloy [Thu, 29 Jan 2015 13:48:05 +0000 (13:48 +0000)]
[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
Francois Pichet [Thu, 29 Jan 2015 13:33:44 +0000 (13:33 +0000)]
Fix Index/print-type.cpp test following r227432.
llvm-svn: 227438
Alex Rosenberg [Thu, 29 Jan 2015 13:31:32 +0000 (13:31 +0000)]
Cleanup a few tests on sse4a machines and FileCheckize along the way.
llvm-svn: 227437
Benjamin Kramer [Thu, 29 Jan 2015 13:26:50 +0000 (13:26 +0000)]
EHPrepare: Remove leftover initialization code for DomTrees.
While there modernize some loops. NFC.
llvm-svn: 227436
Rafael Espindola [Thu, 29 Jan 2015 13:25:44 +0000 (13:25 +0000)]
Use enum values. NFC.
llvm-svn: 227435
NAKAMURA Takumi [Thu, 29 Jan 2015 13:23:23 +0000 (13:23 +0000)]
Disable a couple of crash-* tests for now. It seems they might be incompatible to win32.
llvm-svn: 227434
Daniel Jasper [Thu, 29 Jan 2015 13:11:47 +0000 (13:11 +0000)]
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
Francois Pichet [Thu, 29 Jan 2015 12:45:29 +0000 (12:45 +0000)]
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
Rafael Espindola [Thu, 29 Jan 2015 12:43:28 +0000 (12:43 +0000)]
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
Vladimir Medic [Thu, 29 Jan 2015 11:33:41 +0000 (11:33 +0000)]
[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
Charlie Turner [Thu, 29 Jan 2015 11:19:54 +0000 (11:19 +0000)]
Add a missing Tag_DIV_use test for Cortex-M7.
llvm-svn: 227429
NAKAMURA Takumi [Thu, 29 Jan 2015 11:06:59 +0000 (11:06 +0000)]
CommandLineParser: Avoid non-static member nitializer(s).
llvm-svn: 227428
Daniel Jasper [Thu, 29 Jan 2015 10:47:14 +0000 (10:47 +0000)]
clang-format: Fix crasher caused by not properly setting dry-run.
llvm-svn: 227427
David Majnemer [Thu, 29 Jan 2015 09:29:21 +0000 (09:29 +0000)]
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
David Majnemer [Thu, 29 Jan 2015 09:29:17 +0000 (09:29 +0000)]
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
Owen Anderson [Thu, 29 Jan 2015 07:53:13 +0000 (07:53 +0000)]
Fix the preprocessor checks used to determine if backtraces have been enabled.
llvm-svn: 227424
Owen Anderson [Thu, 29 Jan 2015 07:35:31 +0000 (07:35 +0000)]
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
Simon Atanasyan [Thu, 29 Jan 2015 06:56:24 +0000 (06:56 +0000)]
[ELFYAML] Provide default value 0 for YAML relocation addendum field
Follow up to r227318.
llvm-svn: 227422
Jason Molenda [Thu, 29 Jan 2015 06:28:36 +0000 (06:28 +0000)]
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
Nico Weber [Thu, 29 Jan 2015 06:25:59 +0000 (06:25 +0000)]
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
Jason Molenda [Thu, 29 Jan 2015 06:20:05 +0000 (06:20 +0000)]
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
Francisco Lopes da Silva [Thu, 29 Jan 2015 05:54:59 +0000 (05:54 +0000)]
Sema: Turn some applicable functions static. NBC.
llvm-svn: 227418
Richard Smith [Thu, 29 Jan 2015 03:34:39 +0000 (03:34 +0000)]
Don't use BCPL comments here, in case someone wants to use <stdatomic.h> from C89 mode.
llvm-svn: 227417
Kostya Serebryany [Thu, 29 Jan 2015 02:54:39 +0000 (02:54 +0000)]
[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
Chandler Carruth [Thu, 29 Jan 2015 02:44:53 +0000 (02:44 +0000)]
Remove an unused private field added r227405 to fix a Clang warning.
llvm-svn: 227415
Chandler Carruth [Thu, 29 Jan 2015 02:34:17 +0000 (02:34 +0000)]
[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
Alexey Samsonov [Thu, 29 Jan 2015 02:28:53 +0000 (02:28 +0000)]
[ASan] Generalize/simplify lit test configs generation.
llvm-svn: 227413