Commit Graph

144134 Commits

Author SHA1 Message Date
David Blaikie 7a30dc53c5 Use None rather than Optional<T>() where possible.
llvm-svn: 175705
2013-02-21 01:47:18 +00:00
David Blaikie c4071fe13d Rename TypeLoc's isType to isKind
Matches changes made to SVal's similar functions based on Jordan Rose's review
feedback to r175594.

Also change isKind to take a reference rather than a non-null pointer, while I'm
at it. (& make TypeLoc::isKind private)

llvm-svn: 175704
2013-02-21 01:47:08 +00:00
Jordan Rose d1c7cf26ae [analyzer] Tighten up safety in the use of lazy bindings.
- When deciding if we can reuse a lazy binding, make sure to check if there
  are additional bindings in the sub-region.
- When reading from a lazy binding, don't accidentally strip off casts or
  base object regions. This slows down lazy binding reading a bit but is
  necessary for type sanity when treating one class as another.

A bit of minor refactoring allowed these two checks to be unified in a nice
early-return-using helper function.

<rdar://problem/13239840>

llvm-svn: 175703
2013-02-21 01:34:51 +00:00
Enrico Granata a6db933979 If you say
(lldb) frame variable
without first launching the inferior, you get:
error: invalid frame

this is misleading and should probably hint that there is no process. Adding this flag makes sure that we get:
error: invalid process

The difference between eFlagRequiresProcess and eFlagProcessMustBeLaunched is an open question.

llvm-svn: 175702
2013-02-21 01:29:04 +00:00
Ted Kremenek 0332558894 Strip 'llvm' from 'llvm::Optional' uses.
llvm-svn: 175701
2013-02-21 01:29:01 +00:00
Sean Callanan b45a6f065e Fixed a bug where certain vector code didn't
work on i386.  Now we let the JIT emit SSE/SSE2
instructions on i386.

<rdar://problem/13240476>

llvm-svn: 175700
2013-02-21 01:04:23 +00:00
Richard Trieu 515dc0f100 Remove commented out code.
llvm-svn: 175699
2013-02-21 00:50:43 +00:00
Fariborz Jahanian 134cec62ab objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317

llvm-svn: 175698
2013-02-21 00:40:10 +00:00
Bill Schmidt f5b474c6c6 PPCDAGToDAGISel::PostprocessISelDAG()
This patch implements the PPCDAGToDAGISel::PostprocessISelDAG virtual
method to perform post-selection peephole optimizations on the DAG
representation.

One optimization is implemented here:  folds to clean up complex
addressing expressions for thread-local storage and medium code
model.  It will also be useful for large code model sequences when
those are added later.  I originally thought about doing this on the
MI representation prior to register assignment, but it's difficult to
do effective global dead code elimination at that point.  DCE is
trivial on the DAG representation.

A typical example of a candidate code sequence in assembly:

   addis 3, 2, globalvar@toc@ha
   addi  3, 3, globalvar@toc@l
   lwz   5, 0(3)

When the final instruction is a load or store with an immediate offset
of zero, the offset from the add-immediate can replace the zero,
provided the relocation information is carried along:

   addis 3, 2, globalvar@toc@ha
   lwz   5, globalvar@toc@l(3)

Since the addi can in general have multiple uses, we need to only
delete the instruction when the last use is removed.

llvm-svn: 175697
2013-02-21 00:38:25 +00:00
David Blaikie ef04593de1 Provide a "None" value for convenience when using Optional<T>()
This implementation of NoneType/None does have some holes but I haven't
found one that doesn't - open to improvement.

llvm-svn: 175696
2013-02-21 00:27:28 +00:00
David Blaikie f8db6917b3 Mark unimplemented function with LLVM_DELETED_FUNCTION
llvm-svn: 175695
2013-02-21 00:26:17 +00:00
David Blaikie 7d26e7ef51 Doxycomment SVal's getAs/castAs.
Also document TypeLoc's operations similarly, since it's a good idea.

Post-commit CR feedback from Anna Zaks regarding r175594.

llvm-svn: 175694
2013-02-21 00:26:14 +00:00
Bill Schmidt 3822ef2c0c Relocation enablement for PPC DAG postprocessing pass
llvm-svn: 175693
2013-02-21 00:05:29 +00:00
Chad Rosier c0955a57df Formatting.
llvm-svn: 175692
2013-02-20 23:57:30 +00:00
Jason Molenda 279c196d84 *ahem* Enrico.
llvm-svn: 175691
2013-02-20 23:51:13 +00:00
Jakob Stoklund Olesen 1744fd8018 Don't allocate memory in LiveInterval::join().
Rewrite value numbers directly in the 'Other' LiveInterval which is
moribund anyway. This avoids allocating the OtherAssignments vector.

