Commit Graph

46539 Commits

Author SHA1 Message Date
Dan Gohman 8de6d22392 Use empty() instead of begin() == end().
llvm-svn: 54780
2008-08-14 18:13:49 +00:00
Matthijs Kooijman 4801bd41cf Replace two for loops with while(!X->use_empty()) loops. This prevents
invalidating the iterator by deleting the current use. This fixes a segfault on
64 bit linux reported in PR2675.

Also remove an unneeded if.

llvm-svn: 54778
2008-08-14 15:03:05 +00:00
Steve Naroff 40471b3ba8 Fix ASTContext::getObjCEncodingForType() to limit the type info for structure bodies (mimics gcc's adhoc rules).
This fixes <rdar://problem/6140902> clang ObjC rewriter: If a class contains a struct ivar with a lot of members, ... 

llvm-svn: 54777
2008-08-14 15:00:38 +00:00
Chris Lattner 89d6c9f698 Make diagnostics relating to the callee hilight just the callee
and put the caret on the ()'s.  e.g. produces:

t.c:13:9: error: called object is not a function or function pointer
  ((B)a)();
  ~~~~~~^

instead of:

t.c:13:3: error: called object is not a function or function pointer
  ((B)a)();
  ^~~~~~~~

llvm-svn: 54775
2008-08-14 04:33:24 +00:00
Ted Kremenek e4d923383a Fix typo.
llvm-svn: 54774
2008-08-14 03:45:07 +00:00
Daniel Dunbar 7da1b82f56 Update some isIntegerConstantExpr uses to use
getIntegerConstantExprValue where appropriate.

llvm-svn: 54771
2008-08-13 23:47:13 +00:00
Owen Anderson 99e911fb16 Get rid of a use of std::map.
llvm-svn: 54770
2008-08-13 23:36:23 +00:00
Nuno Lopes cb46c144bc make sure the size of constant arrays is respected
llvm-svn: 54769
2008-08-13 23:28:57 +00:00
Daniel Dunbar c4baa06d15 Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
 - I couldn't think of a better name.
 - Move appropriate users of GetAddrOfConstantString to this.

Rename getStringForStringLiteral to GetStringForStringLiteral.

Add GetAddrOfConstantStringFromLiteral
 - This combines GetAddrOfConstantString and
   GetStringForStringLiteral. This method can be, but is not yet, more
   efficient.

Change GetAddrOfConstantString to not add terminating '\0'
 - <rdar://problem/6140956>

llvm-svn: 54768
2008-08-13 23:20:05 +00:00
Dan Gohman 6134fbccef Fix a bogus srem rule - a negative value srem'd by a power-of-2
can have a non-negative result; for example, -16%16 is 0. Also,
clarify the related comments. This fixes PR2670.

llvm-svn: 54767
2008-08-13 23:12:35 +00:00
Owen Anderson 706f6b7899 Expunge the last uses of std::map from LiveIntervals.
llvm-svn: 54766
2008-08-13 22:28:50 +00:00
Owen Anderson 767b5cc7fd Move r2iMap_ over to DenseMap from std::map.
llvm-svn: 54765
2008-08-13 22:08:30 +00:00
Dan Gohman 7e3c392248 Allow SelectionDAG to create EXTRACT_VECTOR_ELT nodes with
non-constant indices. Only a few of the peephole checks require
a constant index.

llvm-svn: 54764
2008-08-13 21:51:37 +00:00
Owen Anderson 51f689a652 Make the allocation of LiveIntervals explicit, rather than holding them in the r2iMap_ by value. This will prevent references to them from being invalidated
if the map is changed.

llvm-svn: 54763
2008-08-13 21:49:13 +00:00
Ted Kremenek 16306107cf Renamed GRState::CheckerStatePrinter to GRState::Printer.
Updated checker state printer interface to allow transfer functions to return an arbitrary number of GRState::Printers.

llvm-svn: 54762
2008-08-13 21:24:49 +00:00
Owen Anderson 177f2fab3d Switch this from std::map to DenseMap.
llvm-svn: 54761
2008-08-13 21:24:24 +00:00
Dan Gohman 8ded5d5884 Fix SCCP's handling of struct value loads and stores. SCCP doesn't
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.

llvm-svn: 54760
2008-08-13 21:22:48 +00:00
Ted Kremenek caefa24c76 Update Xcode project.
llvm-svn: 54759
2008-08-13 20:59:32 +00:00
Daniel Dunbar 863a990879 Add svn:ignore on several Release-Asserts directories
llvm-svn: 54758
2008-08-13 20:54:16 +00:00
Daniel Dunbar 906c58fcb0 Add default constructor to APSInt
- Creates uninitialized APInt. 
 - Prevents need for embedding arbitrary constants when used as an out
   parameter, for example.

llvm-svn: 54757
2008-08-13 20:53:17 +00:00
Daniel Dunbar f3537e04bb Update makellvm to return correct result code.
llvm-svn: 54756
2008-08-13 20:43:56 +00:00
Ted Kremenek 1cac74bf0f Update Xcode project.
llvm-svn: 54755
2008-08-13 20:43:54 +00:00
Devang Patel 6369a798ba Rename. s/FindIVForUser/FindIVUserForCond/g
llvm-svn: 54754
2008-08-13 20:31:11 +00:00
Duncan Sands ea68a6ccdf Teach constant folding that an inttoptr of a
ptrtoint can be turned into a bitcast if the
integer is at least as wide as a pointer.

llvm-svn: 54752
2008-08-13 20:20:35 +00:00
Dan Gohman b2226e21c3 Initial checkin of the new "fast" instruction selection support. See
the comments in FastISelEmitter.cpp for details on what this is.
This is currently experimental and unusable.

llvm-svn: 54751
2008-08-13 20:19:35 +00:00
Dan Gohman e81ac0b66f Oops, check in these files too, for the FastISel -> Fast rename.
llvm-svn: 54750
2008-08-13 19:55:00 +00:00
Dan Gohman a7b8aed469 Rename SelectionDAGISel's FastISel to Fast, to begin to make
room for the new FastISel instruction selection code.

llvm-svn: 54749
2008-08-13 19:47:40 +00:00
Dale Johannesen a7a2f22fe5 Generated files for 54744.
llvm-svn: 54745
2008-08-13 18:41:46 +00:00
Dale Johannesen 332dd535e0 Add read/write support for X86's sseregparm.
llvm-svn: 54744
2008-08-13 18:40:23 +00:00
Owen Anderson ef96ac4f95 Get rid of unused variable.
llvm-svn: 54742
2008-08-13 17:44:52 +00:00
Owen Anderson 65fce4d813 1) Merge entire live intervals instead of parts of them.
2) Conditionalize temporary insertion if we don't need it.

