Skip to content
  1. Apr 17, 2016
    • Craig Topper's avatar
      Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes... · 6ff46266
      Craig Topper authored
      Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes from TargetLoweringBase and probably other places.
      
      This required changing several places to print VT enums as strings instead of raw ints since the proper method to use to print became ambiguous. This is probably an improvement anyway.
      
      This also appears to save ~8K from an x86 self host build of llc.
      
      llvm-svn: 266562
      6ff46266
    • Faisal Vali's avatar
      Implement CWG 941 - explicit specializations of deleted function templates · 5e9e8ac4
      Faisal Vali authored
        template<class T> void f(T) = delete;
        template<> void f(int); // OK.
      
        f(3); // OK
      
      Implementation strategy:
      
      When an explicit specialization of a function template, a member function template or a member function of a class template is declared, clang first implicitly instantiates the declaration of a specialization from the templated-entity being explicitly specialized (since their signatures must be the same) and then links the explicit specialization being declared as a redeclaration of the aforementioned specialization.  
      
      The problem was that when clang 'implicitly instantiates' the initial specialization, it marks the corresponding FunctionDecl as deleted if the corresponding templated-entity was deleted, rather than waiting to see whether the explicit specialization being declared provides a non-deleted body. (The eager marking of delete has advantages during overload resolution I suppose, where we don't have to try and instantiate a definition of the function to see if it is deleted). 
      
      The present fix entails recognizing that when clang knows that an explicit specialization is being declared (for whichever templated-entity), the prior implicit instantiation should not inherit the 'deleted' status, and so we reset it to false.
      
      I suppose an alternative fix (amongst others) could consider creating a new context (ExplicitSpecializationDeclarationSubstitution or some such) that is checked during template-argument-deduction and final substitution, and avoid inheriting the deleted status during declaration substitution.  But while conceptually cleaner, that would be a slightly more involved change (as could be some of the other alternatives: such as avoid tagging implicit specializations as deleted, and check their primary templates for the deleted status where needed), and so I chose a different path.  Hopefully it'll prove to not be a bad choice.
      
      llvm-svn: 266561
      5e9e8ac4
    • Simon Pilgrim's avatar
      [X86][SSE] Added 16i8 -> 8i64 sext test · 6ccbd2bd
      Simon Pilgrim authored
      Shows poor codegen for AVX2
      
      llvm-svn: 266560
      6ccbd2bd
    • Simon Pilgrim's avatar
      dd153476
    • Ismail Donmez's avatar
      Fix shared build after r266484 · 23e5a384
      Ismail Donmez authored
      llvm-svn: 266558
      23e5a384
    • Asaf Badouh's avatar
      [X86] Remove unneeded variables · aec79651
      Asaf Badouh authored
      no functional change.
      ExtraLoad and WrapperKind are been used only if (OpFlags == X86II::MO_GOTPCREL).
      
      Differential Revision: http://reviews.llvm.org/D18942
      
      llvm-svn: 266557
      aec79651
    • Duncan P. N. Exon Smith's avatar
      DebugInfo: Make DICompositeTypes distinct most of the time · f9521b0b
      Duncan P. N. Exon Smith authored
      Since elements of most kinds of DICompositeType have back references,
      most are involved in uniquing cycles.  Except via the ODR 'identifier:'
      field, which doesn't care about the storage type (see r266549),
      they have no hope of being uniqued.
      
      Distinct nodes are far more efficient, so use them for most kinds of
      DICompositeType definitions (i.e., when DIType::isForwardDecl is false).
      The exceptions:
      
        - DW_TAG_array_type, since their elements never have back-references
          and they never have ODR 'identifier:' fields;
      
        - DW_TAG_enumeration_type when there is no ODR 'identifier:' field,
          since their elements usually don't have back-references.
      
      This breaks the last major uniquing cycle I'm aware of in the debug info
      graph.  The impact won't be enormous for C++ because references to
      ODR-uniqued nodes still use string-based DITypeRefs; but this should
      prevent a regression in C++ when we drop the string-based references.
      
      This wouldn't have been reasonable until r266549, when composite types
      stopped relying on being uniqued by structural equivalence to prevent
      blow-ups at LTO time.
      
      llvm-svn: 266556
      f9521b0b
    • Duncan P. N. Exon Smith's avatar
      LTO: Merge debug info types when linking bitcode · 2c66b23d
      Duncan P. N. Exon Smith authored
      Make sure lld enables ODR type uniquing for debug info when invoking
      LTO, as a follow-up to LLVM r266549.
      
      llvm-svn: 266555
      2c66b23d
    • Craig Topper's avatar
    • Duncan P. N. Exon Smith's avatar
      IR: Fix type-refs in testcase from r266548 · 2c7cd4af
      Duncan P. N. Exon Smith authored
      There's a hole in the verifier right now: if a module has no compile
      units, it never checks that all the string-based DITypeRefs get
      resolved.  As a result, this testcase didn't fail the verifier, even
      there were references to `!"has-uuid"` instead of `!"uuid"` (the former
      was a composite type's 'name:' field, the latter its 'identifier:'
      field).
      
      I'm currently working on removing string-based type refs entirely, and
      this testcase started failing (because the upgrade script can't resolve
      the type refs).  Rather than fixing the (about-to-be-removed) hole in
      the verifier, I'm just going to fix the test so that my upgrade script
      handles it.
      
      llvm-svn: 266553
      2c7cd4af
    • Duncan P. N. Exon Smith's avatar
      IR: Use getRawScope() when verifying · c98ec20a
      Duncan P. N. Exon Smith authored
      Fix a couple of places in the Verifier that call `getScope()` instead of
      `getRawScope()`.  Both DIDerivedType::getScope and
      DICompositeType::getScope return a DITypeRef right now (which wraps a
      Metadata*) so I don't think there's currently an observable bug.  I
      found this because a future commit that will change them to cast to
      DIScope*.
      
      llvm-svn: 266552
      c98ec20a
    • Sanjoy Das's avatar
      Fix a typo in rL265762 · 99042473
      Sanjoy Das authored
      I accidentally replaced `mayBeOverridden` with `!isInterposable`.
      Remove the negation and add a test case that would've caught this.
      
      Many thanks to Håkan Hjort for spotting this!
      
      llvm-svn: 266551
      99042473
    • Duncan P. N. Exon Smith's avatar
      Revert "use range loop, try to make comments more meaningful; NFCI" · 93f53c42
      Duncan P. N. Exon Smith authored
      This reverts commit r266541 since it introduces a use-after-free:
        http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11471
      
      llvm-svn: 266550
      93f53c42
    • Duncan P. N. Exon Smith's avatar
      IR: Use an explicit map for debug info type uniquing · 5ab2be09
      Duncan P. N. Exon Smith authored
      Rather than relying on the structural equivalence of DICompositeType to
      merge type definitions, use an explicit map on the LLVMContext that
      LLParser and BitcodeReader consult when constructing new nodes.
      Each non-forward-declaration DICompositeType with a non-empty
      'identifier:' field is stored/loaded from the type map, and the first
      definiton will "win".
      
      This map is opt-in: clients that expect ODR types from different modules
      to be merged must call LLVMContext::ensureDITypeMap.
      
        - Clients that just happen to load more than one Module in the same
          LLVMContext won't magically merge types.
      
        - Clients (like LTO) that want to continue to merge types based on ODR
          identifiers should opt-in immediately.
      
      I have updated LTOCodeGenerator.cpp, the two "linking" spots in
      gold-plugin.cpp, and llvm-link (unless -disable-debug-info-type-map) to
      set this.
      
      With this in place, it will be straightforward to remove the DITypeRef
      concept (i.e., referencing types by their 'identifier:' string rather
      than pointing at them directly).
      
      llvm-svn: 266549
      5ab2be09
    • Duncan P. N. Exon Smith's avatar
      IR: Use ODR to unique DICompositeType members · 05ebfd09
      Duncan P. N. Exon Smith authored
      Merge members that are describing the same member of the same ODR type,
      even if other bits differ.  If the file or line differ, we don't care;
      if anything else differs, it's an ODR violation (and we still don't
      really care).
      
      For DISubprogram declarations, this looks at the LinkageName and Scope.
      For DW_TAG_member instances of DIDerivedType, this looks at the Name and
      Scope.  In both cases, we know that the Scope follows ODR rules if it
      has a non-empty identifier.
      
      llvm-svn: 266548
      05ebfd09
    • Craig Topper's avatar
      [Target] Reduce size of the LoadExtActions array in TargetLoweringBase by... · 25fd344a
      Craig Topper authored
      [Target] Reduce size of the LoadExtActions array in TargetLoweringBase by half. Saving ~18K bytes from the array.
      
      llvm-svn: 266547
      25fd344a
    • Craig Topper's avatar
    • Craig Topper's avatar
      [Target] Fix an assertion that should have been updated when the code below it... · 28336ed3
      Craig Topper authored
      [Target] Fix an assertion that should have been updated when the code below it was changed in r251033.
      
      llvm-svn: 266545
      28336ed3
    • Duncan P. N. Exon Smith's avatar
      LangRef: Removed some outdated text about DIDerivedType · 90990cd9
      Duncan P. N. Exon Smith authored
      This text is also incorrect (much like r266540).  It looks like I missed
      updating some of what I moved from SourceLevelDebugging.rst in r232566.
      
      llvm-svn: 266544
      90990cd9
    • Duncan P. N. Exon Smith's avatar
      Linker: Clarify test/Linker/type-unique-odr-a.ll, NFC · 4f6f15d2
      Duncan P. N. Exon Smith authored
      Split up the long RUN and clarify the CHECK lines:
      
        - Explicitly confirm there are no other subprograms inside of "A".
      
        - Remove checks for "bar" and "baz", which were just implicitly
          checking that there were no other subprograms inside of "A".
      
      This prepares for adding a RUN line which links the two files in the
      opposite direction.
      
      llvm-svn: 266543
      4f6f15d2
    • Duncan P. N. Exon Smith's avatar
      IR: Add a configuration point for MDNodeInfo::isEqual, NFC · f2291278
      Duncan P. N. Exon Smith authored
      This commit has no functionality change, but it adds a configuration
      point for MDNodeInfo::isEqual to allow custom uniquing of subclasses of
      MDNode, minimizing the diff of a follow-up.
      
      llvm-svn: 266542
      f2291278
    • Sanjay Patel's avatar
      use range loop, try to make comments more meaningful; NFCI · a770a7ec
      Sanjay Patel authored
      llvm-svn: 266541
      a770a7ec
    • Duncan P. N. Exon Smith's avatar
      LangRef: Fix some bugs in debug info descriptions · a3f3de17
      Duncan P. N. Exon Smith authored
      Fix descriptions of DICompositeType and DIDerivedType.
      
      llvm-svn: 266540
      a3f3de17
    • Duncan P. N. Exon Smith's avatar
      IR: Remove extra blank line, NFC · 24651b06
      Duncan P. N. Exon Smith authored
      llvm-svn: 266539
      24651b06
    • Duncan P. N. Exon Smith's avatar
      LTO: Use a common LibLTOCodeGenerator::init, NFC · 247e636d
      Duncan P. N. Exon Smith authored
      llvm-svn: 266538
      247e636d
  2. Apr 16, 2016
    • Duncan P. N. Exon Smith's avatar
      ValueMapper: Separate mapping of distinct and uniqued nodes (again) · 694ab4e9
      Duncan P. N. Exon Smith authored
      Since the result of a mapped distinct node is known up front, it's more
      efficient to map them separately from uniqued nodes.  This commit pulls
      them out of the post-order traversal and stores them in a worklist to be
      remapped at the top-level.
      
      This is essentially reapplying r244181 ("ValueMapper: Rotate distinct
      node remapping algorithm") to the new iterative algorithm from r265456
      ("ValueMapper: Rewrite Mapper::mapMetadata without recursion").
      
      Now that the traversal logic only handles uniqued MDNodes, it's much
      simpler to inline it all into MDNodeMapper::createPOT (I've killed the
      MDNodeMapper::push and MDNodeMapper::tryToPop helpers and localized the
      traversal worklist).
      
      The resulting high-level algorithm for MDNodeMapper::map now looks like
      this:
      
        - Distinct nodes are immediately mapped and added to
          MDNodeMapper::DistinctWorklist using MDNodeMapper::mapDistinctNode.
      
        - Uniqued nodes are mapped via MDNodeMapper::mapTopLevelUniquedNode,
          which traverses the transitive uniqued subgraph of a node to
          calculate uniqued node mappings in bulk.
      
            - This is a simplified version of MDNodeMapper::map from before
              this commit (originally r265456) that doesn't traverse through
              any distinct nodes.
      
            - Distinct nodes are added to MDNodeMapper::DistinctWorklist via
              MDNodeMapper::mapDistinctNode.
      
            - This uses MDNodeMapper::createPOT to fill a
              MDNodeMapper::UniquedGraph (a post-order traversal and side
              table), UniquedGraph::propagateChanges to track which uniqued
              nodes need to change, and MDNodeMapper::mapNodesInPOT to create
              the uniqued nodes.
      
            - Placeholders for forward references are now only needed when
              there's a uniquing cycle (a cycle of uniqued nodes unbroken by
              distinct nodes).  This is the key functionality change that
              we're reintroducing (from r244181).  As of r265456, a temporary
              forward reference might be needed for any cycle that involved
              uniqued nodes.
      
        - After mapping the first node appropriately, MDNodeMapper::map works
          through MDNodeMapper::DistinctWorklist.  For each distinct node, its
          operands are remapped with MDNodeMapper::mapDistinctNode and
          MDNodeMapper::mapTopLevelUniquedNode until all nodes have been
          mapped.
      
      Sadly there's nothing observable I can test here; no real functionality
      change, just a compile-time speedup from reduced malloc traffic.
      
      llvm-svn: 266537
      694ab4e9
    • Duncan P. N. Exon Smith's avatar
      ValueMapper: Only put cyclic nodes into CyclicNodes, NFCI · 0cb5c344
      Duncan P. N. Exon Smith authored
      As a minor fixup to r266258, only track nodes that needed a placeholder
      in CyclicNodes in MDNodeMapper::mapUniquedNodes.  There should be no
      observable functionality change, just some local memory savings because
      CyclicNodes only needs to grow to accommodate nodes that are actually
      involved in cycles.  (This was the original intent of r266258, or else
      the vector would have been called "ChangedNodes".)
      
      llvm-svn: 266536
      0cb5c344
    • Simon Pilgrim's avatar
      [X86][AVX] Add shuffle combine tests for MOVDDUP/MOVSHDUP/MOVSLDUP · b75744ce
      Simon Pilgrim authored
      128, 256 and 512 bit implementations (some not yet supported by combineX86ShuffleChain)
      
      llvm-svn: 266535
      b75744ce
    • Craig Topper's avatar
      [X86] Use ternary operator to reduce code slightly. NFC · 1663e7a4
      Craig Topper authored
      llvm-svn: 266534
      1663e7a4
    • Simon Pilgrim's avatar
      [X86][XOP] Added VPPERM constant mask decoding and target shuffle combining support · fd4b9b02
      Simon Pilgrim authored
      Added additional test that peeks through bitcast to v16i8 mask
      
      llvm-svn: 266533
      fd4b9b02
    • Vedant Kumar's avatar
    • Simon Pilgrim's avatar
      [X86][XOP] More VPPERM shuffle mask decode tests · 4eb94a93
      Simon Pilgrim authored
      As requested by D18441
      
      llvm-svn: 266531
      4eb94a93
    • Oleksiy Vyalov's avatar
      Fix cmake build after r266524. · 37a09e72
      Oleksiy Vyalov authored
      llvm-svn: 266530
      37a09e72
    • Simon Atanasyan's avatar
      ValueMapper: Fix unused var warning. NFC · e12bef7e
      Simon Atanasyan authored
      llvm-svn: 266529
      e12bef7e
    • Simon Atanasyan's avatar
      Remove links to deleted TODOs. · b5c0025d
      Simon Atanasyan authored
      llvm-svn: 266528
      b5c0025d
    • Simon Atanasyan's avatar
      737a92c8
    • George Rimar's avatar
      Recommitted 266457 with fix: · 652852c5
      George Rimar authored
      * Do script driven layout only if SECTIONS section exist.
      
      Initial commit message:
      
      [ELF] - Implemented basic location counter support.
      
      This patch implements location counter support. 
      It also separates assign addresses for sections to assignAddressesScript() if it scipt exists.
      
      Main testcase is test/ELF/linkerscript-locationcounter.s, It contains some work with location counter. It is basic now.
      Implemented location counter assignment and '+' operations.
      
      Patch by myself with LOTS of comments and design suggestions from Rui Ueyama.
      
      Differential revision: http://reviews.llvm.org/D18499
      
      llvm-svn: 266526
      652852c5
    • Mehdi Amini's avatar
      Add missing headers (fix build after headers cleanup in LLVM) · 357deca8
      Mehdi Amini authored
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 266525
      357deca8
    • Mehdi Amini's avatar
      Remove some unneeded headers and replace some headers with forward class declarations (NFC) · 47b292d3
      Mehdi Amini authored
      Differential Revision: http://reviews.llvm.org/D19154
      
      Patch by Eugene Kosov <claprix@yandex.ru>
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 266524
      47b292d3
    • Mehdi Amini's avatar
      Add SVN version to libLLVMLTO · 1d30fcac
      Mehdi Amini authored
      Summary: For Incremental LTO, we need to make sure that an old
      cache entry is not used when incrementally re-linking with a new
      libLTO.
      Adding a global LLVM_REVISION in llvm-config.h would for to
      rebuild/relink the world for every "git pull"/"svn update".
      So instead only libLTO is made dependent on the VCS and will
      be rebuilt (and the dependent binaries relinked, i.e. as of
      today: libLTO.dylib and llvm-lto).
      
      Reviewers: beanz
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D18987
      
      From: Mehdi Amini <mehdi.amini@apple.com>
      llvm-svn: 266523
      1d30fcac
Loading