Commit Graph

52120 Commits

Author SHA1 Message Date
Dan Gohman 7e47cc7cda Define instructions for cmovo and cmovno.
llvm-svn: 61836
2009-01-07 00:35:10 +00:00
Dan Gohman 33e6fcd56f X86_COND_C and X86_COND_NC are alternate mnemonics for
X86_COND_B and X86_COND_AE, respectively.

llvm-svn: 61835
2009-01-07 00:15:08 +00:00
Bob Wilson f76486ac8a Improve support for type-generic vector intrinsics by teaching TableGen how
to handle LLVMMatchType intrinsic parameters, and by adding new subclasses
of LLVMMatchType to match vector types with integral elements that are 
either twice as wide or half as wide as the elements of the matched type.

llvm-svn: 61834
2009-01-07 00:09:01 +00:00
Daniel Dunbar 1b90e1cd17 ccc (old): Pass -arch through to assembler if given.
llvm-svn: 61833
2009-01-07 00:03:20 +00:00
Douglas Gregor 6ad0ef5091 Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.

llvm-svn: 61832
2009-01-06 23:51:29 +00:00
Dan Gohman 44a3da6c4d Now that fold-pcmpeqd-0.ll is effectively testing that scheduling helps
avoid the need for spilling, add a new testcase that tests that the
pcmpeqd used for V_SETALLONES is changed to a constant-pool load as
needed.

llvm-svn: 61831
2009-01-06 23:48:10 +00:00
Dan Gohman beac19e299 Revert r42653 and forward-port the code that lets INC64_32r be
converted to LEA64_32r in x86's convertToThreeAddress. This
replaces code like this:
   movl  %esi, %edi
   inc   %edi
with this:
   lea   1(%rsi), %edi
which appears to be beneficial.

llvm-svn: 61830
2009-01-06 23:34:46 +00:00
Scott Michel 494daa7435 CellSPU:
- Add preliminary support for v2i32; load/store generates the right code but
  there's a lot work to be done to make this vector type operational.

llvm-svn: 61829
2009-01-06 23:10:38 +00:00
Dan Gohman c7847cdb8d Fix a bug in ComputeLinearIndex computation handling multi-level
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.

llvm-svn: 61828
2009-01-06 22:53:52 +00:00
Ted Kremenek 763ea559ac SourceManager: Implement "lazy" creation of MemBuffers for source files.
- Big Idea:
   Source files are now mmaped when ContentCache::getBuffer() is first called.
   While this doesn't change the functionality when lexing regular source files,
   it can result in source files not being paged in when using PTH.

- Performance change:
  - No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing
    regular source lexing.
  - No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using
    PTH. We do observe, however, a reduction of 279K in memory mapped source
    code (3% reduction). The majority of pages from Cocoa.h (and friends) are
    still being pulled in, however, because any literal will cause
    Preprocessor::getSpelling() to be called (causing the source for the file to
    get pulled in). The next possible optimization is to cache literal strings
    in the PTH file to avoid the need for the original header sources entirely.

- Right now there is a preprocessor directive to toggle between "lazy" and
  "eager" creation of MemBuffers. This is not permanent, and is there in the
  short term to just test additional optimizations.