llvm-svn: 175690
2013-02-20 23:51:10 +00:00
Jim Ingham 04c1de182b Mention "return" -> "thread return"
llvm-svn: 175689
2013-02-20 23:38:37 +00:00
Lang Hames 24e3759230 Kill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
just be turned into kills on the spot.

llvm-svn: 175688
2013-02-20 23:36:57 +00:00
Pedro Artigas 0c09481d6b as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended.

llvm-svn: 175687
2013-02-20 23:30:56 +00:00
Jack Carter 1ac5322e61 ELF symbol table field st_other support,
excluding visibility bits.

Mips specific standalone assembler directive "set at".

This directive changes the general purpose register
that the assembler will use when given the symbolic
register name $at.

This does not include negative testing. That will come
in a future patch.

A side affect of this patch recognizes the different 
GPR register names for temporaries between old abi
and new abi so a test case for that is included.

Contributer: Vladimir Medic
llvm-svn: 175686
2013-02-20 23:11:17 +00:00
Jakob Stoklund Olesen b389271101 Copy single reaching defs directly into the LiveInterval.
When findReachingDefs() finds that only one value can reach the basic
block, just copy the work list of visited blocks directly into the live
interval.

Sort the block list and use a LiveRangeUpdater to make the bulk add
fast.

When multiple reaching defs are found, transfer the work list to the
updateSSA() work list as before. Also use LiveRangeUpdater in
updateLiveIns() following updateSSA().

This makes live interval analysis more than 3x faster on one huge test
case.

llvm-svn: 175685
2013-02-20 23:08:26 +00:00
Bill Wendling 1c20ff028e Add and remove the attribute from the correct slot.
The slot that we're adding/removing the attribute from may not be the same as
the attribute coming in. Make sure that they match up before we try to
add/remove them.
PR15313

llvm-svn: 175684
2013-02-20 23:04:11 +00:00
Bill Schmidt 4437ad7d94 Stabilize vec_constants.ll
llvm-svn: 175683
2013-02-20 22:43:03 +00:00
Erik Verbruggen ef40cdd95b Fix accidental concatenation for "outputuntil" in the -debug-buffer-size option description.
llvm-svn: 175682
2013-02-20 22:33:46 +00:00
Jordan Rose 011bda8031 Revert "intmax_t is long long on Darwin, not long."
'long' and 'long long' are different for the purposes of mangling.
This caused <rdar://problem/13254874>.

This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c.

llvm-svn: 175681
2013-02-20 22:28:41 +00:00
Jim Grosbach 6f54f787b4 MCParser: Update method names per coding guidelines.
s/ParseMSInlineAsm/parseMSInlineAsm/

llvm-svn: 175680
2013-02-20 22:25:15 +00:00
David Blaikie 05785d1622 Include llvm::Optional in clang/Basic/LLVM.h
Post-commit CR feedback from Jordan Rose regarding r175594.

llvm-svn: 175679
2013-02-20 22:23:23 +00:00
David Blaikie e359f3caee Remove redundant Optional type in favor of llvm::Optional
llvm-svn: 175678
2013-02-20 22:23:03 +00:00
David Blaikie 0336f5d534 Use op-> directly rather than via Optional<T>::getPointer.
Post-commit CR feedback from Jordan Rose regarding r175594.

llvm-svn: 175677
2013-02-20 22:23:01 +00:00
David Blaikie fa5eeba1dc Rename SVal::isType functions to SVal::isKind
Post-commit CR feedback from Jordan Rose regarding r175594.

llvm-svn: 175676
2013-02-20 22:22:59 +00:00
Jim Grosbach d2037eb1ee MCParser: Update method names per coding guidelines.
s/AddDirectiveHandler/addDirectiveHandler/
s/ParseMSInlineAsm/parseMSInlineAsm/
s/ParseIdentifier/parseIdentifier/
s/ParseStringToEndOfStatement/parseStringToEndOfStatement/
s/ParseEscapedString/parseEscapedString/
s/EatToEndOfStatement/eatToEndOfStatement/
s/ParseExpression/parseExpression/
s/ParseParenExpression/parseParenExpression/
s/ParseAbsoluteExpression/parseAbsoluteExpression/
s/CheckForValidSection/checkForValidSection/

http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

No functional change intended.

llvm-svn: 175675
2013-02-20 22:21:35 +00:00
Cameron Zwarich 2ad3ca37bd Only use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
and SlotIndexes.

llvm-svn: 175674
2013-02-20 22:10:02 +00:00
Cameron Zwarich caad7e10c1 Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically.

llvm-svn: 175673
2013-02-20 22:10:00 +00:00
Cameron Zwarich 8e7dc068c9 Make repairIntervalsInRange() more robust. There are now no longer any liveness-
related failures when running 'make check' without LiveVariables with the
verifier enabled. Some of the remaining failures elsewhere may still be fallout
from incorrect updating of LiveIntervals or the few missing cases left in the
two-address pass.

