Commit Graph

110418 Commits

Author SHA1 Message Date
Jim Grosbach 5838c0c47e ARM parsing and encoding for LDRB instruction.
llvm-svn: 137071
2011-08-08 22:37:06 +00:00
Jim Grosbach f6dbc3a57c Add FIXME.
llvm-svn: 137070
2011-08-08 22:11:33 +00:00
Jakob Stoklund Olesen c04a66b48e Implement isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE for ARM.
They improve the verbose assembly.

llvm-svn: 137069
2011-08-08 21:45:32 +00:00
Ted Kremenek a0cdf58b0c Fix another -Wuninitialized assertion failure (this one involving bit casts) resulting from the recent -Wuninitialized changes.
llvm-svn: 137068
2011-08-08 21:43:08 +00:00
Bruno Cardoso Lopes c96953c12a Add support for several vector shifts operations while in AVX mode. Fix PR10581
llvm-svn: 137067
2011-08-08 21:31:08 +00:00
Ted Kremenek 55a9b3ad7e Add -W flag for ARC warning "performSelector may cause a leak because its selector is unknown".
llvm-svn: 137066
2011-08-08 21:28:18 +00:00
Jim Grosbach 95466ce63b ARM load/store label parsing.
Allow labels for load/store instructions when parsing. There's encoding
issues, still, so this doesn't work all the way through, yet.

llvm-svn: 137064
2011-08-08 20:59:31 +00:00
Jakob Stoklund Olesen daa2cad723 Hoist hasLoadFromStackSlot and hasStoreToStackSlot.
These the methods are target-independent since they simply scan the
memory operands.  They can live in TargetInstrInfoImpl.

llvm-svn: 137063
2011-08-08 20:53:24 +00:00
Owen Anderson c40303885b Fix encodings for Thumb ASR and LSR immediate operands. They encode the range 1-32, with 32 encoded as 0.
llvm-svn: 137062
2011-08-08 20:42:17 +00:00
Eli Friedman a27da98921 Fix up the patterns for SXTB, SXTH, UXTB, and UXTH so that they are correctly active without HasT2ExtractPack. PR10611.
llvm-svn: 137061
2011-08-08 19:49:37 +00:00
Benjamin Kramer 1afd89ae36 Pacify virtual dtor warnings and cmake buildbots.
llvm-svn: 137060
2011-08-08 19:09:02 +00:00
Benjamin Kramer c22d50e5c3 Add MCInstrAnalysis class. This allows the targets to specify own versions of MCInstrDescs functions.
- Add overrides for ARM.
- Teach llvm-objdump to use this instead of plain MCInstrDesc.

llvm-svn: 137059
2011-08-08 18:56:44 +00:00
Benjamin Kramer 4c0423bc8f llvm-objdump: disassembly enhancements
- Indent simple loops
- Print unreachable blocks as .byte directives

llvm-svn: 137058
2011-08-08 18:41:34 +00:00
Benjamin Kramer 5d173c0dab llvm-objdump: Use help of CFG to print assembly when --cfg is passed.
This way we can avoid printing unreachable code (data).

llvm-svn: 137057
2011-08-08 18:32:12 +00:00
Devang Patel fee7cedbc9 Simplify by creating parent first.
llvm-svn: 137056
2011-08-08 18:22:10 +00:00
Fariborz Jahanian 5ac085ab3a objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance) 
"conformsTo" two protocols which conflict (have methods which conflict).
This patch fixes the previous patch where warnings were coming out in
non-deterministic order.  This is 2nd part of // rdar://6191214.

llvm-svn: 137055
2011-08-08 18:03:17 +00:00
Kaelyn Uhrain 6242220966 Make sure FunctionDecls aren't considered during overload resolution if there
are explicit template args.

llvm-svn: 137054
2011-08-08 17:35:31 +00:00
David Chisnall 9291851b13 Silence the category-replacing-class-method warning for +load: category
implementations of +load do not replace the class definition in a meaningful
sense, they are run when the category loads, the +load method for class is run
when the class is loaded.

llvm-svn: 137053
2011-08-08 17:32:19 +00:00
David Chisnall 51ed0d112b Fix typo so we don't use the wrong function for ending ObjC++ catch blocks (GNU runtimes)
llvm-svn: 137052
2011-08-08 17:26:06 +00:00
Chad Rosier 261f9ce371 Improved efficiency by using iterator returned by erase, rather then restarting.
Thanks to David Blaikie for pointing this out.

