Commit Graph

51015 Commits

Author SHA1 Message Date
Owen Anderson 35bd70c07a Add a test for my previous PRE fix.
llvm-svn: 60394
2008-12-02 04:25:42 +00:00
Owen Anderson d930420ccf Fix an issue that Chris noticed, where local PRE was not properly instantiating
a new value numbering set after splitting a critical edge.  This increases
the number of instances of PRE on 403.gcc from ~60 to ~570.

llvm-svn: 60393
2008-12-02 04:09:22 +00:00
Evan Cheng 1718fd4375 Fix PR3124: overly strict assert.
llvm-svn: 60392
2008-12-02 02:15:36 +00:00
Dale Johannesen 8c76670b5a Add a few more transformations.
llvm-svn: 60391
2008-12-02 01:30:54 +00:00
Ted Kremenek 817737a002 Add FIXME.
llvm-svn: 60390
2008-12-02 01:26:07 +00:00
Eli Friedman f5d08c9ee4 Disabling this code due to regression on test/CodeGen/bitfield.c. See
PR3152.

llvm-svn: 60389
2008-12-02 01:17:45 +00:00
Bill Wendling 30e9dc81c8 Second stab at target-dependent lowering of everyone's favorite nodes: [SU]ADDO
- LowerXADDO lowers [SU]ADDO into an ADD with an implicit EFLAGS define. The
  EFLAGS are fed into a SETCC node which has the conditional COND_O or COND_C,
  depending on the type of ADDO requested.

- LowerBRCOND now recognizes if it's coming from a SETCC node with COND_O or
  COND_C set.

llvm-svn: 60388
2008-12-02 01:06:39 +00:00
Douglas Gregor f558618fa4 A little more scaffolding for parsing templates:
- Template parameter scope to hold the template parameters
  - Template parameter context for parsing declarators
  - Actions for template type parameters and non-type template
    parameters

llvm-svn: 60387
2008-12-02 00:41:28 +00:00
Fariborz Jahanian 015a48d1db This patch corrects problem in searching for a setter/getter method for
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.

llvm-svn: 60386
2008-12-02 00:19:12 +00:00
Bill Wendling 122c515809 Reapply r60382. This time, don't mark "ADC" nodes with "implicit EFLAGS".
llvm-svn: 60385
2008-12-02 00:07:05 +00:00
Douglas Gregor eb31f39558 Basic support for parsing templates, from Andrew Sutton
llvm-svn: 60384
2008-12-01 23:54:00 +00:00
Bill Wendling 351b6659ad Temporarily revert r60382. It caused CodeGen/X86/i2k.ll and others to fail.
llvm-svn: 60383
2008-12-01 23:44:08 +00:00
Bill Wendling a435b1aebc - Have "ADD" instructions return an implicit EFLAGS.
- Add support for seto, setno, setc, and setnc instructions.

llvm-svn: 60382
2008-12-01 23:30:42 +00:00
Bill Wendling 2d59863d06 Expand getVTList, getNodeValueTypes, and SelectNodeTo to handle more value types.
llvm-svn: 60381
2008-12-01 23:28:22 +00:00
Douglas Gregor da747baa3c Improve error recovery when parsing a function definition fails
llvm-svn: 60380
2008-12-01 23:03:32 +00:00
Douglas Gregor b690cbb928 Initialize storage class even if we got an erroneous mutable
llvm-svn: 60377
2008-12-01 22:46:22 +00:00
Chris Lattner b2f131a4ab Add rdar reference, make this actually fail when the patch isn't applied.
llvm-svn: 60376
2008-12-01 22:35:31 +00:00
Dale Johannesen 069a4eee55 Consider only references to an IV within the loop when
figuring out the base of the IV.  This produces better
code in the example.  (Addresses use (IV) instead of 
(BASE,IV) - a significant improvement on low-register
machines like x86).

llvm-svn: 60374
2008-12-01 22:00:01 +00:00
Douglas Gregor 90abb6dead Objective-C keywords are not always identifiers. Some are also C++ keywords
llvm-svn: 60373
2008-12-01 21:46:47 +00:00
Douglas Gregor dce30aa0f9 Fix RUN line
llvm-svn: 60372
2008-12-01 21:17:52 +00:00
Chris Lattner fd2a76170c reenable array_pod_sort, this time hopefully happy on 64-bit
and big endian systems.

llvm-svn: 60371
2008-12-01 21:11:25 +00:00
Bill Wendling 6f71bce4cf Don't rebuild RHSNeg. Just use the one that's already there.
llvm-svn: 60370
2008-12-01 21:06:30 +00:00
Bill Wendling 84f6f2539f Document what this check is doing. Also, no need to cast to ConstantInt.
llvm-svn: 60369
2008-12-01 21:03:43 +00:00
Steve Naroff e1908e393e -Add several ObjC types to Decl::getDeclKindName(), a useful debug hook.
-Start adding support for rewriting @synthesize.

llvm-svn: 60368
2008-12-01 20:33:01 +00:00
Douglas Gregor e912266bdb Test blocks in C++ mode
llvm-svn: 60367
2008-12-01 19:48:06 +00:00
Bill Wendling e6c87a4952 Use a simple comparison. Overflow on integer negation can only occur when the
integer is "minint".