llvm-svn: 175672
2013-02-20 22:09:57 +00:00
Andrew Kaylor 2ed4dc9f27 Change ELF relocation model to static
llvm-svn: 175671
2013-02-20 21:39:02 +00:00
Arnold Schwaighofer 3f9568e921 DAGCombiner: Fold pointless truncate, bitcast, buildvector series
(2xi32) (truncate ((2xi64) bitcast (buildvector i32 a, i32 x, i32 b, i32 y)))
can be folded into a (2xi32) (buildvector i32 a, i32 b).

Such a DAG would cause uneccessary vdup instructions followed by vmovn
instructions.

We generate this code on ARM NEON for a setcc olt, 2xf64, 2xf64. For example, in
the vectorized version of the code below.

double A[N];
double B[N];

void test_double_compare_to_double() {
  int i;
  for(i=0;i<N;i++)
    A[i] = (double)(A[i] < B[i]);
}

radar://13191881

Fixes bug 15283.

llvm-svn: 175670
2013-02-20 21:33:32 +00:00
Daniel Malea 64c2e69809 Add logging of which test cases are run (through dosep) to help diagnose any hangs/crashes in the buildbots.
llvm-svn: 175669
2013-02-20 21:31:47 +00:00
Jim Grosbach d15cd2a11c R600: Update for name changes from r175667.
llvm-svn: 175668
2013-02-20 21:31:28 +00:00
Jim Grosbach 341ad3e72a Update TargetLowering ivars for name policy.
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly

ivars should be camel-case and start with an upper-case letter. A few in
TargetLowering were starting with a lower-case letter.

No functional change intended.

llvm-svn: 175667
2013-02-20 21:13:59 +00:00
Daniel Malea c6a70063cb Fix invalid TestBitfields case (thanks Filipe!), and xfail one case due to GCC compiler bug.
Turns out unnamed bit fields should not be accessed ever in C (C99 section 4.7.8) or C++
(C++11 section 9.6). 

Unrelated to the above, this commit marks TestBitfields as expected-to-fail with GCC as 4.7
has problems with padding... the size of the struct with a uint32_t member is reported as 12
when GCC is used. Clang emits correct code.

Parts of this patch prepared by Filipe Cabecinhas!

llvm-svn: 175666
2013-02-20 21:11:20 +00:00
Daniel Malea 7932c232bd Skip TestCompletion case that fails on linux (with gcc) because the input prompt is not displayed (llvm.org/pr14637)
llvm-svn: 175665
2013-02-20 20:58:20 +00:00
Matt Kopec 93ee88179b Fix TestPublicAPIHeaders test on Linux.
-Change the build_dir variable name to lib_dir
 -Set lib_dir to the correct location on Linux
 -Set LD_EXTRAS to the actual lldb library

llvm-svn: 175664
2013-02-20 20:54:10 +00:00
Bill Schmidt c6cbecc2c7 Additional fixes for bug 15155.
This handles the cases where the 6-bit splat element is odd, converting
to a three-instruction sequence to add or subtract two splats.  With this
fix, the XFAIL in test/CodeGen/PowerPC/vec_constants.ll is removed.

llvm-svn: 175663
2013-02-20 20:41:42 +00:00
Jim Ingham dffa9773ce Handle the case where the runtime uses class_getMethodImplementation for both scalar and structure
return methods.

rdar://problem/13238168

llvm-svn: 175662
2013-02-20 20:35:38 +00:00
Reid Kleckner 15f2d1f4be [Sanitizer] Try to fix infinite loop in frame pointer unwinder
Using > instead of >= ensures that each frame deref makes progress and
that we eventually terminate.

Issue: https://code.google.com/p/address-sanitizer/issues/detail?id=162
llvm-svn: 175661
2013-02-20 20:29:48 +00:00
Richard Smith b19337fbe4 PR15311: Finish implementation of the suggested resolution of core issue 1488,
which allows grouping parens in an abstract-pack-declarator. This was already
mostly implemented, but missed some cases. Add an ExtWarn for use of this
extension until CWG ratifies it.

llvm-svn: 175660
2013-02-20 20:19:27 +00:00
Michael J. Spencer 1366a61242 [objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.
llvm-svn: 175659
2013-02-20 20:18:10 +00:00
Chad Rosier 4d87d45a05 Update a comment that looks to have been accidentally deleted many moons ago.
llvm-svn: 175658
2013-02-20 20:15:55 +00:00
Michael J. Spencer e4c0e3712f [ELF][Writer] Add .interp section.
llvm-svn: 175657
2013-02-20 20:13:47 +00:00
Daniel Malea fce7f1f434 Fix a bug that causes dotest.py to exit with a passing exit-code, even if some tests fail
- occurs when multiple compilers/architectures are tested (via -C or -A flags)

llvm-svn: 175656
2013-02-20 20:12:11 +00:00