Commit Graph

70341 Commits

Author SHA1 Message Date
Edward O'Callaghan 462e4ab4ac Bring Darwin into the switch-case statement instead of its own if for readability.
llvm-svn: 84646
2009-10-20 17:22:50 +00:00
Fariborz Jahanian 040d75d9b6 Issue warning if method body starts with a semicolon.
Fixes 
<rdar://problem/7308503> clang should disallow the trailing semicolon in method definitions

llvm-svn: 84645
2009-10-20 16:39:13 +00:00
Steve Naroff bb4568a37d Add an example to help claify the process/assumptions...
llvm-svn: 84642
2009-10-20 16:36:34 +00:00
Jim Grosbach 5f2581a37a Register re-use for scavenged frame indices must check for re-deginition
of the register in the instruction which kills the scavenged value.

llvm-svn: 84641
2009-10-20 16:33:57 +00:00
Dan Gohman 4a43e3068d Make TranslateX86CC return COND_INVALID instead of aborting when it
encounters an OEQ or UNE comparison, and update its callers to check
for this return status and recover. This fixes a problem resulting from
the LowerOperation hooks being called from LegalizeVectorOps, because
LegalizeVectorOps only lowers vectors, so OEQ and UNE comparisons may
still be at large. This fixes PR5092.

llvm-svn: 84640
2009-10-20 16:22:37 +00:00
Torok Edwin cf10ec951d Fix PR5258, jump-threading creating invalid PHIs.
When an incoming value for a PHI is updated, we must also updated all other
incoming values for the same BB to match, otherwise we create invalid PHIs.

llvm-svn: 84638
2009-10-20 15:42:00 +00:00
Torok Edwin 729d92bd74 Fix PR4313: IPSCCP was not setting the lattice value for the invoke instruction
when the invoke had multiple return values: it set the lattice value only on the
extractvalue.
This caused the invoke's lattice value to remain the default (undefined), and
later propagated to extractvalue's operand, which incorrectly introduces
undefined behavior.

llvm-svn: 84637
2009-10-20 15:15:09 +00:00
Steve Naroff 531e284064 - Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This seems cleaner to me without sacrificing much flexibility.
- Remove clang_wantOnlyLocalDeclarations().

- Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit().

- Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'.

llvm-svn: 84634
2009-10-20 14:46:24 +00:00
Benjamin Kramer 3301207a15 Random #include pruning.
llvm-svn: 84632
2009-10-20 11:44:38 +00:00
Sanjiv Gupta 8296e62244 This file is replaeced by PIC16Section.h.
llvm-svn: 84628
2009-10-20 09:16:32 +00:00
Eli Friedman 06ed2a5c94 Remove default argument for ImpCastExprToType. Add appropriate argument
to all callers.  Switch a few other users of CK_Unknown to proper cast 
kinds.

Note that there are still some situations where we end up with 
CK_Unknown; they're pretty easy to find with grep. There 
are still a few missing conversion kinds, specifically 
pointer/int/float->bool and the various combinations of real/complex 
float/int->real/complex float/int.

llvm-svn: 84623
2009-10-20 08:27:19 +00:00
Daniel Dunbar 2cb87a9b8f NNT: Implement "config mode", use -config path/to/llvm-config
- This runs the nightly test and does all the submission logic, but using the
   LLVM build specified by the llvm-config.

 - Useful for, among other things, testing NNT itself.

llvm-svn: 84620
2009-10-20 07:30:54 +00:00
Daniel Dunbar 5e64fd3e1e NNT: Remove unused BUILDTYPE argument.
llvm-svn: 84619
2009-10-20 07:30:46 +00:00
Ted Kremenek 2e385f9319 Call 'clear()' in ~RopePieceBTreeLeaf(), decrementing the reference
counts of the bufffers referened by the RopePieces in
RopePieceBTreeLeaf.  This (I believe) corrently fixes the leak I meant
to fix in r84601 (which ended up causing an overrelease).

