Chandler Carruth [Sat, 7 Mar 2015 09:02:36 +0000 (09:02 +0000)]
[PM] Create a separate library for high-level pass management code.
This will provide the analogous replacements for the PassManagerBuilder
and other code long term. This code is extracted from the opt tool
currently, and I plan to extend it as I build up support for using the
new pass manager in Clang and other places.
Mailing this out for review in part to let folks comment on the terrible names
here. A brief word about why I chose the names I did.
The library is called "Passes" to try and make it clear that it is a high-level
utility and where *all* of the passes come together and are registered in
a common library. I didn't want it to be *limited* to a registry though, the
registry is just one component.
The class is a "PassBuilder" but this name I'm less happy with. It doesn't
build passes in any traditional sense and isn't a Builder-style API at all. The
class is a PassRegisterer or PassAdder, but neither of those really make a lot
of sense. This class is responsible for constructing passes for registry in an
analysis manager or for population of a pass pipeline. If anyone has a better
name, I would love to hear it. The other candidate I looked at was
PassRegistrar, but that doesn't really fit either. There is no register of all
the passes in use, and so I think continuing the "registry" analog outside of
the registry of pass *names* and *types* is a mistake. The objects themselves
are just objects with the new pass manager.
Differential Revision: http://reviews.llvm.org/D8054
llvm-svn: 231556
Simon Pilgrim [Sat, 7 Mar 2015 05:52:42 +0000 (05:52 +0000)]
[DAGCombiner] SCALAR_TO_VECTOR(EXTRACT_VECTOR_ELT(V,C)) -> VECTOR_SHUFFLE
This patch attempts to convert a SCALAR_TO_VECTOR using an operand from an EXTRACT_VECTOR_ELT into a VECTOR_SHUFFLE.
This prevents many cases of spilling scalar data between the gpr + simd registers.
At present the optimization only accepts cases where there is no TRUNC of the scalar type (i.e. all types must match).
Differential Revision: http://reviews.llvm.org/D8132
llvm-svn: 231554
Jordan Rose [Sat, 7 Mar 2015 05:47:24 +0000 (05:47 +0000)]
[analyzer] RetainCountChecker: CF properties are always manually retain-counted.
In theory we could assume a CF property is stored at +0 if there's not a custom
setter, but that's not really worth the complexity. What we do know is that a
CF property can't have ownership attributes, and so we shouldn't assume anything
about the ownership of the ivar.
rdar://problem/
20076963
llvm-svn: 231553
Rui Ueyama [Sat, 7 Mar 2015 04:23:46 +0000 (04:23 +0000)]
Resolver: optimize fallback atoms.
Atoms with fallback atoms are never be added to the symbol table.
However, we added such atoms to _undefines array. We had to call
isCoalescedAway to identify and skip them. We should just stop
adding them in the first place.
This seems to make the linker ~1% faster in my test case.
llvm-svn: 231552
Rui Ueyama [Sat, 7 Mar 2015 03:55:32 +0000 (03:55 +0000)]
Resolver: Reduce number of SymbolTable::isDefined function calls.
If an undefined symbol is added to the symbol table by the previous
call of SymbolTable::add, SymbolTable::isDefined will always return
false for the same symbol.
llvm-svn: 231551
Vince Harron [Sat, 7 Mar 2015 03:37:15 +0000 (03:37 +0000)]
Move Python Init from InitializeForLLGS to Initialize
Linux configure+make builds have ~175 tests failing that aren't
failing in cmake builds. The tests have error messages like
"'a.out' doesn't contain the architecture x86-64" ObjectFileELF
plugin wasn't loaded when this message was output.
I found ScriptInterpreterPython::InitializePrivate() is calling
Debugger::Terminate(), which terminates ObjectFileELF (and lots
of other stuff) setup earlier in the InitializeForLLGS.
So I moved python Init/Term from Init/TermForLLGS to Init/Term
llvm-svn: 231550
Rui Ueyama [Sat, 7 Mar 2015 03:22:37 +0000 (03:22 +0000)]
Resolver: Reduce number of hash function call.
This is yet another optimization patch. Previously we called
SymbolTable::isDefined() and SymbolTable::findByName() from a very
frequently executed function. Because isDefined calls findByName,
findByName is called twice on each iteration.
findByName is not a cheap function. It computes a hash value for a
given symbol name. When linking C++ programs, it can be expensive
because of C++ mangled long symbols.
This patch reduces the number of call from 2 to 1. Performance
improvements by this patch was larger than I expected. Linking time
of chrome.dll gets almost 5% shorter.
llvm-svn: 231549
Anton Yartsev [Sat, 7 Mar 2015 01:57:31 +0000 (01:57 +0000)]
[analyzer] Remove unused type (addition to r231540: "Revert changes from r229593")
llvm-svn: 231548
Eric Christopher [Sat, 7 Mar 2015 01:39:09 +0000 (01:39 +0000)]
Typo.
llvm-svn: 231547
Eric Christopher [Sat, 7 Mar 2015 01:39:06 +0000 (01:39 +0000)]
Remove use of misched-bench from this test and replace it with
non-temporary enabling options. This is part of removing misched-bench
as an option.
llvm-svn: 231546
Rui Ueyama [Sat, 7 Mar 2015 01:35:50 +0000 (01:35 +0000)]
PECOFF: Do not add extraneous symbols to the dead strip root.
Previously we added all undefined symbols found in object files to
the dead strip root. This patch makes the linker to stop doing that.
Undefined symbols would be resolved anyway, so this patch doesn't
change the linker behavior. It should slightly improve performance
but it's really marginal. This is a cleanup.
llvm-svn: 231545
Frederic Riss [Sat, 7 Mar 2015 01:25:09 +0000 (01:25 +0000)]
[dsymutil] Apply relocations to DIE data before cloning.
Doing this gets function's low_pc and global variable's locations right
in the output debug info. It also could get right other attributes
that need to be relocated (in linker terms), but I don't know of any
other than the address attributes.
This doesn't fixup low_pc attributes in compile_unit, lexical_block
or inlined subroutine, nor does it get right high_pc attributes
for function. This will come in a subsequent commit.
llvm-svn: 231544
Rui Ueyama [Sat, 7 Mar 2015 01:04:40 +0000 (01:04 +0000)]
Remove unused typedefs.
llvm-svn: 231543
Rui Ueyama [Sat, 7 Mar 2015 01:00:44 +0000 (01:00 +0000)]
Use multimap<T, U> instead of map<T, set<U>>. NFC.
llvm-svn: 231542
Hans Wennborg [Sat, 7 Mar 2015 00:46:19 +0000 (00:46 +0000)]
Revert r231508 "CodeGen: Emit constant temporaries into read-only globals."
This broke the Chromium build. Links were failing with messages like:
obj/dbus/libdbus_test_support.a(obj/dbus/dbus_test_support.mock_object_proxy.o):../../dbus/mock_object_proxy.cc:function dbus::MockObjectProxy::Detach(): warning: relocation refers to discarded section
/usr/local/google/work/chromium/src/third_party/binutils/Linux_x64/Release/bin/ld.gold: error: treating warnings as errors
llvm-svn: 231541
Anton Yartsev [Sat, 7 Mar 2015 00:31:53 +0000 (00:31 +0000)]
[analyzer] Revert changes from r229593; an enhancement is under discussion
llvm-svn: 231540
Eric Christopher [Sat, 7 Mar 2015 00:12:22 +0000 (00:12 +0000)]
Recommit r231324 with a fix to the ARM execution domain code
to disable lane switching if we don't actually have the instruction
set we want to switch to. Models the earlier check above the
conditional for the pass.
The testcase is one that triggered with the assert that's added
as part of the fix, use it to avoid adding a new testcase as it
highlights the same problem.
llvm-svn: 231539
Richard Smith [Sat, 7 Mar 2015 00:04:49 +0000 (00:04 +0000)]
Replace Sema's map of locally-scoped extern "C" declarations with a DeclContext
of extern "C" declarations. This is simpler and vastly more efficient for
modules builds (we no longer need to load *all* extern "C" declarations to
determine if we have a redeclaration).
No functionality change intended.
llvm-svn: 231538
Greg Clayton [Sat, 7 Mar 2015 00:01:46 +0000 (00:01 +0000)]
Help for _regexp-break wasn't very clear. Added more detailed explanations of all things that can be typed by the _regexp-break command.
<rdar://problem/
12281058>
llvm-svn: 231537
David Majnemer [Fri, 6 Mar 2015 23:56:30 +0000 (23:56 +0000)]
Unbreak build bots
llvm-svn: 231536
Greg Clayton [Fri, 6 Mar 2015 23:46:54 +0000 (23:46 +0000)]
Make sure to re-read the file data you can get from OptionValueFileSpec::GetFileContents(...) when the file has changed.
This means you can set an expression prefix file with:
(lldb) settings set target.expr-prefix /tmp/to/prefix.txt
And you can run an expression and modify your expression prefix file in another editor without having to type:
(lldb) settings set target.expr-prefix /tmp/to/prefix.txt
again...
<rdar://problem/
12155942>
llvm-svn: 231535
David Majnemer [Fri, 6 Mar 2015 23:45:23 +0000 (23:45 +0000)]
MS ABI: Stick throw-related data into the .xdata section
This is a little nicer as it keeps the contents of .xdata away from
normal .rdata; we expect .xdata to be far colder than .rdata.
llvm-svn: 231534
David Majnemer [Fri, 6 Mar 2015 23:45:20 +0000 (23:45 +0000)]
MS ABI: Correctly generate throw-info for pointer to const qual types
We didn't create type info based on the unqualified pointee type,
causing RTTI mismatches.
llvm-svn: 231533
Richard Smith [Fri, 6 Mar 2015 23:39:54 +0000 (23:39 +0000)]
[modules] Mark Analysis/TargetLibraryInfo.def as a textual header.
llvm-svn: 231532
Frederic Riss [Fri, 6 Mar 2015 23:22:53 +0000 (23:22 +0000)]
[dsymutil] Support cloning DIE reference attributes.
Reference attributes are mainly handled by just creating DIEEntry
attributes for them. There is a special case for DW_FORM_ref_addr
attributes though, because the DIEEntry code needs a DwarfDebug
code to emit them (and we don't have one as we do no CodeGen).
In that case, just use DIEInteger attributes with the right form.
llvm-svn: 231531
Frederic Riss [Fri, 6 Mar 2015 23:22:50 +0000 (23:22 +0000)]
[dsymutil] Set linked unit start offset early. NFC.
The start offset of a linked unit is known before starting to clone
its DIEs. Handling DW_FORM_ref_addr attributes requires that this
offset is set while cloning the unit. Split CompileUnit::computeOffsets()
into setStartOffset() and computeNextUnitOffset() and call them
repsectively before cloning the DIEs and right after.
llvm-svn: 231530
Frederic Riss [Fri, 6 Mar 2015 23:22:46 +0000 (23:22 +0000)]
Add DIEInteger::setValue() method.
dsymutil needs to 'patch' attribute values after creating them. Just
add this trivial capability.
llvm-svn: 231529
Olivier Sallenave [Fri, 6 Mar 2015 23:12:04 +0000 (23:12 +0000)]
Do not restrict interleaved unrolling to small loops, depending on the target.
llvm-svn: 231528
Quentin Colombet [Fri, 6 Mar 2015 22:42:10 +0000 (22:42 +0000)]
[AArch64][LoadStoreOptimizer] Generate LDP + SXTW instead of LD[U]R + LD[U]RSW.
Teach the load store optimizer how to sign extend a result of a load pair when
it helps creating more pairs.
The rational is that loads are more expensive than sign extensions, so if we
gather some in one instruction this is better!
<rdar://problem/
20072968>
llvm-svn: 231527
Ilia K [Fri, 6 Mar 2015 22:35:08 +0000 (22:35 +0000)]
Improve ValueObject::GetValueDidChange test; Add a comment for it
Summary: This patch adds a few comments for GetValueDidChange and contains improvements for TestValueVarUpdate.py test which checks ValueObject::GetValueDidChange for complex types.
Reviewers: zturner, granata.enrico, clayborg
Reviewed By: clayborg
Subscribers: jingham, lldb-commits, granata.enrico, zturner, clayborg
Differential Revision: http://reviews.llvm.org/D8103
llvm-svn: 231526
Ilia K [Fri, 6 Mar 2015 22:25:12 +0000 (22:25 +0000)]
Fix -var-create and -var-update (MI)
Summary:
This patch includes:
* Fix -var-create command for global/static variables
* Fix -var-update command: remove m_strValueName/m_eVarInfoFormat/m_bValueChanged{Array,Composite,Normal}Type; clean CMICmdCmdVarUpdate::Execute and CMICmdCmdVarUpdate::Acknowledge; improve CMICmdCmdVarUpdate::MIFormResponse; Complete the value after -var-create using the CMICmdCmdVarCreate::CompleteSBValue to get SBValue::GetValueDidChange work.
* Add non-constant version of CMICmnLLDBDebugSessionInfoVarObj::GetValue
* Add MiVarTestCase.test_lldbmi_var_update test
All tests pass on OS X.
Reviewers: abidh, emaste, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, emaste, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8110
llvm-svn: 231525
Sanjay Patel [Fri, 6 Mar 2015 21:50:42 +0000 (21:50 +0000)]
fixed to test features, not CPUs
llvm-svn: 231524
Sanjay Patel [Fri, 6 Mar 2015 21:50:27 +0000 (21:50 +0000)]
fixed to test features, not CPUs
llvm-svn: 231523
Sanjay Patel [Fri, 6 Mar 2015 21:30:18 +0000 (21:30 +0000)]
loosen checking for buildbots
llvm-svn: 231522
Sanjay Patel [Fri, 6 Mar 2015 21:24:56 +0000 (21:24 +0000)]
fixed to test only the feature, not the feature and a CPU
llvm-svn: 231521
Sanjay Patel [Fri, 6 Mar 2015 21:19:32 +0000 (21:19 +0000)]
fixed to test only the feature, not the feature and a CPU
llvm-svn: 231520
Sanjay Patel [Fri, 6 Mar 2015 21:16:15 +0000 (21:16 +0000)]
fixed test to use FileCheck
llvm-svn: 231519
Rui Ueyama [Fri, 6 Mar 2015 21:15:06 +0000 (21:15 +0000)]
Resolver: move code inside an assert.
llvm-svn: 231518
Sanjay Patel [Fri, 6 Mar 2015 21:05:02 +0000 (21:05 +0000)]
fixed to use CHECK-LABELs
llvm-svn: 231517
Sanjay Patel [Fri, 6 Mar 2015 20:58:15 +0000 (20:58 +0000)]
fixed to test only the feature, not the feature and a CPU
llvm-svn: 231516
Sanjay Patel [Fri, 6 Mar 2015 20:57:40 +0000 (20:57 +0000)]
fixed to test only the feature, not the feature and a CPU
llvm-svn: 231515
Jim Ingham [Fri, 6 Mar 2015 20:57:17 +0000 (20:57 +0000)]
Remember to set m_loaded_objc_opt once you've loaded the ObjC data
from the shared cache so you don't update it over & over.
<rdar://problem/
20074768>
llvm-svn: 231514
Sanjay Patel [Fri, 6 Mar 2015 20:51:25 +0000 (20:51 +0000)]
fixed to test feature, not CPU
llvm-svn: 231513
Sanjay Patel [Fri, 6 Mar 2015 20:46:16 +0000 (20:46 +0000)]
fixed to test features, not CPUs
llvm-svn: 231512
Zachary Turner [Fri, 6 Mar 2015 20:45:43 +0000 (20:45 +0000)]
Remove Host::Backtrace in favor of llvm::sys::PrintStackTrace()
This removes Host::Backtrace from the codebase, and changes all
call sites to use llvm::sys::PrintStackTrace(). This makes the
functionality available for all platforms, and even for platforms
which currently had a supported implementation of Host::Backtrace,
this patch should enable richer information in stack traces, such
as file and line number information, as well as giving it the
ability to unwind through inlined functions.
llvm-svn: 231511
Sanjay Patel [Fri, 6 Mar 2015 20:38:55 +0000 (20:38 +0000)]
fixed test to use SSE2 attribute
llvm-svn: 231510
Sanjay Patel [Fri, 6 Mar 2015 20:34:20 +0000 (20:34 +0000)]
fixed to test only the feature, not the feature and a CPU
llvm-svn: 231509
Benjamin Kramer [Fri, 6 Mar 2015 20:00:03 +0000 (20:00 +0000)]
CodeGen: Emit constant temporaries into read-only globals.
Instead of creating a copy on the stack just stash them in a private
constant global. This saves both the copying overhead and the stack
space, and gives the optimizer more room to constant fold.
This tries to make array temporaries more similar to regular arrays,
they can't use the same logic because a temporary has no VarDecl to be
bound to so we roll our own version here.
The original use case for this optimization was code like
for (int i : {1, 2, 3, 4, 5, 6, 7, 8, 10})
foo(i);
where without this patch (assuming that the loop is not unrolled) we
would alloca an array on the stack, copy the 10 values over and
iterate on that. With this patch we put the array in .text use it
directly. Apart from that case this helps on virtually any passing of
a constant std::initializer_list as a function argument.
Differential Revision: http://reviews.llvm.org/D8034
llvm-svn: 231508
Matthias Braun [Fri, 6 Mar 2015 19:49:10 +0000 (19:49 +0000)]
DAGCombiner: Canonicalize select(and/or,x,y) depending on target.
This is based on the following equivalences:
select(C0 & C1, X, Y) <=> select(C0, select(C1, X, Y), Y)
select(C0 | C1, X, Y) <=> select(C0, X, select(C1, X, Y))
Many target cannot perform and/or on the CPU flags and therefore the
right side should be choosen to avoid materializign the i1 flags in an
integer register. If the target can perform this operation efficiently
we normalize to the left form.
Differential Revision: http://reviews.llvm.org/D7622
llvm-svn: 231507
Matthias Braun [Fri, 6 Mar 2015 19:49:06 +0000 (19:49 +0000)]
DAGCombiner: Factor out some and/or combines.
This is in preparation for changing visitSELECT to normalize towards
select(Cond0, select(Cond1, X, Y), Y);
select(Cond0, X, select(Cond1, X, Y)) which perfom an implicit and/or of
the conditions.
The factored function contains all DAGCombine rules which reduce two values
combined by an And/Or operation to a single value. This does not include rules
involving constants as visitSELECT already handles that case.
Differential Revision: http://reviews.llvm.org/D8026
llvm-svn: 231506
Bruno Cardoso Lopes [Fri, 6 Mar 2015 19:42:18 +0000 (19:42 +0000)]
[AsmPrinter][TLOF] Remove AArch64 test to appease buildbots
Follow up from r231497. Using XFAIL would still trigger fail on some
buildbots. Will re-introduce it as soon as I have a fix.
llvm-svn: 231505
Enrico Granata [Fri, 6 Mar 2015 19:37:57 +0000 (19:37 +0000)]
A few improvements to our vector types formatting story:
- use a hardcoded formatter to match all vector types, and make it so that their element type is taken into account when doing default formatting
- special case a vector of char to display byte values instead of characters by default
Fixes the test failures Ilia was seeing
llvm-svn: 231504
Benjamin Kramer [Fri, 6 Mar 2015 19:37:26 +0000 (19:37 +0000)]
LoopInterchange: Remove empty method.
llvm-svn: 231503
Kostya Serebryany [Fri, 6 Mar 2015 19:33:58 +0000 (19:33 +0000)]
[asan] Fix 2 problems in nohugepage_test.
1. /proc/self/smaps may be bigger than 1 << 14. On my machine, it is
26KB.
2. The read system call may return a partially filled buffer. We need
to check the return value from read.
Patch by H.J. Lu
llvm-svn: 231502
Benjamin Kramer [Fri, 6 Mar 2015 18:59:14 +0000 (18:59 +0000)]
LoopInterchange: Rephrase instruction moving using ilist's splice and factor it into a function
+ Random cleanups. No functional change.
llvm-svn: 231501
Matthias Braun [Fri, 6 Mar 2015 18:56:20 +0000 (18:56 +0000)]
ExecutionDepsFix: Indizes -> Indices.
Translate german to english.
llvm-svn: 231500
David Majnemer [Fri, 6 Mar 2015 18:53:55 +0000 (18:53 +0000)]
MS ABI: Insert copy-constructors into the CatchableType
Find all unambiguous public classes of the exception object's class type
and reference all of their copy constructors. Yes, this is not
conforming but it is necessary in order to implement their ABI. This is
because the copy constructor is actually referenced by the metadata
describing which catch handlers are eligible to handle the exception
object.
N.B. This doesn't yet handle the copy constructor closure case yet,
that work is ongoing.
Differential Revision: http://reviews.llvm.org/D8101
llvm-svn: 231499
Dan Albert [Fri, 6 Mar 2015 18:51:25 +0000 (18:51 +0000)]
Oops. This arg is passed, just ignored.
We should probably be using this argument to find the data files for
the tests, but that isn't implemented yet.
llvm-svn: 231498
Bruno Cardoso Lopes [Fri, 6 Mar 2015 18:38:42 +0000 (18:38 +0000)]
[AsmPrinter][TLOF] XFAIL AArch64 test to appease buildbots
The checking for extgotequiv and localgotequiv rely on the emission
order, which is not guaranteed because we use DenseMap to hold the GOT
equivalents. XFAIL this now until I get time to use MapVector and test
out the solution. In the meantime, appease buildbots.
llvm-svn: 231497
Dan Albert [Fri, 6 Mar 2015 18:35:45 +0000 (18:35 +0000)]
Fix the PrefixExecutor.
The PrefixExecutor wasn't passing the exe_path down the chain, so the
command was overriding that, the work_dir was being passed as the
command, and so on.
I've cleaned up a few pylint issues while I was here.
llvm-svn: 231496
Eric Christopher [Fri, 6 Mar 2015 18:20:23 +0000 (18:20 +0000)]
Fix typo.
llvm-svn: 231495
David Majnemer [Fri, 6 Mar 2015 18:04:22 +0000 (18:04 +0000)]
Sema: The i8 suffix should yield a literal of type char
We would make i8 literals turn into signed char instead of char. This
is incompatible with MSVC.
This fixes PR22824.
llvm-svn: 231494
Frederic Riss [Fri, 6 Mar 2015 17:56:30 +0000 (17:56 +0000)]
[dsymutil] Add debug_str construction support.
With this comes the ability to correctly clone string attributes in DIEs.
llvm-svn: 231493
Sergey Matveev [Fri, 6 Mar 2015 17:05:28 +0000 (17:05 +0000)]
[asan] Allow users of asan_symbolize.py to forbid fallback to atos/addr2line.
llvm-svn: 231492
Tom Stellard [Fri, 6 Mar 2015 17:00:16 +0000 (17:00 +0000)]
R600/SI: Remove unused register class
llvm-svn: 231491
Ilia K [Fri, 6 Mar 2015 16:53:37 +0000 (16:53 +0000)]
Fix Radar10642615DataFormatterTestCase after r231449
Summary:
I'm not sure that this failure should be fixed by modifying this test.
It seems strange for me that the only one type vUInt8 is printed with '0x' prefix.
This patch fixes the following error:
```
======================================================================
FAIL: test_with_dsym_and_run_command (Test-rdar-
10642615.Radar10642615DataFormatterTestCase)
Test data formatter commands.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 456, in wrapper
return func(self, *args, **kwargs)
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-
10642615/Test-rdar-
10642615.py", line 21, in test_with_dsym_and_run_command
self.data_formatter_commands()
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-
10642615/Test-rdar-
10642615.py", line 68, in data_formatter_commands
'(vBool32) valueBool32 = (0, 1, 0, 1)'])
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2100, in expect
msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : '(vUInt8) valueU8 = ('\x01', '\0', '\x04', '\0', '\0', '\x01', '\0', '\x04', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0')' returns expected result
Config=x86_64-clang
======================================================================
FAIL: test_with_dwarf_and_run_command (Test-rdar-
10642615.Radar10642615DataFormatterTestCase)
Test data formatter commands.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 473, in wrapper
return func(self, *args, **kwargs)
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-
10642615/Test-rdar-
10642615.py", line 28, in test_with_dwarf_and_run_command
self.data_formatter_commands()
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/data-formatter/rdar-
10642615/Test-rdar-
10642615.py", line 68, in data_formatter_commands
'(vBool32) valueBool32 = (0, 1, 0, 1)'])
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2100, in expect
msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : '(vUInt8) valueU8 = ('\x01', '\0', '\x04', '\0', '\0', '\x01', '\0', '\x04', '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0')' returns expected result
Config=x86_64-clang
----------------------------------------------------------------------
```
Reviewers: granata.enrico, zturner, clayborg
Subscribers: clayborg, lldb-commits, zturner, granata.enrico
Differential Revision: http://reviews.llvm.org/D8102
llvm-svn: 231490
Ilia K [Fri, 6 Mar 2015 16:43:38 +0000 (16:43 +0000)]
Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_remote test after r231479
llvm-svn: 231489
Benjamin Kramer [Fri, 6 Mar 2015 16:36:50 +0000 (16:36 +0000)]
Sema: We can use delegating ctors now. NFC.
llvm-svn: 231488
Samuel Benzaquen [Fri, 6 Mar 2015 16:24:47 +0000 (16:24 +0000)]
Fix isOverride() for the case of a dependent typed base class.
The method decl is not marked as overriding any other method decls
until the template is instantiated.
Use the override attribute as another signal.
llvm-svn: 231487
Benjamin Kramer [Fri, 6 Mar 2015 16:21:15 +0000 (16:21 +0000)]
Fold init() helpers into constructors. NFC.
llvm-svn: 231486
Chad Rosier [Fri, 6 Mar 2015 16:15:04 +0000 (16:15 +0000)]
Avoid calls to dumpPassInfo and RegionBase<Tr>::getNameStr() in RGPassManager if
-debug-pass is not specified, as the string is only used when dumping pass
information. There is a big cost of determining the name in
ReginBase<Tr>:getNameStr() if the region's entry or exit block doesn't have a
name. This is the case for the Release build, as names are not preserved by the
front-end.
RegionPass is mainly used by Polly, resulting in long compile time for one file
of a customer application with the Release build (1m24s) vs Release+Asserts
build (10s) when Polly is used. With this change, the compile time with the
Release build went down to 8s.
Patch by Sanjin Sijaric <ssijaric@codeaurora.org>!
Phabricator: http://reviews.llvm.org/D8076
llvm-svn: 231485
James Molloy [Fri, 6 Mar 2015 15:50:47 +0000 (15:50 +0000)]
[ConstantRange] Teach multiply to be cleverer about signed ranges.
Multiplication is not dependent on signedness, so just treating
all input ranges as unsigned is not incorrect. However it will cause
overly pessimistic ranges (such as full-set) when used with signed
negative values.
Teach multiply to try to interpret its inputs as both signed and
unsigned, and then to take the most specific (smallest population)
as its result.
llvm-svn: 231483
Tamas Berghammer [Fri, 6 Mar 2015 15:47:23 +0000 (15:47 +0000)]
Initialize ProcessPOSIXLog by NativeProcessLinux
Previously it was initialized by ProcessLinux but lldb-server don't
contain ProcessLinux anymore so it have to be initialized by
NativeProcessLinux also.
Differential revision: http://reviews.llvm.org/D8080
llvm-svn: 231482
Bruno Cardoso Lopes [Fri, 6 Mar 2015 15:11:41 +0000 (15:11 +0000)]
[AsmPrinter][TLOF] Make AArch64 test a bit more flexible
llvm-svn: 231481
Bruno Cardoso Lopes [Fri, 6 Mar 2015 14:41:56 +0000 (14:41 +0000)]
[AsmPrinter][TLOF] Split tests and move to appropriate directories
Follow up from r231474 and 231475 to appease buildbots
llvm-svn: 231480
Robert Flack [Fri, 6 Mar 2015 14:36:33 +0000 (14:36 +0000)]
Rename test/tools/lldb-gdbserver to test/tools/lldb-server
As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested.
Differential Revision: http://reviews.llvm.org/D8061
llvm-svn: 231479
Kuba Brecka [Fri, 6 Mar 2015 14:33:56 +0000 (14:33 +0000)]
Symbolizer refactoring: Make WinSymbolizer use SymbolizerTool interface
Reviewed at http://reviews.llvm.org/D8089
llvm-svn: 231478
Aaron Ballman [Fri, 6 Mar 2015 14:24:53 +0000 (14:24 +0000)]
Removing code that is unused after r231424; NFC.
llvm-svn: 231477
Benjamin Kramer [Fri, 6 Mar 2015 14:15:57 +0000 (14:15 +0000)]
Use delegating ctors to reduce code duplication. NFC.
llvm-svn: 231476
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:49:05 +0000 (13:49 +0000)]
[AsmPrinter][TLOF] 32-bit MachO support for replacing GOT equivalents
Add MachO 32-bit (i.e. arm and x86) support for replacing global GOT equivalent
symbol accesses. Unlike 64-bit targets, there's no GOTPCREL relocation, and
access through a non_lazy_symbol_pointers section is used instead.
-- before
_extgotequiv:
.long _extfoo
_delta:
.long _extgotequiv-_delta
-- after
_delta:
.long L_extfoo$non_lazy_ptr-_delta
.section __IMPORT,__pointers,non_lazy_symbol_pointers
L_extfoo$non_lazy_ptr:
.indirect_symbol _extfoo
.long 0
llvm-svn: 231475
Bruno Cardoso Lopes [Fri, 6 Mar 2015 13:48:45 +0000 (13:48 +0000)]
[AsmPrinter][TLOF] ARM64 MachO support for replacing GOT equivalents
Follow up r230264 and add ARM64 support for replacing global GOT
equivalent symbol accesses by references to the GOT entry for the final
symbol instead, example:
-- before
.globl _foo
_foo:
.long 42
.globl _gotequivalent
_gotequivalent:
.quad _foo
.globl _delta
_delta:
.long _gotequivalent-_delta
-- after
.globl _foo
_foo:
.long 42
.globl _delta
Ltmp3:
.long _foo@GOT-Ltmp3
llvm-svn: 231474
Benjamin Kramer [Fri, 6 Mar 2015 13:46:50 +0000 (13:46 +0000)]
CodingStyle: Allow delegating ctors
Delegating constructors seem to work fine with all supported compilers.
llvm-svn: 231473
Toma Tabacu [Fri, 6 Mar 2015 12:15:12 +0000 (12:15 +0000)]
[mips] [IAS] Add missing constraints and improve testing for the .module directive.
Summary:
None of the .set directives can be used before the .module directives. The .set mips0/pop/push were not triggering this constraint.
Also added testing for all the other implemented directives which are supposed to trigger this constraint.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7140
llvm-svn: 231465
Daniel Jasper [Fri, 6 Mar 2015 10:57:12 +0000 (10:57 +0000)]
clang-format: Slightly change indentation rules in for loops.
There was already a TODO to double-check whether the extra indenation
makes sense. A slightly different case reveals that it is actively harmful:
for (int i = 0; i <
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
bbbbbbbbbbbbbbbbbbbb <
ccccccccccccccc;
++i) {
}
Here (and it is probably not a totally infrequent case, it just works out that
"i < " is four spaces and so the four space extra indentation makes the
operator precedence confusing. So, this will now instead be formatted
as:
for (int i = 0; i <
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
bbbbbbbbbbbbbbbbbbbb <
ccccccccccccccc;
++i) {
}
llvm-svn: 231461
Pavel Labath [Fri, 6 Mar 2015 10:52:47 +0000 (10:52 +0000)]
Fix race condition with -o "process launch" on linux
Summary:
starting a debug session on linux with -o "process launch" lldb parameter was failing since
Target::Launch (in sychronous mode) is expecting to be able to receive public process events.
However, PlatformLinux did not set up event hijacking on process launch, which caused these
events to be processed elsewhere and left Target::Launch hanging. This patch enables event
interception in PlatformLinux (which was commented out).
Upon enabling event interception, I noticed an issue, which I traced back to the inconsistent
state of public run lock, which remained false even though public and private process states were
"stopped". I addressed this by making sure the run lock is "stopped" upon exit from
WaitForProcessToStop (which already had similar provisions for other return paths).
Test Plan: This should fix the intermittent TestFormats failure we have been experiencing on Linux.
Reviewers: jingham, clayborg, vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8079
llvm-svn: 231460
Daniel Jasper [Fri, 6 Mar 2015 10:39:14 +0000 (10:39 +0000)]
Change the way in which error case is being handled.
Specifically this:
* Prevents an "unused" warning in non-assert builds.
* In that error case return with out removing a child loop instead of
looping forever.
llvm-svn: 231459
Karthik Bhat [Fri, 6 Mar 2015 10:11:25 +0000 (10:11 +0000)]
Add a new pass "Loop Interchange"
This pass interchanges loops to provide a more cache-friendly memory access.
For e.g. given a loop like -
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
A[j][i] = A[j][i]+B[j][i];
is interchanged to -
for(int j=0;j<N;j++)
for(int i=0;i<N;i++)
A[j][i] = A[j][i]+B[j][i];
This pass is currently disabled by default.
To give a brief introduction it consists of 3 stages-
LoopInterchangeLegality : Checks the legality of loop interchange based on Dependency matrix.
LoopInterchangeProfitability: A very basic heuristic has been added to check for profitibility. This will evolve over time.
LoopInterchangeTransform : Which does the actual transform.
LNT Performance tests shows improvement in Polybench/linear-algebra/kernels/mvt and Polybench/linear-algebra/kernels/gemver becnmarks.
TODO:
1) Add support for reductions and lcssa phi.
2) Improve profitability model.
3) Improve loop selection algorithm to select best loop for interchange. Currently the innermost loop is selected for interchange.
4) Improve compile time regression found in llvm lnt due to this pass.
5) Fix issues in Dependency Analysis module.
A special thanks to Hal for reviewing this code.
Review: http://reviews.llvm.org/D7499
llvm-svn: 231458
Dmitry Vyukov [Fri, 6 Mar 2015 08:43:44 +0000 (08:43 +0000)]
asan: fix comment formatting
As per comments in http://reviews.llvm.org/D8032
llvm-svn: 231457
David Majnemer [Fri, 6 Mar 2015 08:11:32 +0000 (08:11 +0000)]
X86: Form IMGREL relocations for LLVM Functions
We supported forming IMGREL relocations from ConstantExprs involving
__ImageBase if the minuend was a GlobalVariable. Extend this
functionality to all GlobalObjects.
llvm-svn: 231456
Yaron Keren [Fri, 6 Mar 2015 07:49:14 +0000 (07:49 +0000)]
Silence C4715 'not all control paths return a value' warnings.
llvm-svn: 231455
Rui Ueyama [Fri, 6 Mar 2015 06:53:13 +0000 (06:53 +0000)]
PECOFF: Optimize the writer using parallel_for.
Previously applying 1 million relocations took about 2 seconds on my
Xeon 2.4GHz 8 core workstation. After this patch, it takes about 300
milliseconds. As a result, time to link chrome.dll becomes 23 seconds
to 21 seconds.
llvm-svn: 231454
Eric Fiselier [Fri, 6 Mar 2015 06:22:22 +0000 (06:22 +0000)]
Remove unneeded python import
llvm-svn: 231453
Rui Ueyama [Fri, 6 Mar 2015 06:07:32 +0000 (06:07 +0000)]
Support: Improve performance of FileOutputBuffer on Windows
We extend an underlying file before mmap'ing it, but it's not needed
on Windows. Extending file is slow on Windows, so we should avoid doing that.
The difference gets larger as the size of an output file gets larger.
It shove off 2 seconds out of 25 seconds when linking chrome.dll with LLD,
for example.
llvm-svn: 231452
Nico Weber [Fri, 6 Mar 2015 06:01:06 +0000 (06:01 +0000)]
Don't crash on non-public referenced dtors in toplevel classes.
Fixes PR22793, a bug that caused self-hosting to fail after the innocuous
r231254. See the bug for details.
llvm-svn: 231451
Enrico Granata [Fri, 6 Mar 2015 03:37:33 +0000 (03:37 +0000)]
Windows bot
llvm-svn: 231450
Enrico Granata [Fri, 6 Mar 2015 03:32:20 +0000 (03:32 +0000)]
Provide synthetic children for some vector types
Unlike GDB, we tackle the problem of representing vector types in different styles by having a synthetic child provider that recognizes the format you're trying to apply to the variable, and coming up with the right type and number of child values to match that format
This makes for a more compact representation and less visual noise
Fixes rdar://5429347
llvm-svn: 231449
Andrew Wilkins [Fri, 6 Mar 2015 02:49:07 +0000 (02:49 +0000)]
[llgo] Disable known failing packages in check-libgo
Summary:
There are two packages in libgo which have
known failures when running the "make check" rule.
This change disables those packages in the tests so
that we can run libgo tests without them until the
root causes are identified and resolved.
Test Plan: ran check-libgo rule
Reviewers: pcc
Reviewed By: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8003
llvm-svn: 231448
Michael Gottesman [Fri, 6 Mar 2015 02:10:03 +0000 (02:10 +0000)]
[objc-arc] Sprinkle some more auto on some iterators.
llvm-svn: 231447
Michael Gottesman [Fri, 6 Mar 2015 02:07:12 +0000 (02:07 +0000)]
[objc-arc] Move the detection of potential uses or altering of a ref count onto PtrState.
llvm-svn: 231446
Davide Italiano [Fri, 6 Mar 2015 02:05:03 +0000 (02:05 +0000)]
We want to add the entry point to the root set unconditionally, but these
asserts don't allow us to do it. Remove them, they're not really needed
anyway.
llvm-svn: 231445