llvm-svn: 54741
2008-08-13 17:25:42 +00:00
Steve Naroff eb03dace87 Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid start location.
The following case resulted in an invalid start location:

// start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope).
@protocol Buggy;

@protocol Buggy 
@optional
- whatever;
@end

llvm-svn: 54740
2008-08-13 16:39:22 +00:00
Duncan Sands a21ff583db Rename this, in case people think that NullFolder
has something to do with folding null values.

llvm-svn: 54725
2008-08-13 08:56:48 +00:00
Bruno Cardoso Lopes 92c64ae2d0 Removed SELECT_CC custom lowering. This is not needed anymore, the SELECT node
is lowered properly and covers everything LowerSELECT_CC did.
Added method printUnsignedImm in AsmPrinter to print uimm16 operands. This
avoid the ugly instruction by instruction checking in printOperand.
Added a swap instruction present in the allegrex core.
Added two conditional instructions present in the allegrex core : MOVZ and MOVN.
They both allow a more efficient SELECT operation for integers.
Also added SELECT patterns to optimize MOVZ and MOVN usage.
The brcond and setcc patterns were cleaned: redundant and suboptimal patterns
were
removed. The suboptimals were replaced by more efficient ones.
Fixed some instructions that were using immZExt16 instead of immSExt16.

llvm-svn: 54724
2008-08-13 07:13:40 +00:00
Ted Kremenek 703a64c38d Update VS project file.
llvm-svn: 54723
2008-08-13 04:45:09 +00:00
Ted Kremenek 0e7d96c370 Rename ValueState.h -> GRState.h
Rename ValueState.cpp -> GRState.cpp

llvm-svn: 54722
2008-08-13 04:28:02 +00:00
Ted Kremenek 5ab5a1b578 Rename ValueState -> GRState.
Rename ValueStateManager -> GRStateManager.

llvm-svn: 54721
2008-08-13 04:27:00 +00:00
Ted Kremenek 88f001c4e3 Updated latest checker build.
llvm-svn: 54720
2008-08-13 04:12:49 +00:00
Ted Kremenek ea6fa77ccc Added test case.
llvm-svn: 54717
2008-08-13 03:55:18 +00:00
Ted Kremenek dccd9883c4 Initialize tracked local variables to undefined.
llvm-svn: 54716
2008-08-13 03:28:04 +00:00
Daniel Dunbar b036db8e66 Implement Obj-C protocol metadata generation for NeXT.
- Near complete, only properties are missing.

llvm-svn: 54715
2008-08-13 03:21:16 +00:00
Ted Kremenek 3f91f037a7 Fix memory leak found by Sam Bishop: delete WList in the dstor of GRCoreEngineImpl.
llvm-svn: 54714
2008-08-13 03:10:52 +00:00
Devang Patel 97387e6615 Check sign to detect overflow before changing compare stride.
llvm-svn: 54710
2008-08-13 02:05:14 +00:00
Daniel Dunbar 89da6ad1db Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.

Implement CodeGen support for forward protocol decls (no-ops are so
    nice to implement).

Also moved CGObjCRuntime.h out of CodeGenModule.h

llvm-svn: 54709
2008-08-13 00:59:25 +00:00
Dale Johannesen 40f83ac649 When resolving a stub in x86-64 JIT, use a PC-relative branch
rather than the absolute address if the target is within range.

llvm-svn: 54708
2008-08-12 23:20:24 +00:00
Bill Wendling f21a38700f Remove tabs.
llvm-svn: 54707
2008-08-12 23:15:44 +00:00
Bill Wendling ed74a194a7 Update. Remove bogus webpage.
llvm-svn: 54705
2008-08-12 21:55:54 +00:00
Ted Kremenek 27fb019038 Added GenericDataMap as a component of ValueState.
llvm-svn: 54704
2008-08-12 21:49:24 +00:00
Ted Kremenek 4c088683c0 Update VS project files.
llvm-svn: 54701
2008-08-12 21:05:43 +00:00
Dale Johannesen 30e5dbb407 Make x86-64 JIT changes Darwin-specific.
llvm-svn: 54700
2008-08-12 21:02:08 +00:00