- Mar 26, 2015
-
-
Sanjoy Das authored
Summary: This patch is an attempt at making `DenseMapIterator`s "fail-fast". Fail-fast iterators that have been invalidated due to insertion into the host `DenseMap` deterministically trip an assert (in debug mode) on access, instead of non-deterministically hitting memory corruption issues. Enabling fail-fast iterators breaks the LLVM C++ ABI, so they are predicated on `LLVM_ENABLE_ABI_BREAKING_CHECKS`. `LLVM_ENABLE_ABI_BREAKING_CHECKS` by default flips with `LLVM_ENABLE_ASSERTS`, but can be clamped to ON or OFF using the CMake / autoconf build system. Reviewers: chandlerc, dexonsmith, rnk, zturner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8351 llvm-svn: 233310
-
Justin Bogner authored
The "|&" operator isn't POSIX, so it can fail depending on the host's default shell. Avoid it. There were also a couple of places that did "2>1", but this creates a file called "1". They clearly meant "2>&1". llvm-svn: 233309
-
Zachary Turner authored
Previously we were using teardown hooks in these two instances to shutdown processes. TestBase already deletes all targets in its own teardown, which will kill processes, so these steps weren't necessary. llvm-svn: 233308
-
Paul Robinson authored
Can avoid a problem if tools/clang/tools/extra is in the tree. Patch by Douglas Yung! llvm-svn: 233307
-
Zachary Turner authored
tear down hooks run as part of Base.tearDown(). Some of these hooks rely on accessing the debugger instance. So although it looks awkward, we need to call "del self.dbg" after calling Base.tearDown(). llvm-svn: 233306
-
Andrew Kaylor authored
llvm-svn: 233305
-
Daniel Jasper authored
Before: aaaaaaaa(aaaaaaaaaa, bbbbbbbbbb).a(); After: aaaaaaaa(aaaaaaaaaa, bbbbbbbbbb) .a(); llvm-svn: 233304
-
Renato Golin authored
Enabled by default, but it's useful when debugging with llc. Patch by Ranjeet Singh. llvm-svn: 233303
-
Duncan P. N. Exon Smith authored
This reverts commit r233254, effectively reapplying r233164 (and its successors), with an additional testcase for when subprograms match exactly. This fixes PR22792 (again). I'm using the same approach, but I've moved up the call to `stripReplacedSubprograms()`. The function pointers need to be dropped before mapping any metadata from the source module, or else this can drop the function from new subprograms that have merged (via Metadata uniquing) with the old ones. Dropping the pointers first prevents them from merging. **** The original commit message follows. **** Linker: Drop function pointers for overridden subprograms Instead of dropping subprograms that have been overridden, just set their function pointers to `nullptr`. This is a minor adjustment to the stop-gap fix for PR21910 committed in r224487, and fixes the crasher from PR22792. The problem that r224487 put a band-aid on: how do we find the canonical subprogram for a `Function`? Since the backend currently relies on `DebugInfoFinder` (which does a naive in-order traversal of compile units and picks the first subprogram) for this, r224487 tried dropping non-canonical subprograms. Dropping subprograms fails because the backend *also* builds up a map from subprogram to compile unit (`DwarfDebug::SPMap`) based on the subprogram lists. A missing subprogram causes segfaults later when an inlined reference (such as in this testcase) is created. Instead, just drop the `Function` pointer to `nullptr`, which nicely mirrors what happens when an already-inlined `Function` is optimized out. We can't really be sure that it's the same definition anyway, as the testcase demonstrates. This still isn't completely satisfactory. Two flaws at least that I can think of: - I still haven't found a straightforward way to make this symmetric in the IR. (Interestingly, the DWARF output is already symmetric, and I've tested for that to be sure we don't regress.) - Using `DebugInfoFinder` to find the canonical subprogram for a function is kind of crazy. We should just attach metadata to the function, like this: define weak i32 @foo(i32, i32) !dbg !MDSubprogram(...) { llvm-svn: 233302
-
Vladimir Sukharev authored
Reviewers: t.p.northover Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8503 llvm-svn: 233301
-
Vladimir Sukharev authored
Third element is to be added soon to "struct AArch64NamedImmMapper::Mapping". So its instances are renamed from ...Pairs to ...Mappings Reviewers: jmolloy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8582 llvm-svn: 233300
-
Ed Schouten authored
Unlike most of the other platforms supported by Clang, CloudABI only supports static linkage, for the reason that global filesystem access is prohibited. Functions provided by dlfcn.h are not present. As we know that applications will not try to do any symbol lookups at run-time, we can garbage collect unused code quite aggressively. Because of this, it makes sense to enable -ffunction-sections and -fdata-sections by default. Object files will be a bit larger than usual, but the resulting binary will not be affected, as the sections are merged again. However, when --gc-sections is used, the linker is able to remove unused code far more more aggressively. It also has the advantage that transitive library dependencies only need to be provided to the linker in case that functionality is actually used. Differential Revision: http://reviews.llvm.org/D8635 Reviewed by: echristo llvm-svn: 233299
-
Stephane Sezer authored
Summary: This should always be true but sometimes is not, during platform bring up. As recommended by Jim Ingham, an assertion should be enough here to help. This addresses post commit comments in http://reviews.llvm.org/D8554. Test Plan: Run unit tests. Reviewers: jasonmolenda, emaste, jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8574 llvm-svn: 233298
-
Vladimir Sukharev authored
class AArch64NamedImmMapper is to become dependent of SubTargetFeatures, while class AArch64Operand don't have access to the latter. So, AArch64NamedImmMapper constructor invocations are refactored away from methods of AArch64Operand. Reviewers: jmolloy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8579 llvm-svn: 233297
-
Sanjoy Das authored
Summary: With the introduction of MarkPendingLoopPredicates in r157092, I don't think the bailout is needed anymore. Reviewers: atrick, nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8624 llvm-svn: 233296
-
Alexey Samsonov authored
llvm-svn: 233295
-
Sanjay Patel authored
llvm-svn: 233294
-
Sanjay Patel authored
llvm-svn: 233293
-
Benjamin Kramer authored
llvm-svn: 233292
-
Benjamin Kramer authored
Anding and comparing with zero can be done in a single instruction on most archs so this is a bit cheaper. llvm-svn: 233291
-
Vladimir Sukharev authored
New architecture and cpu added, following http://community.arm.com/groups/processors/blog/2014/12/02/the-armv8-a-architecture-and-its-ongoing-development Reviewers: t.p.northover Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8505 llvm-svn: 233290
-
Sanjay Patel authored
llvm-svn: 233289
-
Sanjay Patel authored
llvm-svn: 233288
-
Adrian McCarthy authored
llvm-svn: 233287
-
Jingyue Wu authored
Summary: This patch enhances SLSR to handle another candidate form &B[i * S]. If we found two candidates S1: X = &B[i * S] S2: Y = &B[i' * S] and S1 dominates S2, we can replace S2 with Y = &X[(i' - i) * S] Test Plan: slsr-gep.ll X86/no-slsr.ll: verify that we do not run SLSR on GEPs that already fit into an addressing mode Reviewers: eliben, atrick, meheff, hfinkel Reviewed By: hfinkel Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D7459 llvm-svn: 233286
-
Eric Fiselier authored
llvm-svn: 233285
-
Zachary Turner authored
Tests derive from TestBase, which derives from Base. In the test setUp() methods, we always call TestBase.setUp() first and then call implementation-specific setup. Tear down needs to do the reverse. This was causing over 20 failures on Windows, and was the culprit behind about 80% of the files not being cleaned up after test run. TestBase.tearDown() is responsible for deleting all targets created during the test run and without this step, on Windows files will be locked and cannot be deleted. But TestBase.tearDown() was calling Base.tearDown() before its own cleanup (i.e. deleting the targets) and in some cases one of the teardown hooks would be to call make clean. So make clean would be run before the targets had been deleted, and fail to remove the files, and subsequently result in a failed test as well. llvm-svn: 233284
-
Zachary Turner authored
llvm-svn: 233283
-
Aaron Ballman authored
Sometimes report_fatal_error is called when there is not a handler function used to fail gracefully. In that case, RunInterruptHandlers is called, which attempts to enter a critical section object. Ensure that the critical section is properly initialized so that this code functions properly, and tools like clang-tidy do not crash in Debug builds. llvm-svn: 233282
-
Ed Maste authored
llvm-svn: 233281
-
Leny Kholodov authored
The fix is for r233277. This makes tests work. llvm-svn: 233280
-
Ilia K authored
Fix RegisterCommandsTestCase and HelloWorldTestCase tests which hang on OS X after TestBase.tearDown() llvm-svn: 233279
-
Ilia K authored
llvm-svn: 233278
-
Leny Kholodov authored
This diff includes implementation of linking calls to ifunc functions. It provides ifunc entries in PLT and corresponding relocations (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G1_NC, R_ARM_LDR_PC_G2 for link-time and R_ARM_IRELATIVE for run-time). Differential Revision: http://reviews.llvm.org/D7833 llvm-svn: 233277
-
Daniel Jasper authored
NewlinesBefore and HasUnescapedNewline were not properly propagated leading to llvm.org/PR23032. llvm-svn: 233276
-
Ed Schouten authored
The idea behind Nuxi CloudABI is that it is targeted at (but not limited to) running networked services in a sandboxed environment. The model behind stdin, stdout and stderr is strongly focused on interactive tools in a command shell. CloudABI does not support the notion of stdin and stdout, as 'standard input/output' does not apply to services. The concept of stderr does makes sense though, as services do need some mechanism to log error messages in a uniform way. This patch extends libc++ in such a way that std::cin and std::cout and the associated <cstdio>/<cwchar> functions can be disabled through the flags _LIBCPP_HAS_NO_STDIN and _LIBCPP_HAS_NO_STDOUT, respectively. At the same time it attempts to clean up src/iostream.cpp a bit. Instead of using a single array of mbstate_t objects and hardcoding the array indices, it creates separate objects that declared next to the iostream objects and their buffers. The code is also restructured by interleaving the construction and setup of c* and wc* objects. That way it is more obvious that this is done identically. The c* and wc* objects already have separate unit tests. Make use of this fact by adding XFAILs in case libcpp-has-no-std* is set. That way the tests work in both directions. If stdin or stdout is disabled, these tests will therefore test for the absence of c* and wc*. Differential Revision: http://reviews.llvm.org/D8340 llvm-svn: 233275
-
Ed Schouten authored
If we want to add support for making std::cin and std::cout optional, it is impractical to have all of the mbstate_t objects in one array. This would mean that if std::cin and std::cout are omitted, the state_types array is only used partially. Solve this by using separate global variables. These are placed right next to the iostream object and the buffer, meaning we can easily #ifdef them away. Differential Revision: http://reviews.llvm.org/D8359 llvm-svn: 233274
-
Ed Maste authored
This is derived from FreeBSD/mips64 and Darwin and Linux arm64 support. Differential Revision: http://reviews.llvm.org/D7835 llvm-svn: 233273
-
Ilia K authored
This patch fixes the following: ``` 1: test_attach_to_process_by_id_with_dsym (TestProcessAttach.ProcessAttachTestCase) Test attach by process id ... ok 2: test_attach_to_process_by_id_with_dwarf (TestProcessAttach.ProcessAttachTestCase) Test attach by process id ... ok 3: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ... FAILURE 4: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ... FAILURE ====================================================================== FAIL: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 462, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 35, in test_attach_to_process_by_name_with_dsym self.process_attach_by_name() File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name self.runCmd("process attach -n s" + exe_name) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully Config=x86_64-clang ====================================================================== FAIL: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase) Test attach by process name ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper return func(self, *args, **kwargs) File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 41, in test_attach_to_process_by_name_with_dwarf self.process_attach_by_name() File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name self.runCmd("process attach -n s" + exe_name) File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd msg if msg else CMD_MSG(cmd)) AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully Config=x86_64-clang ---------------------------------------------------------------------- ``` Failure-x86_64-clang-TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_name_with_dsym.log: ``` [...] runCmd: process attach -n ProcessAttach runCmd failed! error: attach failed: more than one process named ProcessAttach: PID PARENT USER TRIPLE ARGUMENTS ====== ====== ========== ======================== ============================ 43752 43680 IliaK x86_64-apple-macosx /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach 43663 1 IliaK x86_64-apple-macosx /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach [...] ``` llvm-svn: 233272
-
Toma Tabacu authored
Summary: This groups all of the MipsAssemblerOptions functionality together, making it more reader-friendly. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8445 llvm-svn: 233271
-