llvm-svn: 84615
2009-10-20 06:31:34 +00:00
Chris Lattner 9351e4f4b2 implement some more easy hooks.
llvm-svn: 84614
2009-10-20 06:22:33 +00:00
Chris Lattner 60d5131653 Implement some hooks, make printOperand abort if unknown modifiers are
present.

llvm-svn: 84613
2009-10-20 06:15:28 +00:00
Douglas Gregor a5cb6da0cd Handle substitutions into the "first qualifier in scope" of a
qualified member access expression (e.g., t->U::member) when that
first qualifier refers to a template parameters.

llvm-svn: 84612
2009-10-20 05:58:46 +00:00
Chris Lattner 227767b4e5 t2MOVi32imm is currently always lowered by the Thumb2ITBlockPass.
llvm-svn: 84611
2009-10-20 05:58:02 +00:00
Ted Kremenek 988c5811ee Revert 84601. Looks like it was causing failures on some systems.
llvm-svn: 84610
2009-10-20 05:53:05 +00:00
Ted Kremenek cbd395c898 BumpVectorContext: Use 'unsigned' integer type with PointerIntUnion instead of bool to keep it clear that we are reasoning about an unsigned integer with a single bit.
llvm-svn: 84607
2009-10-20 05:49:17 +00:00
Chris Lattner bd19b18100 Implement PR5242: don't desugar a type more than once in a diagnostic. This
implements a framework that allows us to use information about previously
substituted values to simplify subsequent ones.  Maybe this would be useful
for C++'y stuff, who knows.  We now get:

t.c:4:21: error: invalid operands to binary expression ('size_t' (aka 'unsigned long *') and 'size_t')
  return (size_t) 0 + (size_t) 0;
         ~~~~~~~~~~ ^ ~~~~~~~~~~

on the testcase.  Note that size_t is only aka'd once.

llvm-svn: 84604
2009-10-20 05:36:05 +00:00
Daniel Dunbar 7e858573a8 PowerPC ifdef'ing considered more complicated than one might like.
llvm-svn: 84603
2009-10-20 05:33:23 +00:00
Chris Lattner c243f299ce teach FormatDiagnostic to aggregate previously formatted arguments and
pass them down into the ArgToStringFn implementation.  This allows 
redundancy across operands to a diagnostic to be eliminated.

This isn't used yet, so no functionality change.

llvm-svn: 84602
2009-10-20 05:25:22 +00:00
Ted Kremenek 2f9876cf7c Fix a reference count imbalance in RewriteRope::MakeRopeString().
This was causing a ton of memory to be leaked when using HTML
diagnostics with the static analyzer (on large files with many errors).

llvm-svn: 84601
2009-10-20 05:25:11 +00:00
Daniel Dunbar f0b3d15cfe Wire up the ARM MCInst printer, for llvm-mc.
llvm-svn: 84600
2009-10-20 05:15:36 +00:00
Chris Lattner dac91470d7 code cleanup, convert if tree to switch etc.
llvm-svn: 84599
2009-10-20 05:12:36 +00:00
Dan Gohman c0964a571b Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks are
tracked. Instead of trying to manually keep track of these locations
while doing complex modifications, just recompute them when they're needed.
This fixes a bug in which the TopMBB and BotMBB were not correctly updated,
leading to invalid transformations.

llvm-svn: 84598
2009-10-20 04:50:37 +00:00
Evan Cheng ccc2e0cbda Trim unnecessary includes.
llvm-svn: 84597
2009-10-20 04:23:20 +00:00
Dan Gohman d383c2f6ba Add getTopBlock and getBottomBlock member functions to MachineLoopInfo.
llvm-svn: 84596
2009-10-20 04:16:37 +00:00
Nick Lewycky 393c71cdd7 Correct test for PowerPC.
llvm-svn: 84595
2009-10-20 04:09:50 +00:00
Daniel Dunbar 074d8810cd Revert "Tweak top-level Makefile to facilitate Apple-style build.", this is
breaking Clang's Apple-style build.

