Matches the existing code for scalar default arguments. Complex default
arguments probably need the same handling too (test/fix to that coming
next).
llvm-svn: 228588
When creating a scev for sext({X,+,Y}), scev checks if the expression
is equivalent to {sext X,+,zext Y}. If it can prove that, it also
tags the original {X,+,Y} as <nsw>, which is not correct.
In the test case I run `-scalar-evolution` twice because the bug
manifests only once SCEV has run through and seen the `sext`
expressions (and then does a in-place mutation on {X,+,Y}).
Differential Revision: http://reviews.llvm.org/D7495
llvm-svn: 228586
As far as I can tell r228568 was the right workaround, and r228567 was
unnecessary. If reverting this causes problems on the bots I'll reinstate it.
llvm-svn: 228585
This test case was checking for a specific stop reason which is different on
Linux. This caused the test to fail. It now only checks for stoppped. Also added
some more steps to run to main so that we dont pass when application has run to
completion.
llvm-svn: 228584
Summary: Warn when the return type of assign operators is not Class&.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6667
llvm-svn: 228583
veqv (vector equivalence)
vnand
vorc
I increased the AddedComplexity for these instructions to 500 to ensure they are generated instead of issuing other VSX instructions.
Phabricator review: http://reviews.llvm.org/D7469
llvm-svn: 228580
Previously the offset field showed the offset from the section base.
I have fixed it so that first disassembled instruction has offset of 0.
Also made a little modification in the test case to match the output coming
form the lldb-mi.
llvm-svn: 228577
The test case were failing becuase my test compiler was gcc. The generated
code behaved a bit differently to the how the test expected. Adjusted a few
lines so that it works on both gcc and clang.
llvm-svn: 228576
For the attached test case different types are used in the ICmpInst
and SelectInst that represent the min/max expressions. However, if the
ICmpInst type is smaller a comparison with the sign/zero extended
operands would have yielded the same result. This situation might
arise after the instruction combination pass was applied.
Differential Revision: http://reviews.llvm.org/D7338
llvm-svn: 228572
Still yellow because 3.6 is unreleased. While there make Urbana paper
links clickable and list binary literals as available in Clang 2.9
(they've been available basically since the dawn of Clang, but not
having a version number in the table looks weird)
llvm-svn: 228571
Summary:
When debugging two targets concurrently, the pseude terminal master fd from the first one would
leak into the second. This fixes the problem by setting O_CLOEXEC on the master fd. Test
included.
Reviewers: clayborg, vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7466
llvm-svn: 228570
Apparently gcc-4.7.2 is touchy about 'this' appearing in a lambda capture list
along with other captures. I've rewritten my captures to try to avoid the issue.
llvm-svn: 228567
wrong basic block.
This would happen when the result of an invoke was used by a phi instruction
in the invoke's normal destination block. An instruction to reload the invoke's
value would get inserted before the critical edge was split and a new basic
block (which is the correct insertion point for the reload) was created. This
commit fixes the bug by splitting the critical edge before all the reload
instructions are inserted.
Also, hoist up the code which computes the insertion point to the only place
that need that computation.
rdar://problem/15978721
llvm-svn: 228566
Some parts of DeadArgElim were only considering the individual fields
of StructTypes separately, but others (where insertvalue &
extractvalue instructions occur) also looked into ArrayTypes.
This one is an actual bug; the mismatch can lead to an argument being
considered used by a return sub-value that isn't being tracked (and
hence is dead by default). It then gets incorrectly eliminated.
llvm-svn: 228559
Previously, a non-extractvalue use of an aggregate return value meant
the entire return was considered live (the algorithm gave up
entirely). This was correct, but conservative. It's better to actually
look at that Use, making the analysis results apply to all sub-values
under consideration.
E.g.
%val = call { i32, i32 } @whatever()
[...]
ret { i32, i32 } %val
The return is using the entire aggregate (sub-values 0 and 1). We can
still simplify @whatever if we can prove that this return is itself
unused.
Also unifies the logic slightly between aggregate and non-aggregate
cases..
llvm-svn: 228558
This patch refactors a key piece of the Orc APIs: It removes the
*::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target
addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn
respectively, which return instances of the new JITSymbol type. Unlike the old
methods, calling findSymbol or findSymbolIn does not cause the symbol to be
immediately materialized when found. Instead, the symbol will be materialized
if/when the getAddress method is called on the returned JITSymbol. This allows
us to query for the existence of symbols without actually materializing them. In
the future I expect more information to be attached to the JITSymbol class, for
example whether the returned symbol is a weak or strong definition. This will
allow us to properly handle weak symbols and multiple definitions.
llvm-svn: 228557
Make assume (load (call|invoke) != null) set nonNull return attribute
for the call and invoke. Also include tests.
Differential Revision: http://reviews.llvm.org/D7107
llvm-svn: 228556
add recurrences don't overflow.
This change makes the optimization more restrictive. It still assumes
that an overflowing `add nsw` is undefined behavior; and this change
will need revisiting once we have a consistent semantics for poison
values.
Differential Revision: http://reviews.llvm.org/D7331
llvm-svn: 228552
Dumping a symbol often requires access to data that isn't inside
the symbol hierarchy, but which is only accessible through the
top-level session. This patch is a pure interface change to give
symbols a reference to the session.
llvm-svn: 228542
For some time, eclipse (CDT) uses full path of the file in break-insert command
when putting breakpoint on a source line. On windows, a typical command looks
like the following.
56-break-insert -f F:\\work\\ws\\test\\main.c:49
Current implementation in lldb-mi have problem in 2 ways.
1. It was assuming that there will be only one : in the path which is wrong if full
path is supplied.
2. CDT sends out path with double backslashes in windows which gives error on
resolution.
Fixed the : issue in lldb-mi. Changed FileSpec::Normalize to make sure that it
handles the path with \\ correctly. Added test cases to check for full path in
both lldb-mi and lldb. Also added a test case to check SBFileSpec with double
slashes.
llvm-svn: 228538