Skip to content
  1. Sep 09, 2016
  2. Sep 08, 2016
  3. Sep 07, 2016
    • Reid Kleckner's avatar
      [MS] Fix prologue this adjustment when 'this' is passed indirectly · e5a321b5
      Reid Kleckner authored
      Move the logic for doing this from the ABI argument lowering into
      EmitParmDecl, which runs for all parameters. Our codegen is slightly
      suboptimal in this case, as we may leave behind a dead store after
      optimization, but it's 32-bit inalloca, and this fixes the bug in a
      robust way.
      
      Fixes PR30293
      
      llvm-svn: 280836
      e5a321b5
    • Reid Kleckner's avatar
      [MS] Fix 'this' type when calling virtual methods with inalloca · 034e7270
      Reid Kleckner authored
      If the virtual method comes from a secondary vtable, then the type of
      the 'this' parameter should be i8*, and not a pointer to the complete
      class. In the MS ABI, the 'this' parameter on entry points to the vptr
      containing the virtual method that was called, so we use i8* instead of
      the normal type. We had a mismatch where the CGFunctionInfo of the call
      didn't match the CGFunctionInfo of the declaration, and this resulted in
      some assertions, but now both sides agree the type of 'this' is i8*.
      
      Fixes one issue raised in PR30293
      
      llvm-svn: 280815
      034e7270
    • Matt Arsenault's avatar
      Fix whitespace issues · 8afb5cd8
      Matt Arsenault authored
      ^M and extra space
      
      llvm-svn: 280786
      8afb5cd8
  4. Sep 06, 2016
  5. Sep 01, 2016
    • Honggyu Kim's avatar
      [Frontend] Fix mcount inlining bug · 2b0e424b
      Honggyu Kim authored
      Since some profiling tools, such as gprof, ftrace, and uftrace, use
      -pg option to generate a mcount function call at the entry of each
      function. Function invocation can be detected by this hook function.
      
      But mcount insertion is done before function inlining phase in clang,
      sometime a function that already has a mcount call can be inlined in the
      middle of another function.
      
      This patch adds an attribute "counting-function" to each function
      rather than emitting the mcount call directly in frontend so that this
      attribute can be processed in backend. Then the mcount calls can be
      properly inserted in backend after all the other optimizations are
      completed.
      
      Link: https://llvm.org/bugs/show_bug.cgi?id=28660
      
      Reviewers: hans, rjmccall, hfinkel, rengolin, compnerd
      
      Subscribers: shenhan, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D22666
      
      llvm-svn: 280355
      2b0e424b
    • Honggyu Kim's avatar
      Remove whitespace to test commit access · 2bbdeacf
      Honggyu Kim authored
      llvm-svn: 280337
      2bbdeacf
    • Nick Lewycky's avatar
      Add -fprofile-dir= to clang. · 97e49ac5
      Nick Lewycky authored
      -fprofile-dir=path allows the user to specify where .gcda files should be
      emitted when the program is run. In particular, this is the first flag that
      causes the .gcno and .o files to have different paths, LLVM is extended to
      support this. -fprofile-dir= does not change the file name in the .gcno (and
      thus where lcov looks for the source) but it does change the name in the .gcda
      (and thus where the runtime library writes the .gcda file). It's different from
      a GCOV_PREFIX because a user can observe that the GCOV_PREFIX_STRIP will strip
      paths off of -fprofile-dir= but not off of a supplied GCOV_PREFIX.
      
      To implement this we split -coverage-file into -coverage-data-file and
      -coverage-notes-file to specify the two different names. The !llvm.gcov
      metadata node grows from a 2-element form {string coverage-file, node dbg.cu}
      to 3-elements, {string coverage-notes-file, string coverage-data-file, node
      dbg.cu}. In the 3-element form, the file name is already "mangled" with
      .gcno/.gcda suffixes, while the 2-element form left that to the middle end
      pass.
      
      llvm-svn: 280306
      97e49ac5
  6. Aug 31, 2016
    • Reid Kleckner's avatar
      [codeview] Don't emit vshape info for classes without vfptrs · 59812429
      Reid Kleckner authored
      Classes with no virtual methods or whose virtual methods were all
      inherited from virtual bases don't have a vfptr at offset zero. We were
      crashing attempting to get the layout of that non-existent vftable.
      
      We don't need any vshape info in this case because the debugger can
      infer it from the base class information. The current class may not
      introduce any virtual methods if we are in this situation.
      
      llvm-svn: 280287
      59812429
    • Reid Kleckner's avatar
      [codeview] Pass through vftable shape information · dc124996
      Reid Kleckner authored
      The shape is really just the number of methods in the vftable, since we
      don't support 16 bit far calls. All calls are near. Encode this number
      in the size of the artificial __vtbl_ptr_type DIDerivedType that we
      generate. For DWARF, this will be a normal pointer, but for codeview
      this will be a wide pointer that gets pattern matched into a
      VFTableShape record. Insert this type into the element list of all
      dynamic classes when emitting CodeView, so that the backend can emit the
      shape even if the vptr lives in a primary base class.
      
      Fixes PR28150
      
      llvm-svn: 280255
      dc124996
    • Igor Kudrin's avatar
      [Coverage] Suppress creating a code region if the same area is covered by an expansion region. · fc05ee34
      Igor Kudrin authored
      In most cases these code regions are just redundant, but sometimes they
      could be assigned to the counter of the parent code region instead of
      the counter of the nested block.
      
      Differential Revision: https://reviews.llvm.org/D23987
      
      llvm-svn: 280199
      fc05ee34
  7. Aug 30, 2016
  8. Aug 29, 2016
    • Igor Kudrin's avatar
      [Coverage] Prevent creating a redundant counter if a nested body ends with a macro. · 8545dae2
      Igor Kudrin authored
      If there were several nested statements arranged in a way that all of them
      end up with the same macro, then the expansion of this macro was assigned
      with all the corresponding counters of these statements.
      As a result, the wrong counter value was shown for the macro in llvm-cov.
      
      This patch fixes the issue by preventing adding a counter for an expanded
      source range if it already has an assigned counter, which is expected
      to come from the most specific statement.
      
      Differential Revision: https://reviews.llvm.org/D23160
      
      llvm-svn: 279962
      8545dae2
  9. Aug 26, 2016
    • Reid Kleckner's avatar
      Widen type of __offset_flags in RTTI on Mingw64 · d8b0466e
      Reid Kleckner authored
      Otherwise we can't handle secondary base classes at offsets greater than
      2**24. This agrees with libstdc++abi.
      
      We could extend this change to other LLP64 platforms, but then we would
      want to update libc++abi and it would require additional review.
      
      Fixes PR29116
      
      llvm-svn: 279786
      d8b0466e
  10. Aug 25, 2016
  11. Aug 24, 2016
  12. Aug 23, 2016
  13. Aug 22, 2016
    • Matt Arsenault's avatar
      AMDGPU: Handle structs directly in AMDGPUABIInfo · 88d7da01
      Matt Arsenault authored
      Structs are currently handled as pointer + byval, which makes AMDGPU
      LLVM backend generate incorrect code when structs are used. This patch
      changes struct argument to be handled directly and without flattening,
      which Clover (Mesa 3D Gallium OpenCL state tracker) will be able to
      handle. Flattening would expand the struct to individual elements and
      pass each as a separate argument, which Clover can not
      handle. Furthermore, such expansion does not fit the OpenCL
      programming model which requires to explicitely specify each argument
      index, size and memory location.
      
      Patch by Vedran Miletić
      
      llvm-svn: 279463
      88d7da01
    • David Blaikie's avatar
  14. Aug 19, 2016
  15. Aug 18, 2016
  16. Aug 17, 2016
Loading