llvm-svn: 137051
2011-08-08 17:17:15 +00:00
Jakob Stoklund Olesen 4f0ace5674 Don't clobber pending ST regs when FP regs are killed.
X86FloatingPoint keeps track of pending ST registers for an upcoming
inline asm instruction with fixed stack register constraints.  It does
this by remembering which FP register holds the value that should appear
at a fixed stack position for the inline asm.

When that FP register is killed before the inline asm, make sure to
duplicate it to a scratch register, so the ST register still has a live
FP reference.

This could happen when the same FP register was copied to two ST
registers, or when a spill instruction is inserted between the ST copy
and the inline asm.

This fixes PR10602.

llvm-svn: 137050
2011-08-08 17:15:43 +00:00
Howard Hinnant 49b607a2cd Silence some -Wall warnings pointed out by Marshall Clow
llvm-svn: 137047
2011-08-08 15:49:07 +00:00
Marshall Clow 7c9f1fa9cf Remove include reference to non-existant file cxa_exception_storage.hpp
llvm-svn: 137046
2011-08-08 15:12:08 +00:00
Raghesh Aloor 490c5988f9 Memaccess: Some style changes
llvm-svn: 137043
2011-08-08 08:34:16 +00:00
Bill Wendling 49bfb12c46 Clean up the grammar for the landingpad instruction.
llvm-svn: 137042
2011-08-08 08:06:05 +00:00
Bill Wendling e632cb3600 Remove unnecessary space.
llvm-svn: 137041
2011-08-08 08:02:48 +00:00
Bill Wendling a503fc0494 Fix typo found by John.
llvm-svn: 137040
2011-08-08 07:58:58 +00:00
Craig Topper 61147ed270 Fix comment (test commit)
llvm-svn: 137039
2011-08-08 06:10:39 +00:00
John McCall 45e429524b Avoid fallthrough-branching to an inactive cleanup even if it's
otherwise required.

llvm-svn: 137029
2011-08-07 07:05:57 +00:00
Chris Lattner c3e74cdf4d strengthen up an assertion: you can't create a constant struct
with an opaque struct type, it doesn't make sense.  This should
resolve PR10473.

llvm-svn: 137028
2011-08-07 04:18:48 +00:00
Alexis Hunt 7d1492a99d Add a __has_feature macro for generalized initializers, turned off
because we don't support them yet.

llvm-svn: 137027
2011-08-07 00:34:32 +00:00
Jakob Stoklund Olesen 22f37a1eb1 Fix typo. Thanks, Andy!
llvm-svn: 137023
2011-08-06 18:20:24 +00:00
John McCall 5939b16135 Do l-value conversion, etc., on a switch condition expression in
ActOnStartOfSwitchStmt (i.e. before binding up a full-expression)
instead of ActOnFinishSwitchStmt.

Among other things, this means that property l-values are properly
converted inside the full-expression.

llvm-svn: 137014
2011-08-06 07:30:58 +00:00
Andrew Trick 6d45a01b67 Made SCEV's UDiv expressions more canonical. When dividing a
recurrence, the initial values low bits can sometimes be ignored.

To take advantage of this, added FoldIVUser to IndVarSimplify to fold
an IV operand into a udiv/lshr if the operator doesn't affect the
result.

-indvars -disable-iv-rewrite now transforms

i = phi i4
i1 = i0 + 1
idx = i1 >> (2 or more)
i4 = i + 4

into

i = phi i4
idx = i0 >> ...
i4 = i + 4

llvm-svn: 137013
2011-08-06 07:00:37 +00:00
Ted Kremenek 54d456758e [analyzer] Start sketching out a new BugReporterVisitor that inspects branches and other expressions to generate interesting path events in diagnostics.
llvm-svn: 137012
2011-08-06 06:54:45 +00:00
John McCall f82bdf6dd1 Be sure to destroy the normal entry block of a cleanup that we
aren't actually going to make a normal cleanup for.  Sometimes
we optimistically create branches to such blocks for fixups,
and then we resolve the fixup to somewhere within the cleanup's
scope, and then the cleanup is actually not reachable for some
reason.  The process of resolving the fixup leaves us with
switches whose default edge leads to the cleanup;  we can
replace that with unreachable, then (in many cases) turn
the switch into an unconditional branch.