llvm-svn: 84592
2009-10-20 02:23:13 +00:00
Daniel Dunbar e97680f7b9 NNT: Remove duplicate verbose print.
llvm-svn: 84591
2009-10-20 02:23:05 +00:00
Mike Stump d015328f15 Refine the type of the first parameter to block invoke functions.
WIP.  I have yet to find the magic incantation to get the structure
type to be defined.  If someone has a pointer, love to hear it.

llvm-svn: 84590
2009-10-20 02:12:22 +00:00
Anders Carlsson b9e71d9fd1 Force triple for test.
llvm-svn: 84589
2009-10-20 01:52:47 +00:00
Jim Grosbach 34f040a575 Now that all ARM subtargets use frame index scavenging, the Thumb1 requires*
functions are not needed.

llvm-svn: 84587
2009-10-20 01:32:47 +00:00
Evan Cheng fa4bcaec7c If the physical register being spilled does not have an interval, spill its sub-registers instead.
llvm-svn: 84586
2009-10-20 01:31:09 +00:00
Jim Grosbach 84f6235b6f Enable post-pass frame index register scavenging for ARM and Thumb2
llvm-svn: 84585
2009-10-20 01:26:58 +00:00
Ted Kremenek 481c121ab5 RegionStore: Use the *default* binding (instead of the *direct* binding) of an Objective-C object
region when doing lazy value retrieval of an ivar.

This fixes: <rdar://problem/7312221>

llvm-svn: 84584
2009-10-20 01:20:57 +00:00
Chris Lattner 484d2e9491 lower ARM::MOVi32imm properly.
llvm-svn: 84583
2009-10-20 01:11:37 +00:00
Chris Lattner 43c5589a7e add support for external symbols. The mc instprinter can now handle
reasonable code like Codegen/ARM/2009-02-27-SpillerBug.ll, producing 
identical output except for superior formatting of constant pool entries.

llvm-svn: 84582
2009-10-20 00:56:16 +00:00
Chris Lattner 1b06acbd70 get fancy: support basic block operands. Yay for jumps.
llvm-svn: 84579
2009-10-20 00:52:47 +00:00
Chris Lattner 85ab670644 add supprort for the 'sbit' operand, MOVi apparently has one.
llvm-svn: 84577
2009-10-20 00:46:11 +00:00
Chris Lattner 19c52201bd add support for instruction predicates.
llvm-svn: 84575
2009-10-20 00:42:49 +00:00
Chris Lattner 2f69ed8f4c implement printSORegOperand, add lowering for the nasty and despicable MOVi2pieces :)
llvm-svn: 84573
2009-10-20 00:40:56 +00:00
Jim Grosbach 772b2f84eb Refs: A8-598.
Leave Inst{11-8}, which represents the starting byte index of the extracted
result in the concatenation of the operands and is left unspecified.

Patch by Johnny Chen.

llvm-svn: 84572
2009-10-20 00:38:19 +00:00
Jim Grosbach 68f495caad Add missing encoding bits to NLdSt class of instructions.
Patch by Johnny Chen.

llvm-svn: 84570
2009-10-20 00:19:08 +00:00
Ted Kremenek 90c953e98f retain/release checker: allow 'new', 'copy', 'alloc', 'init' prefix to start before '_' when determining Cocoa fundamental rule.
Fixes: <rdar://problem/7265711>
llvm-svn: 84569
2009-10-20 00:13:00 +00:00
Fariborz Jahanian a4a9334a50 Builtin candidate minimization for
<<=, >>= and the rest.

llvm-svn: 84568
2009-10-20 00:04:40 +00:00
Chris Lattner 0b4a59fc07 X86 should ignore implicit regs when lowering to MCInst also,
no functionality change.

llvm-svn: 84567
2009-10-19 23:35:57 +00:00
Chris Lattner bd531262f8 handle addmode4 modifiers, fix a fixme in printRegisterList
by ignoring all implicit regs when lowering.

llvm-svn: 84566
2009-10-19 23:31:43 +00:00