llvm-svn: 60366
2008-12-01 19:46:27 +00:00
Chris Lattner e74e210a3f don't #include <algorithm> into the llvm namespace.
llvm-svn: 60365
2008-12-01 19:45:45 +00:00
Douglas Gregor 95c326d14a Use EmitInt, not Emit, to emit unsigned values
llvm-svn: 60364
2008-12-01 19:45:16 +00:00
Daniel Dunbar 0132cdc45c Add test case for __ASSEMBLER__ definition.
llvm-svn: 60363
2008-12-01 19:23:47 +00:00
Daniel Dunbar 1f3d7849a8 Add LangOptions marker for assembler-with-cpp mode and use to define
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor
formatting changes). Thanks!

llvm-svn: 60362
2008-12-01 18:55:22 +00:00
Douglas Gregor c12ce19595 Enable blocks in C++
llvm-svn: 60361
2008-12-01 18:34:47 +00:00
Douglas Gregor 2dc61144cd Make sure __null test runs in both 32- and 64-bit. Thanks Anders
llvm-svn: 60360
2008-12-01 18:05:11 +00:00
Douglas Gregor 356513d7d0 Parse the exception-specification throw(...), a Microsoft extension
llvm-svn: 60359
2008-12-01 18:00:20 +00:00
Scott Michel 08a4e2045d CellSPU:
- Fix v2[if]64 vector insertion code before IBM files a bug report.
- Ensure that zero (0) offsets relative to $sp don't trip an assert
  (add $sp, 0 gets legalized to $sp alone, tripping an assert)
- Shuffle masks passed to SPUISD::SHUFB are now v16i8 or v4i32

llvm-svn: 60358
2008-12-01 17:56:02 +00:00
Douglas Gregor dc37c81448 Add the test for __null
llvm-svn: 60357
2008-12-01 17:31:21 +00:00
Douglas Gregor f7ab50df29 Define NULL to __null in C++, so that it's guaranteed to have the same size as a pointer
llvm-svn: 60355
2008-12-01 17:20:57 +00:00
Chris Lattner 001181731b switch to std::sort until I have time to sort this out.
llvm-svn: 60354
2008-12-01 17:00:08 +00:00
Chris Lattner 5fb10b961b cleanups suggested by duncan, thanks!
llvm-svn: 60353
2008-12-01 16:55:19 +00:00
Chris Lattner 2bc97759b3 define array_pod_sort in terms of operator< instead of my brain
damaged approximation.  This should fix it on big endian platforms
and on 64-bit.

llvm-svn: 60352
2008-12-01 16:50:01 +00:00
Duncan Sands 3d960941b1 There are no longer any places that require a
MERGE_VALUES node with only one operand, so get
rid of special code that only existed to handle
that possibility.

llvm-svn: 60349
2008-12-01 11:41:29 +00:00
Duncan Sands 6ed40141f7 Change the interface to the type legalization method
ReplaceNodeResults: rather than returning a node which
must have the same number of results as the original
node (which means mucking around with MERGE_VALUES,
and which is also easy to get wrong since SelectionDAG
folding may mean you don't get the node you expect),
return the results in a vector.

llvm-svn: 60348
2008-12-01 11:39:25 +00:00
Bill Wendling 47f733e4ea Generalize the FoldOrWithConstant method to fold for any two constants which
don't have overlapping bits.

llvm-svn: 60344
2008-12-01 08:32:40 +00:00
Bill Wendling 22e761b302 Reduce copy-and-paste code by splitting out the code into its own function.
llvm-svn: 60343
2008-12-01 08:23:25 +00:00
Bill Wendling 582fe6b0ca Use m_Specific() instead of double matching.
llvm-svn: 60341
2008-12-01 08:09:47 +00:00
Bill Wendling 4eecfb655b Move pattern check outside of the if-then statement. This prevents us from fiddling with constants unless we have to.
llvm-svn: 60340
2008-12-01 07:47:02 +00:00
Chris Lattner 6f5bf6a718 Rename some variables, only increment BI once at the start of the loop instead of throughout it.
llvm-svn: 60339
2008-12-01 07:35:54 +00:00
Chris Lattner f00aae4968 pull the predMap densemap out of the inner loop of performPRE, so
that it isn't reallocated all the time.  This is a tiny speedup for
GVN: 3.90->3.88s

llvm-svn: 60338
2008-12-01 07:29:03 +00:00
Chris Lattner 2b07d3ccde switch a couple more calls to use array_pod_sort.
llvm-svn: 60337
2008-12-01 06:52:57 +00:00
Chris Lattner a29f0e19ff don't assume iterators implicitly convert to pointers.
llvm-svn: 60336
2008-12-01 06:50:46 +00:00
Chris Lattner 2c2dd15a85 Introduce a new array_pod_sort function and switch LSR to use it
instead of std::sort.  This shrinks the release-asserts LSR.o file
by 1100 bytes of code on my system.

We should start using array_pod_sort where possible.

llvm-svn: 60335
2008-12-01 06:49:59 +00:00