Skip to content
  1. Jan 11, 2014
    • NAKAMURA Takumi's avatar
      LoopVectorize.cpp: Appease MSC16. · 41c409ce
      NAKAMURA Takumi authored
      Excuse me, I hope msc16 builders would be fine till its end day.
      Introduce nullptr then. ;)
      
      llvm-svn: 199001
      41c409ce
    • NAKAMURA Takumi's avatar
    • NAKAMURA Takumi's avatar
      llvm/test/CodeGen/X86/anyregcc.ll: Add explicit -mtriple=x86_64-unknown-unknown. · 80a474c1
      NAKAMURA Takumi authored
      XMM(s) are really spilling for targeting Win64.
      
      llvm-svn: 198999
      80a474c1
    • Chandler Carruth's avatar
      [PM] Add (very skeletal) support to opt for running the new pass · 66445382
      Chandler Carruth authored
      manager. I cannot emphasize enough that this is a WIP. =] I expect it
      to change a great deal as things stabilize, but I think its really
      important to get *some* functionality here so that the infrastructure
      can be tested more traditionally from the commandline.
      
      The current design is looking something like this:
      
        ./bin/opt -passes='module(pass_a,pass_b,function(pass_c,pass_d))'
      
      So rather than custom-parsed flags, there is a single flag with a string
      argument that is parsed into the pass pipeline structure. This makes it
      really easy to have nice structural properties that are very explicit.
      There is one obvious and important shortcut. You can start off the
      pipeline with a pass, and the minimal context of pass managers will be
      built around the entire specified pipeline. This makes the common case
      for tests super easy:
      
        ./bin/opt -passes=instcombine,sroa,gvn
      
      But this won't introduce any of the complexity of the fully inferred old
      system -- we only ever do this for the *entire* argument, and we only
      look at the first pass. If the other passes don't fit in the pass
      manager selected it is a hard error.
      
      The other interesting aspect here is that I'm not relying on any
      registration facilities. Such facilities may be unavoidable for
      supporting plugins, but I have alternative ideas for plugins that I'd
      like to try first. My plan is essentially to build everything without
      registration until we hit an absolute requirement.
      
      Instead of registration of pass names, there will be a library dedicated
      to parsing pass names and the pass pipeline strings described above.
      Currently, this is directly embedded into opt for simplicity as it is
      very early, but I plan to eventually pull this into a library that opt,
      bugpoint, and even Clang can depend on. It should end up as a good home
      for things like the existing PassManagerBuilder as well.
      
      There are a bunch of FIXMEs in the code for the parts of this that are
      just stubbed out to make the patch more incremental. A quick list of
      what's coming up directly after this:
      - Support for function passes and building the structured nesting.
      - Support for printing the pass structure, and FileCheck tests of all of
        this code.
      - The .def-file based pass name parsing.
      - IR priting passes and the corresponding tests.
      
      Some obvious things that I'm not going to do right now, but am
      definitely planning on as the pass manager work gets a bit further:
      - Pull the parsing into library, including the builders.
      - Thread the rest of the target stuff into the new pass manager.
      - Wire support for the new pass manager up to llc.
      - Plugin support.
      
      Some things that I'd like to have, but are significantly lower on my
      priority list. I'll get to these eventually, but they may also be places
      where others want to contribute:
      - Adding nice error reporting for broken pass pipeline descriptions.
      - Typo-correction for pass names.
      
      llvm-svn: 198998
      66445382
    • Nick Lewycky's avatar
    • Nick Lewycky's avatar
      Add a new attribute 'enable_if' which can be used to control overload... · 35a6ef4c
      Nick Lewycky authored
      Add a new attribute 'enable_if' which can be used to control overload resolution based on the values of the function arguments at the call site.
      
      llvm-svn: 198996
      35a6ef4c
    • Nick Lewycky's avatar
      Use the appropriate SourceLocation for the template backtrace when doing · 56412330
      Nick Lewycky authored
      template argument deduction.
      
      llvm-svn: 198995
      56412330
    • Rui Ueyama's avatar
      [PECOFF] Support HEAPSIZE directive. · 6a5f7c22
      Rui Ueyama authored
      llvm-svn: 198994
      6a5f7c22
    • Rui Ueyama's avatar
      [PECOFF] Refactor module-defintion file parser. · f98a18ac
      Rui Ueyama authored
      Refactor the parser so that the parser can return arbitrary type of parse
      result other than a vector of ExportDesc. Parsers for non-EXPORTS directives
      will be implemented in different patches. No functionality change.
      
      llvm-svn: 198993
      f98a18ac
    • Richard Smith's avatar
      PR12208: Under -fno-elide-constructors, don't forget to actually copy an NRVO · 454b4af0
      Richard Smith authored
      variable to the return slot. Patch by David Wiberg, with test case alterations
      by me.
      
      llvm-svn: 198991
      454b4af0
    • Jim Ingham's avatar
      55d3a0c3
    • Warren Hunt's avatar
      [ms-abi] Change the way alignment is tracked · 9425891f
      Warren Hunt authored
      This patch more cleanly seperates the concepts of Preferred Alignment 
      and Required Alignment.  Most notable that changes to Required Alignment 
      do *not* impact preferred alignment until late in struct layout.  This 
      is observable when using pragma pack and non-virtual bases and the use 
      of tail padding when laying them out.
      
      Test cases included.
      
      llvm-svn: 198988
      9425891f
    • Nick Kledzik's avatar
      [yaml] use BumpPtrAllocator for string copies · 8293c711
      Nick Kledzik authored
      llvm-svn: 198987
      8293c711
    • Nick Kledzik's avatar
      [mach-o] enable mach-o and native yaml to be intermixed · 6edd722a
      Nick Kledzik authored
      The main goal of this patch is to allow "mach-o encoded as yaml" and "native
      encoded as yaml" documents to be intermixed.  They are distinguished via 
      yaml tags at the start of the document.  This will enable all mach-o test cases
      to be written using yaml instead of checking in object files.
      
      The Registry was extend to allow yaml tag handlers to be registered.  The
      mach-o Reader adds a yaml tag handler for the tag "!mach-o". 
      
      Additionally, this patch fixes some buffer ownership issues.  When parsing
      mach-o binaries, the mach-o atoms can have pointers back into the memory 
      mapped .o file.  But with yaml encoded mach-o, name and content are ephemeral, 
      so a copyRefs parameter was added to cause the mach-o atoms to make their
      own copy.  
      
      llvm-svn: 198986
      6edd722a
    • Juergen Ributzka's avatar
      [anyregcc] Fix callee-save mask for anyregcc · 976d94b8
      Juergen Ributzka authored
      Use separate callee-save masks for XMM and YMM registers for anyregcc on X86 and
      select the proper mask depending on the target cpu we compile for.
      
      llvm-svn: 198985
      976d94b8
    • Greg Clayton's avatar
      Make sure to cleanup the "dwarf-lookups.txt" log file. · fd6e4b91
      Greg Clayton authored
      llvm-svn: 198984
      fd6e4b91
    • Richard Smith's avatar
      Fix "regression" caused by updating our notion of POD to better match the C++11 · 6fa28ffd
      Richard Smith authored
      rules: instead of requiring flexible array members to be POD, require them to
      be trivially-destructible. This seems to be the only constraint that actually
      matters here (and even then, it's questionable whether this matters).
      
      llvm-svn: 198983
      6fa28ffd
    • Greg Clayton's avatar
      We are doing spurious name lookups when running expressions in objective C methods. · c26e63e9
      Greg Clayton authored
      <rdar://problem/15797390>
      
      This new test case will detect this and make sure we don't regress on global name lookups that search all DWARF for everything when we don't need to.
      
      llvm-svn: 198982
      c26e63e9
    • Eric Christopher's avatar
      Revert r198979 - accidental commit. · 942f22c4
      Eric Christopher authored
      llvm-svn: 198981
      942f22c4
    • Eric Christopher's avatar
      Reformat. · ceec7b02
      Eric Christopher authored
      llvm-svn: 198980
      ceec7b02
    • Eric Christopher's avatar
      Update function name and add some helpful comments. · 67cde9ac
      Eric Christopher authored
      llvm-svn: 198979
      67cde9ac
    • Eric Christopher's avatar
      Fix odd whitespace. · a052e12c
      Eric Christopher authored
      llvm-svn: 198978
      a052e12c
    • Jason Molenda's avatar
    • Jim Ingham's avatar
      Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression... · 1460e4bf
      Jim Ingham authored
      Get the breakpoint setting, and the Mac OS X DYLD trampolines and expression evaluator to handle Indirect
      symbols correctly.  There were a couple of pieces to this.
      
      1) When a breakpoint location finds itself pointing to an Indirect symbol, when the site for it is created
         it needs to resolve the symbol and actually set the site at its target.
      2) Not all breakpoints want to do this (i.e. a straight address breakpoint should always set itself on the
         specified address, so somem machinery was needed to specify that.
      3) I added some info to the break list output for indirect symbols so you could see what was happening. 
         Also I made it clear when we re-route through re-exported symbols.
      4) I moved ResolveIndirectFunction from ProcessPosix to Process since it works the exact same way on Mac OS X
         and the other posix systems.  If we find a platform that doesn't do it this way, they can override the
         call in Process.
      5) Fixed one bug in RunThreadPlan, if you were trying to run a thread plan after a "running" event had
         been broadcast, the event coalescing would cause you to miss the ThreadPlan running event.  So I added
         a way to override the coalescing.
      6) Made DynamicLoaderMacOSXDYLD::GetStepThroughTrampolinePlan handle Indirect & Re-exported symbols.
      
      <rdar://problem/15280639>
      
      llvm-svn: 198976
      1460e4bf
    • Warren Hunt's avatar
      [ms-abi] Adjusting Rules for Padding Between Bases · 87c2b040
      Warren Hunt authored
      The presence of a VBPtr suppresses the presence of zero sized 
      sub-objects in the non-virtual portion of the object in the context of 
      determining if two base objects need alias-avoidance padding placed 
      between them.
      
      Test cases included.
      
      llvm-svn: 198975
      87c2b040
    • Rui Ueyama's avatar
      [PECOFF] Add a unit test for r198925. · b8912b4f
      Rui Ueyama authored
      llvm-svn: 198974
      b8912b4f
    • Diego Novillo's avatar
      Extend and simplify the sample profile input file. · 9518b63b
      Diego Novillo authored
      1- Use the line_iterator class to read profile files.
      
      2- Allow comments in profile file. Lines starting with '#'
         are completely ignored while reading the profile.
      
      3- Add parsing support for discriminators and indirect call samples.
      
         Our external profiler can emit more profile information that we are
         currently not handling. This patch does not add new functionality to
         support this information, but it allows profile files to provide it.
      
         I will add actual support later on (for at least one of these
         features, I need support for DWARF discriminators in Clang).
      
         A sample line may contain the following additional information:
      
         Discriminator. This is used if the sampled program was compiled with
         DWARF discriminator support
         (http://wiki.dwarfstd.org/index.php?title=Path_Discriminators). This
         is currently only emitted by GCC and we just ignore it.
      
         Potential call targets and samples. If present, this line contains a
         call instruction. This models both direct and indirect calls. Each
         called target is listed together with the number of samples. For
         example,
      
                          130: 7  foo:3  bar:2  baz:7
      
         The above means that at relative line offset 130 there is a call
         instruction that calls one of foo(), bar() and baz(). With baz()
         being the relatively more frequent call target.
      
         Differential Revision: http://llvm-reviews.chandlerc.com/D2355
      
      4- Simplify format of profile input file.
      
         This implements earlier suggestions to simplify the format of the
         sample profile file. The symbol table is not necessary and function
         profiles do not need to know the number of samples in advance.
      
         Differential Revision: http://llvm-reviews.chandlerc.com/D2419
      
      llvm-svn: 198973
      9518b63b
    • Diego Novillo's avatar
      Propagation of profile samples through the CFG. · 0accb3d2
      Diego Novillo authored
      This adds a propagation heuristic to convert instruction samples
      into branch weights. It implements a similar heuristic to the one
      implemented by Dehao Chen on GCC.
      
      The propagation proceeds in 3 phases:
      
      1- Assignment of block weights. All the basic blocks in the function
         are initial assigned the same weight as their most frequently
         executed instruction.
      
      2- Creation of equivalence classes. Since samples may be missing from
         blocks, we can fill in the gaps by setting the weights of all the
         blocks in the same equivalence class to the same weight. To compute
         the concept of equivalence, we use dominance and loop information.
         Two blocks B1 and B2 are in the same equivalence class if B1
         dominates B2, B2 post-dominates B1 and both are in the same loop.
      
      3- Propagation of block weights into edges. This uses a simple
         propagation heuristic. The following rules are applied to every
         block B in the CFG:
      
         - If B has a single predecessor/successor, then the weight
           of that edge is the weight of the block.
      
         - If all the edges are known except one, and the weight of the
           block is already known, the weight of the unknown edge will
           be the weight of the block minus the sum of all the known
           edges. If the sum of all the known edges is larger than B's weight,
           we set the unknown edge weight to zero.
      
         - If there is a self-referential edge, and the weight of the block is
           known, the weight for that edge is set to the weight of the block
           minus the weight of the other incoming edges to that block (if
           known).
      
      Since this propagation is not guaranteed to finalize for every CFG, we
      only allow it to proceed for a limited number of iterations (controlled
      by -sample-profile-max-propagate-iterations). It currently uses the same
      GCC default of 100.
      
      Before propagation starts, the pass builds (for each block) a list of
      unique predecessors and successors. This is necessary to handle
      identical edges in multiway branches. Since we visit all blocks and all
      edges of the CFG, it is cleaner to build these lists once at the start
      of the pass.
      
      Finally, the patch fixes the computation of relative line locations.
      The profiler emits lines relative to the function header. To discover
      it, we traverse the compilation unit looking for the subprogram
      corresponding to the function. The line number of that subprogram is the
      line where the function begins. That becomes line zero for all the
      relative locations.
      
      llvm-svn: 198972
      0accb3d2
    • Tom Roeder's avatar
      Space formatting fix for r198966. · 583a77e0
      Tom Roeder authored
      llvm-svn: 198971
      583a77e0
    • Filipe Cabecinhas's avatar
      Fix CMake build of debugserver on Mac OS X. · 199e9233
      Filipe Cabecinhas authored
      llvm-svn: 198970
      199e9233
  2. Jan 10, 2014
Loading