llvm-svn: 61827
2009-01-06 22:43:04 +00:00
Ted Kremenek 63a55ab079 Remove redunant (and incorrect) call to SourceManager::PrintStats(). This would be called after a SourceManager was 'cleared', so it printed bogus results. Moreover, these stats are already printed earlier in the code path.
llvm-svn: 61825
2009-01-06 22:16:26 +00:00
Devang Patel 928d465b6b Set up DwarfDebug using DebugInfo API.
llvm-svn: 61822
2009-01-06 21:07:30 +00:00
Steve Naroff f192fabbdc Another tweak to handle the MS extensions (<rdar://problem/5956221>).
llvm-svn: 61821
2009-01-06 19:34:12 +00:00
Ted Kremenek 016056cfde Add whitespace to silence the following warning in a Release build: warning: suggest a space before ';' or explicit braces around empty body in 'while' statement
llvm-svn: 61820
2009-01-06 19:17:58 +00:00
Bill Wendling a055b8c0d3 Forgot that this was needed for Linux. This should fix the builds.
llvm-svn: 61819
2009-01-06 19:13:55 +00:00
Ted Kremenek 47ad37dbe4 Return UnknownVal in RegionStoreManager::getSizeInElements() for unsupported regions. This silences a warning when compiling Release-Asserts builds.
llvm-svn: 61818
2009-01-06 19:12:06 +00:00
Fariborz Jahanian 6e7ecc84c8 Couple of code gen. fixes in ObjC's colection-statement. Hard
to track down, easy to fix. This is on going.

llvm-svn: 61817
2009-01-06 18:56:31 +00:00
Steve Naroff 1f42c2e94d Fix <rdar://problem/5956221> clang ObjC rewriter: Microsoft-specific __fastcall keyword unrecognized.
This fix is C++ specific.

llvm-svn: 61816
2009-01-06 17:40:00 +00:00
Cedric Venet 9fee535c84 Fix a typo.
llvm-svn: 61815
2009-01-06 16:22:54 +00:00
Owen Anderson f04100a50d The phi construction algorithm used for interval reconstruction is complicated by
two address instructions.  We need to keep track of things we've processed AS USES
independetly of whether we've processed them as defs.

This fixes all known miscompilations when reconstruction is turned on.

llvm-svn: 61802
2009-01-06 07:53:32 +00:00
Chris Lattner ce1da2cfca - Various comment typo fixes in Sema.h
- Simplify ParseDeclCXX to use early exit on error instead of nesting.
- Change ParseDeclCXX to using the 'skip on error' form of ExpectAndConsume.
- If we don't see the ; in a using directive, still call the action, for 
  hopefully better error recovery.

llvm-svn: 61801
2009-01-06 07:27:21 +00:00
Chris Lattner 8dca2e9a4e it is ok to insert empty source ranges into diagnostics, declare variable in an if.
llvm-svn: 61800
2009-01-06 07:24:29 +00:00
Chris Lattner a7c7095b42 simplify some code using 'continue' and the new 'isInIdentifierNamespace' predicate.
llvm-svn: 61799
2009-01-06 07:20:03 +00:00
Douglas Gregor d05cb418fd Minor tweaks to the transparent declcontext patch
llvm-svn: 61798
2009-01-06 07:17:58 +00:00
Chris Lattner 4f149f2611 add a helper method.
llvm-svn: 61797
2009-01-06 07:16:40 +00:00
Chris Lattner a448d75b2a rename MaybeParseCXXScopeSpecifier -> ParseOptionalCXXScopeSpecifier and
MaybeParseTypeSpecifier -> ParseOptionalTypeSpecifier.

llvm-svn: 61796
2009-01-06 06:59:53 +00:00
Chris Lattner 9b01ca1f5a minor code cleanups, reduce indentation since 'if' block can't fall through.
llvm-svn: 61795
2009-01-06 06:55:51 +00:00
Daniel Dunbar 697867dadd ccc: Remove ValueArg::setValue, this is no longer used.
llvm-svn: 61794
2009-01-06 06:32:49 +00:00
Daniel Dunbar 85a868f8cc ccc: Track last actual argument instance for each option & change
driver to lookup this way instead of manually scanning arguments in
multiple places.

llvm-svn: 61793
2009-01-06 06:12:13 +00:00
Chris Lattner 479ecd7151 document annotation tokens.
llvm-svn: 61792
2009-01-06 06:02:08 +00:00
Chris Lattner f96b08302f Make Token::setLength assert that the token is not an annotation token.
llvm-svn: 61791
2009-01-06 05:25:04 +00:00
Douglas Gregor 7db908614c Oops. Un-publicify SrcMgr::ContentCache::Buffer.
llvm-svn: 61790
2009-01-06 05:11:04 +00:00
Douglas Gregor c7acfdfe9a Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
  1) The use of a qualified-id instead of an unqualified-id suppresses
     argument-dependent lookup
  2) If the name refers to a virtual function, the qualified-id
  version will call the function determined statically while the
  unqualified-id version will call the function determined dynamically
  (by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.

llvm-svn: 61789
2009-01-06 05:10:23 +00:00
Chris Lattner a8a3f73a47 rename tok::annot_qualtypename -> tok::annot_typename, which is both
shorter and  more accurate.  The type name might not be qualified.

llvm-svn: 61788
2009-01-06 05:06:21 +00:00
Chris Lattner 913e797257 add TypeTraits.h to the Xcode project
llvm-svn: 61787
2009-01-06 05:04:13 +00:00
Chris Lattner c7594438c7 use getBuffer() to fix compile error. Ted, please review.
llvm-svn: 61786
2009-01-06 04:47:20 +00:00
Scott Michel 6ad9b39a09 CellSPU: Update the README
llvm-svn: 61785
2009-01-06 03:51:14 +00:00
Scott Michel 6887caf11c CellSPU:
- Fix bugs 3194, 3195: i128 load/stores produce correct code (although, we
  need to ensure that i128 is 16-byte aligned in real life), and 128 zero-
  extends are supported.
- New td file: SPU128InstrInfo.td: this is where all new i128 support should
  be put in the future.
- Continue to hammer on i64 operations and test cases; ensure that the only
  remaining problem will be i64 mul.

llvm-svn: 61784
2009-01-06 03:36:14 +00:00
Daniel Dunbar e5e454e199 ccc: Use dummy InputOption and UnknownOption classes instead of
InputArg and UnknownArg.
 - Every argument now always corresponds to some option, which
   simplifies other code.

llvm-svn: 61783
2009-01-06 02:30:10 +00:00
Ted Kremenek 12c2af44e9 Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
   This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
   necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods.  This reduces the
  number of places that actually access the MemBuffer object for a file
  to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.

llvm-svn: 61782
2009-01-06 01:55:26 +00:00
Dan Gohman 53c282cce8 Delete this test; it's a duplicate of 2006-07-03-schedulers.ll.
llvm-svn: 61781
2009-01-06 01:36:23 +00:00
Daniel Dunbar e31bfdd7c7 ccc: Introduce ArgList for keeping input argv & parsed Args together.
llvm-svn: 61780
2009-01-06 01:35:44 +00:00
Dan Gohman bf8e5204d1 Update these argument lists for the isNormalMemory
argument. This doesn't affect current functionality.

llvm-svn: 61779
2009-01-06 01:28:56 +00:00
Dan Gohman 79c3516912 Use a latency value of 0 for the artificial edges inserted by
AddPseudoTwoAddrDeps. This lets the scheduling infrastructure
avoid recalculating node heights. In very large testcases this
was a major bottleneck. Thanks to Roman Levenstein for finding
this!

As a side effect, fold-pcmpeqd-0.ll is now scheduled better
and it no longer requires spilling on x86-32.

llvm-svn: 61778
2009-01-06 01:19:04 +00:00
Chris Lattner 04a2079726 no need to negate the APInt for 0.
llvm-svn: 61777
2009-01-06 00:06:25 +00:00
Chris Lattner 2fdcc59bb6 Change m_ConstantInt and m_SelectCst to take their constant integers
as template arguments instead of as instance variables, exposing more
optimization opportunities to the compiler earlier.

llvm-svn: 61776
2009-01-05 23:53:12 +00:00
Chris Lattner 4e735eb157 make m_ConstantInt(int64_t) safely match ConstantInt's that are larger than i64.
This fixes an instcombine crash on PR3235.

llvm-svn: 61775
2009-01-05 23:45:50 +00:00
Devang Patel 244a649764 Construct subprogram DIEs using DebugInfo.
llvm-svn: 61772
2009-01-05 23:21:35 +00:00
Devang Patel 245a73ac16 Construct global variable DIEs using DebugInfo.
llvm-svn: 61771
2009-01-05 23:11:11 +00:00
Chris Lattner 610c87cad6 rename these tests to match the attribute.
llvm-svn: 61770
2009-01-05 23:10:19 +00:00