Fixes PR10467.

llvm-svn: 137011
2011-08-06 06:53:52 +00:00
Benjamin Kramer f7bb3e5bd0 Fix HTML.
llvm-svn: 137010
2011-08-06 03:04:45 +00:00
Benjamin Kramer 8c54367935 Only look at decls after the current one when checking if it's the last field in a record.
llvm-svn: 137009
2011-08-06 03:04:42 +00:00
Greg Clayton 2d0e7a4a2e Fixed a loop that I was testing changes with and forgot
to revert to zero.

llvm-svn: 137008
2011-08-06 00:50:36 +00:00
Ted Kremenek 7765dda06a [analyzer] add more buffer overflow tests to show we handle sizeof(VLA) in obstruse ways...
llvm-svn: 137007
2011-08-06 00:34:48 +00:00
Ted Kremenek 84a1ca5280 [analyzer] Simplify logic for ExprEngine::VisitUnaryExprOrTypeTraitExpr to avoid recursion to subexpression.
This exposed bugs in the live variables analysis, and a latent analyzer bug in the SymbolReaper.

llvm-svn: 137006
2011-08-06 00:30:00 +00:00
Ted Kremenek c91ca30b4c [analyzer] Change SymbolReaper to store region roots implied by the Environment, allowing it be queried when
determining if symbols derived from regions are still live.

llvm-svn: 137005
2011-08-06 00:29:57 +00:00
Sean Callanan 69b5341c6a Made the expression parser use the StackFrame's
variable search API rather than rolling its own,
fixing one of our testcases.

llvm-svn: 137004
2011-08-06 00:28:14 +00:00
Anna Zaks 177ecfac21 KeychainAPI checker: Track SymbolMetadata instead of MemRegion in checker state so that we could clear the state on evalDeadSymbols; also track the return value.
llvm-svn: 137003
2011-08-05 23:52:45 +00:00
Jakob Stoklund Olesen d4bb1d43e8 Reject RS_Spill ranges from local splitting as well.
All new local ranges are marked as RS_New now, so there is no need to
attempt splitting of RS_Spill ranges any more.

llvm-svn: 137002
2011-08-05 23:50:33 +00:00
Jakob Stoklund Olesen 02cf10bdfd Only mark remainder intervals as RS_Spill after per-block splitting.
The local ranges created get to stay in the RS_New stage, just like for
local and region splitting.

This gives tryLocalSplit a bit more freedom the first time it sees one
of these new local ranges.

llvm-svn: 137001
2011-08-05 23:50:31 +00:00
Anna Zaks 3fca5e27e0 Static Analyzer: Add a convinience API. Add comment.
llvm-svn: 137000
2011-08-05 23:47:13 +00:00
Sean Callanan 72e4940bd1 This is an overhaul of the expression parser code
that detects what context the current expression is
meant to execute in.  LLDB now properly consults
the method declaration in the debug information
rather than trying to hunt down the "this" or "self"
pointer by name, which can be misleading.

Other fixes include:

- LLDB now properly detects that it is inside
  an inlined C++ member function.

- LLDB now allows access to non-const members when
  in const code.

- The functions in SymbolFile that locate the
  DeclContext containing a DIE have been renamed
  to reflect what they actually do.  I have added
  new functions that find the DeclContext for the
  DIE itself.

I have also introduced testcases for C++ and 
Objective-C.

llvm-svn: 136999
2011-08-05 23:43:37 +00:00
Ted Kremenek 1cd34b8fea Revert 136984 and 136927.
llvm-svn: 136998
2011-08-05 23:31:22 +00:00
Kaelyn Uhrain 2e7aa5ae1f Perform array bounds checking in more situations and properly handle special
case situations with the unary operators & and *. Also extend the array bounds
checking to work with pointer arithmetic; the pointer arithemtic checking can
be turned on using -Warray-bounds-pointer-arithmetic.

The changes to where CheckArrayAccess gets called is based on some trial &
error and a bunch of digging through source code and gdb backtraces in order
to have the check performed under as many situations as possible (such as for
variable initializers, arguments to function calls, and within conditional in
addition to the simpler cases of the operands to binary and unary operator)
while not being called--and triggering warnings--more than once for a given
ArraySubscriptExpr.

llvm-svn: 136997
2011-08-05 23:18:04 +00:00