Skip to content
  1. Jan 16, 2009
  2. Jan 15, 2009
    • Nuno Lopes's avatar
      add codegen support to union casts · 7ffcf93b
      Nuno Lopes authored
      init of static vars still not working. I'll get back to it tomorrow or so
      
      llvm-svn: 62278
      7ffcf93b
    • Ted Kremenek's avatar
      PTH: Fix termination condition in binary search. · 4bbb79a6
      Ted Kremenek authored
      llvm-svn: 62277
      4bbb79a6
    • Chris Lattner's avatar
      PR3330: given an enum like this: · e53c036d
      Chris Lattner authored
      enum E {
       A = 1U,
       B
      };
      
      Don't make an implicit cast expr of null for B.
      
      llvm-svn: 62274
      e53c036d
    • Ted Kremenek's avatar
      IdentifierInfo: · a705b04d
      Ted Kremenek authored
      - IdentifierInfo can now (optionally) have its string data not be
        co-located with itself.  This is for use with PTH.  This aspect is a
        little gross, as getName() and getLength() now make assumptions
        about a possible alternate representation of IdentifierInfo.
        Perhaps we should make IdentifierInfo have virtual methods?
      
      IdentifierTable:
      - Added class "IdentifierInfoLookup" that can be used by
        IdentifierTable to perform "string -> IdentifierInfo" lookups using
        an auxilliary data structure.  This is used by PTH.
      - Perform tests show that IdentifierTable::get() does not slow down
        because of the extra check for the IdentiferInfoLookup object (the
        regular StringMap lookup does enough work to mitigate the impact of
        an extra null pointer check).
      - The upshot is that now that some IdentifierInfo objects might be
        owned by the IdentiferInfoLookup object.  This should be reviewed.
      
      PTH:
      - Modified PTHManager::GetIdentifierInfo to *not* insert entries in
        IdentifierTable's string map, and instead create IdentifierInfo
        objects on the fly when mapping from persistent IDs to
        IdentifierInfos.  This saves a ton of work with string copies,
        hashing, and StringMap lookup and resizing.  This change was
        motivated because when processing source files in the PTH cache we
        don't need to do any string -> IdentifierInfo lookups.
      - PTHManager now subclasses IdentifierInfoLookup, allowing clients of
        IdentifierTable to transparently use IdentifierInfo objects managed
        by the PTH file.  PTHManager resolves "string -> IdentifierInfo"
        queries by doing a binary search over a sorted table of identifier
        strings in the PTH file (the exact algorithm we use can be changed
        as needed).
      
      These changes lead to the following performance changes when using PTH on Cocoa.h:
      - fsyntax-only: 10% performance improvement
      - Eonly: 30% performance improvement
      
      llvm-svn: 62273
      a705b04d
    • Daniel Dunbar's avatar
      Fix some unused variable, control reaches end of non-void function, · 435bbe02
      Daniel Dunbar authored
      and uninitialized use options.
      
      llvm-svn: 62270
      435bbe02
    • Daniel Dunbar's avatar
      Add dummy X86_64 ABIInfo implementation. · 707f6436
      Daniel Dunbar authored
      llvm-svn: 62268
      707f6436
    • Nuno Lopes's avatar
      6be2939d
    • Seo Sanghyeon's avatar
      PR2746: Implement GCC cast to union extension · 39a3ebf8
      Seo Sanghyeon authored
      llvm-svn: 62255
      39a3ebf8
    • Daniel Dunbar's avatar
      Add utils/ABITest, my ABI test generation tool. · 2e49bf2c
      Daniel Dunbar authored
       - Mostly written as an entertaining exercise in enumerating large or
         (countably, naturally) infinite sets. But hey, its useful too!
      
       - Idea is to number all C-types so that the N-th type can quickly be
         computed, with a good deal of flexibility about what types to
         include, and taking some care so that the (N+1)-th type is
         interestingly different from the N-th type. For example, using the
         default generator, the 1,000,000-th function type is:
      --
      typedef _Complex int T0;
      typedef char T1 __attribute__ ((vector_size (4)));
      typedef int T2 __attribute__ ((vector_size (4)));
      T2 fn1000000(T0 arg0, signed long long arg1, T1 arg2, T0 arg3);
      --
         and the 1,000,001-th type is:
      --
      typedef _Complex char T0;
      typedef _Complex char T2;
      typedef struct T1 { T2 field0; T2 field1; T2 field2; } T1;
      typedef struct T3 {  } T3;
      unsigned short fn1000001(T0 arg0, T1 arg1, T3 arg2);
      --
      
         Computing the 10^1600-th type takes a little less than 1s. :)
      
      llvm-svn: 62253
      2e49bf2c
    • Douglas Gregor's avatar
      41c8ba80
    • Ted Kremenek's avatar
      PTH: Embed a persistentID side-table in the PTH file that is sorted in the · bef9fc22
      Ted Kremenek authored
      lexical order of the corresponding identifier strings. This will be used for a
      forthcoming optimization. This slows down PTH generation time by 7%. We can
      revert this change if the optimization proves to not be valuable.
      
      llvm-svn: 62248
      bef9fc22
    • Douglas Gregor's avatar
      Initial implementation of member name lookup · 960b5bc7
      Douglas Gregor authored
      llvm-svn: 62247
      960b5bc7
    • Daniel Dunbar's avatar
      ccc: Implement support clang PTH using gcc PCH style interface. · 87cb84e9
      Daniel Dunbar authored
      This requires some hackery, as gcc's PCH mechanism changes behavior,
      whereas while PTH is simply a cache. Notably:
      
       - Automatically cause clang to load a .pth file if we find one that
         matches a command line -include argument (similar to how gcc
         looks for .gch files).
      
       - When generating precompiled headers, translate the suffix from .gch
         to .pth (so we do not conflict with actual gcc PCH files).
      
       - When generating precompiled headers, copy the input header to the
         same location as the output PTH file. This is necessary because gcc
         supports -include xxx.h even if xxx.h doesn't exist, but for clang
         we need to actually have the contents of this file available.
      
      llvm-svn: 62246
      87cb84e9
  3. Jan 14, 2009
    • Douglas Gregor's avatar
      Refactor name lookup. · 34074326
      Douglas Gregor authored
      This change refactors and cleans up our handling of name lookup with
      LookupDecl. There are several aspects to this refactoring:
      
        - The criteria for name lookup is now encapsulated into the class
        LookupCriteria, which replaces the hideous set of boolean values
        that LookupDecl currently has.
      
        - The results of name lookup are returned in a new class
        LookupResult, which can lazily build OverloadedFunctionDecls for
        overloaded function sets (and, eventually, eliminate the need to
        allocate member for OverloadedFunctionDecls) and contains a
        placeholder for handling ambiguous name lookup (for C++).
      
        - The primary entry points for name lookup are now LookupName (for
          unqualified name lookup) and LookupQualifiedName (for qualified
          name lookup). There is also a convenience function
          LookupParsedName that handles qualified/unqualified name lookup
          when given a scope specifier. Together, these routines are meant
          to gradually replace the kludgy LookupDecl, but this won't happen
          until after we have base class lookup (which forces us to cope
          with ambiguities).
      
        - Documented the heck out of name lookup. Experimenting a little
          with using Doxygen's member groups to make some sense of the Sema
          class. Feedback welcome!
      
        - Fixes some lingering issues with name lookup for
        nested-name-specifiers, which now goes through
        LookupName/LookupQualifiedName. 
      
      llvm-svn: 62245
      34074326
    • Daniel Dunbar's avatar
      CmpDriver: Allow over-ride of drivers to compare through env variables · 35926e10
      Daniel Dunbar authored
      (DRIVER_[AB]).
      
      llvm-svn: 62242
      35926e10
    • Daniel Dunbar's avatar
      ccc: Finish main clang compiler argument translation. · fec2f295
      Daniel Dunbar authored
       - Still missing some odds and ends like -M.
      
       - Also, we still need to do some translation and forwarding of
         codegen options.
      
      llvm-svn: 62241
      fec2f295
    • Fariborz Jahanian's avatar
      Patch to keep clang honest that it does not yet support · f2a3120b
      Fariborz Jahanian authored
      explicit return type on block literals.
      
      llvm-svn: 62240
      f2a3120b
    • Daniel Dunbar's avatar
      Fix typo and spelling of -Wunused-macros. · 1dad2d8e
      Daniel Dunbar authored
      llvm-svn: 62239
      1dad2d8e
Loading