Skip to content
  1. Oct 03, 2013
    • David Blaikie's avatar
      DebugInfo: Avoid redundantly adding child DIEs to parents. · 811bfe63
      David Blaikie authored
      DIE::addChild had a shortcircuit that silently no-op'd when a child was
      readded to the same parent. This hid some quirky/redundant code in
      DwarfDebug/CompileUnit. By removing that functionality and replacing it
      with an assert I was able to find and cleanup those cases, mostly
      centering around adding members to types in various circumstances.
      
      1) The original oddity I noticed while working on type units (which
      actually was helping me in the short term, by accident) was the
      addToContextOwner call in constructTypeDIE. This call was completely
      bogus (why was it only done for non-virtual types? what relevance does
      that have at all) and redundant with the more uniform addToContextOwner
      made in getOrCreateTypeDIE.
      
      2) If a member function definition was visited (createSubprogramDIE), it
      would attempt to build the member function declaration. The declaration
      DIE would then be added to its context, but in building the context (the
      type for which this function is a member) the members of the type would
      be added to the type automatically, so by the time the context was
      constructed, the member function was already associated with it.
      
      3) The same as (2) but without the member function being constructed
      first. Whenever a type was constructed, the members would be created and
      member functions would be created by getOrCreateSubprogramDIE - this
      would lead to the subprogram being added to the (incomplete) type
      already, then the general member-construction code would add it again.
      
      llvm-svn: 191928
      811bfe63
    • Matt Arsenault's avatar
      Rename DataLayout variables TD -> DL · 40dddd71
      Matt Arsenault authored
      llvm-svn: 191927
      40dddd71
    • Eric Christopher's avatar
      Make sure we emit a section for pubnames even if that section is · c948b9df
      Eric Christopher authored
      going to be empty. This is particularly important for the gnu
      pubnames case since we're emitting a relocation to the section.
      
      llvm-svn: 191915
      c948b9df
    • Eric Christopher's avatar
      Fix cut and paste typo. · f976c77e
      Eric Christopher authored
      llvm-svn: 191914
      f976c77e
    • Jin-Gu Kang's avatar
      Added checking code whehter target supports specific dag combining about rotate · 0bf8241d
      Jin-Gu Kang authored
      or not. The corresponding dag patterns are as following:
      
      "DAGCombier::MatchRotate" function in DAGCombiner.cpp
      Pattern1
      // fold (or (shl (*ext x), (*ext y)),
      //          (srl (*ext x), (*ext (sub 32, y)))) ->
      //   (*ext (rotl x, y))
      // fold (or (shl (*ext x), (*ext y)),
      //          (srl (*ext x), (*ext (sub 32, y)))) ->
      //   (*ext (rotr x, (sub 32, y)))
      
      pattern2
      // fold (or (shl (*ext x), (*ext (sub 32, y))),
      //          (srl (*ext x), (*ext y))) ->
      //   (*ext (rotl x, y))
      // fold (or (shl (*ext x), (*ext (sub 32, y))),
      //          (srl (*ext x), (*ext y))) ->
      //   (*ext (rotr x, (sub 32, y)))
      
      llvm-svn: 191905
      0bf8241d
    • Alexey Samsonov's avatar
      Remove wild .debug_aranges entries generated from unimportant labels · 4436bf03
      Alexey Samsonov authored
      r191052 added emitting .debug_aranges to Clang, but this
      functionality is broken: it uses all MC labels added in DWARF Asm
      printer, including the labels for build relocations between
      different DWARF sections, like .Lsection_line or .Ldebug_loc0.
      
      As a result, if any DIE .debug_info would contain "DW_AT_location=0x123"
      attribute, .debug_aranges would also contain a range starting from 0x123,
      breaking tools that rely on this section.
      
      This patch fixes this by using only MC labels that corresponds to the
      addresses in the user program.
      
      llvm-svn: 191884
      4436bf03
  2. Oct 02, 2013
    • Chandler Carruth's avatar
      Remove the very substantial, largely unmaintained legacy PGO · ea564946
      Chandler Carruth authored
      infrastructure.
      
      This was essentially work toward PGO based on a design that had several
      flaws, partially dating from a time when LLVM had a different
      architecture, and with an effort to modernize it abandoned without being
      completed. Since then, it has bitrotted for several years further. The
      result is nearly unusable, and isn't helping any of the modern PGO
      efforts. Instead, it is getting in the way, adding confusion about PGO
      in LLVM and distracting everyone with maintenance on essentially dead
      code. Removing it paves the way for modern efforts around PGO.
      
      Among other effects, this removes the last of the runtime libraries from
      LLVM. Those are being developed in the separate 'compiler-rt' project
      now, with somewhat different licensing specifically more approriate for
      runtimes.
      
      llvm-svn: 191835
      ea564946
    • Manman Ren's avatar
      Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type · 9a0a6703
      Manman Ren authored
      is updated to use DITypeRef.
      
      Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
      helper functions in DwarfCompileUnit. We already have a static helper function
      "isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
      resolve the derived-from field. All three functions need to go across link
      for derived-from fields, so we need to get hold of a type identifier map.
      
      A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
      derived-from field.
      
      Debug info verifier is updated to check a derived-from field is a TypeRef.
      Verifier will not go across link for derived-from fields, in debug info finder,
      we go across the link to add derived-from fields to types.
      
      Function getDICompositeType is only used by dragonegg and since dragonegg does
      not generate identifier for types, we use an empty map to resolve the
      derived-from field.
      
      When printing a derived-from field, we use DITypeRef::getName to either return
      the type identifier or getName of the DIType.
      
      A paired commit at clang is required due to changes to DIBuilder.
      
      llvm-svn: 191800
      9a0a6703
  3. Oct 01, 2013
  4. Sep 30, 2013
    • Arnold Schwaighofer's avatar
      IfConverter: Use TargetSchedule for instruction latencies · d2f96b91
      Arnold Schwaighofer authored
      For targets that have instruction itineraries this means no change. Targets
      that move over to the new schedule model will use be able the new schedule
      module for instruction latencies in the if-converter (the logic is such that if
      there is no itineary we will use the new sched model for the latencies).
      
      Before, we queried "TTI->getInstructionLatency()" for the instruction latency
      and the extra prediction cost. Now, we query the TargetSchedule abstraction for
      the instruction latency and TargetInstrInfo for the extra predictation cost. The
      TargetSchedule abstraction will internally call "TTI->getInstructionLatency" if
      an itinerary exists, otherwise it will use the new schedule model.
      
      ATTENTION: Out of tree targets!
      
      (I will also send out an email later to LLVMDev)
      
      This means, if your target implements
      
       unsigned getInstrLatency(const InstrItineraryData *ItinData,
                                const MachineInstr *MI,
                                unsigned *PredCost);
      
      and returns a value for "PredCost", you now also need to implement
      
       unsigned getPredictationCost(const MachineInstr *MI);
      
      (if your target uses the IfConversion.cpp pass)
      
      radar://15077010
      
      llvm-svn: 191671
      d2f96b91
  5. Sep 29, 2013
  6. Sep 28, 2013
  7. Sep 27, 2013
  8. Sep 26, 2013
  9. Sep 25, 2013
    • Andrea Di Biagio's avatar
      Teach DAGCombiner how to canonicalize dags according to the rule · 9f331310
      Andrea Di Biagio authored
       (shl (zext (shr A, X)), X) => (zext (shl (shr A, X), X)).
      
      The rule only triggers when there are no other uses of the
      zext to avoid materializing more instructions.
      
      This helps the DAGCombiner understand that the shl/shr
      sequence can then be converted into an and instruction.
      
      llvm-svn: 191393
      9f331310
    • Andrew Trick's avatar
      Mark the x86 machine model as incomplete. PR17367. · b6854d80
      Andrew Trick authored
      Ideally, the machinel model is added at the time the instructions are
      defined. But many instructions in X86InstrSSE.td still need a model.
      
      Without this workaround the scheduler asserts because x86 already has
      itinerary classes for these instructions, indicating they should be
      modeled by the scheduler. Since we use the new machine model for other
      instructions, it expects a new machine model for these too.
      
      llvm-svn: 191391
      b6854d80
    • Quentin Colombet's avatar
      [PR16882] Ignore noreturn definitions when setting isPhysRegUsed. · fa403ab3
      Quentin Colombet authored
      PEI inserts a save/restore sequence for the link register, according to the
      information it gets from the MachineRegisterInfo.
      MachineRegisterInfo is populated by the VirtRegMap pass.
      This pass was not aware of noreturn calls and was registering the definitions of
      these calls the same way as regular operations.
      
      Modify VirtRegPass so that it does not set the isPhysRegUsed information for
      registers only defined by noreturn calls.
      The rational is that a noreturn call is the "last instruction" of the program
      (if it returns the behavior is undefined), so everything that is defined by it
      cannot be used and will not interfere with anything else. Therefore, it is
      pointless to account for then.
      
      llvm-svn: 191349
      fa403ab3
    • Eli Friedman's avatar
      Add missing check to SETCC optimization. · a961d694
      Eli Friedman authored
      PR17338.
      
      llvm-svn: 191337
      a961d694
  10. Sep 24, 2013
Loading