1. Sep 01, 2018
    • Heejin Ahn's avatar
      [WebAssembly] clang-format (NFC) · 4fa8dd95
      Heejin Ahn authored
      Summary: This patch runs clang-format on all wasm-only files.
      
      Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51448
      
      llvm-svn: 341254
      4fa8dd95
    • Jessica Paquette's avatar
      [NFC] Optionally pass a function to emitInstrCountChangedRemark · 71e97780
      Jessica Paquette authored
      In basic block, loop, and function passes, we already have a function that
      we can use to emit optimization remarks. We can use that instead of searching
      the module for the first suitable function (that is, one that contains at
      least one basic block.)
      
      llvm-svn: 341253
      71e97780
    • Jessica Paquette's avatar
      [NFC] Check if P is a pass manager on entry to emitInstrCountChangedRemark · 397c05dd
      Jessica Paquette authored
      There's no point in finding a function to use for remark output when we're
      not going to emit anything.
      
      llvm-svn: 341252
      397c05dd
    • Craig Topper's avatar
      [X86] Add k-mask conversion and load/store instrinsics to match gcc and icc. · 42a4d082
      Craig Topper authored
      This adds:
      _cvtmask8_u32, _cvtmask16_u32, _cvtmask32_u32, _cvtmask64_u64
      _cvtu32_mask8, _cvtu32_mask16, _cvtu32_mask32, _cvtu64_mask64
      _load_mask8, _load_mask16, _load_mask32, _load_mask64
      _store_mask8, _store_mask16, _store_mask32, _store_mask64
      
      These are currently missing from the Intel Intrinsics Guide webpage.
      
      llvm-svn: 341251
      42a4d082
    • Jessica Paquette's avatar
      [NFC] Pass the instruction delta to emitInstrCountChangedRemark · 9a23c559
      Jessica Paquette authored
      Instead of counting the size of the entire module every time we run a pass,
      pass along a delta instead and use that to emit the remark.
      
      This means we only have to use (on average) smaller IR units to calculate
      instruction counts. E.g, in a BB pass, we only need to look at the delta of
      the BB instead of the delta of the entire module.
      
      6/6
      
      (This improved compile time for size remarks on sqlite3 + O2 significantly)
      
      llvm-svn: 341250
      9a23c559
    • Jessica Paquette's avatar
      [NFC] Pre-calculate SCC IR counts in size remarks. · 1fc443b8
      Jessica Paquette authored
      Same vein as the previous commits. Pre-calculate the size of
      the module and use that to decide if we're going to emit a
      remark.
      
      This one comes with a FIXME and TODO. First off, CallGraphSCC
      and CallGraphNode don't have a getInstructionCount function. So,
      for now, we do the same thing as in a module pass.
      
      Second off, we're not really saving anything here yet, because
      as before, I need to change emitInstrCountChangedRemark to take
      in a delta. Keeping the patches small though, so that's coming up
      next.
      
      5/6
      
      llvm-svn: 341249
      1fc443b8
    • Jessica Paquette's avatar
      [NFC] Pre-calculate module IR counts in size remarks. · 454d1032
      Jessica Paquette authored
      Same as the previous NFC commits in the same vein.
      
      This one introduces a TODO. I'm going to change emitInstrCountChangedRemark
      so that it takes in a delta. Since the delta isn't necessary yet, it's not
      there. For now, this means that we're calculating the size of the module
      twice.
      
      Just done separately to keep the patches small.
      
      4/6
      
      llvm-svn: 341248
      454d1032
    • Jessica Paquette's avatar
      [NFC] Pre-calculate loop IR counts in size remarks. · 872a4c92
      Jessica Paquette authored
      Another commit reducing compile time in size remarks.
      
      Cache the size of the module and loop, and update values based
      off of deltas instead. Avoid recalculating the size of the
      whole module whenever possible.
      
      3/6
      
      llvm-svn: 341247
      872a4c92
    • Jessica Paquette's avatar
      [NFC] Pre-calculate basic block IR counts in size remarks. · 9eda13e9
      Jessica Paquette authored
      Size remarks are slow due to lots of recalculation of the module.
      
      This is similar to the previous commit. Cache the size of the module and
      update counts in basic block passes based off a less-expensive delta.
      
      2/6
      
      llvm-svn: 341246
      9eda13e9
    • Jessica Paquette's avatar
      [NFC] Pre-calculate function IR counts in size remarks. · f2a202ce
      Jessica Paquette authored
      Size remarks are slow due to lots of recalculation of the module.
      
      Pre-calculate the module size and initial function size for a remark. Use
      deltas calculated using the less-expensive function IR count to update the
      module counts for Function passes.
      
      1/6
      
      llvm-svn: 341245
      f2a202ce
    • Tom Stellard's avatar
      lit: Use sys.executable for executing builtin commands · 04cbe721
      Tom Stellard authored
      Summary:
      The python executable may not exist on all systems so use sys.executable
      instead.
      
      Reviewers: ddunbar, stella.stamenova
      
      Subscribers: delcypher, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D51511
      
      llvm-svn: 341244
      04cbe721
    • Dean Michael Berris's avatar
      [XRay] Update RecordInitializer for PIDRecord · f135ac4b
      Dean Michael Berris authored
      Since we changed the storage for the PID in PIDRecord instances, we need
      to also update the way we load the data from a DataExtractor through the
      RecordInitializer.
      
      llvm-svn: 341243
      f135ac4b
    • Haojian Wu's avatar
      [clangd] Implement findOccurrences interface in dynamic index. · e8064b6f
      Haojian Wu authored
      Summary:
      Implement the interface in
        - FileIndex
        - MemIndex
        - MergeIndex
      
      Depends on https://reviews.llvm.org/D50385.
      
      Reviewers: sammccall, ilya-biryukov
      
      Reviewed By: sammccall
      
      Subscribers: mgrang, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51279
      
      llvm-svn: 341242
      e8064b6f
    • Dean Michael Berris's avatar
      [XRay] Use correct type for PID records · 4cae0487
      Dean Michael Berris authored
      Previously we've been reading and writing the wrong types which only
      worked in little endian implementations. This time we're writing the
      same typed values the runtime is using, and reading them appropriately
      as well.
      
      llvm-svn: 341241
      4cae0487
    • Tim Northover's avatar
      Tests: fix tests encoding specific hash values for 32-bit systems. · cc8f593d
      Tim Northover authored
      I changed the seed slightly, but forgot to run the tests on a 32-bit system, so
      tests which hard-code a specific hash value started breaking.
      
      llvm-svn: 341240
      cc8f593d
    • Dean Michael Berris's avatar
      [XRay] Use correct type for thread ID parsing · 250c56d1
      Dean Michael Berris authored
      Previously we were reading only a uint16_t when we really needed to read
      an int32_t from the log.
      
      llvm-svn: 341239
      250c56d1
    • Sid Manning's avatar
      [Hexagon] Add support for getRegisterByName. · b1c98130
      Sid Manning authored
      Support required to build the Hexagon Linux kernel.
      
      Differential Revision: https://reviews.llvm.org/D51363
      
      llvm-svn: 341238
      b1c98130
    • Dean Michael Berris's avatar
      [XRay] Improve test matching granularity (NFC) · 7975e274
      Dean Michael Berris authored
      Simplify matchers for unittest to better isolate which differences there
      are that we're finding in failures.
      
      llvm-svn: 341237
      7975e274
    • Dean Michael Berris's avatar
      [XRay] Change function record reader to be endian-aware · 3fc4cbfe
      Dean Michael Berris authored
      This change allows us to let the compiler do the right thing for when
      handling big-endian and little-endian records for FDR mode function
      records.
      
      Previously, we assumed that the encoding was little-endian that reading
      the first byte to look for the function id and function record types was
      ordered in a little-endian manner. This change allows us to better
      handle function records where the first four bytes may actually be
      encoded in big-endian thus giving us the wrong bytes where we're seeking
      the function information from.
      
      This is a follow-up to D51210 and D51289.
      
      llvm-svn: 341236
      3fc4cbfe
    • Pavel Labath's avatar
      Avoid using short identifiers in some tests · 332447f4
      Pavel Labath authored
      This applies the same workaround  as r321271 to other tests. The root
      problem is that lldb finds an internal symbol with the same name in the
      debug info of system libraries, and then fails to disambiguate between
      the two.
      
      llvm-svn: 341235
      332447f4
    • Craig Topper's avatar
      [X86] Add kshift intrinsics to match gcc and icc. · 2aa8efc8
      Craig Topper authored
      This adds the following intrinsics:
      _kshiftli_mask8
      _kshiftli_mask16
      _kshiftli_mask32
      _kshiftli_mask64
      _kshiftri_mask8
      _kshiftri_mask16
      _kshiftri_mask32
      _kshiftri_mask64
      
      llvm-svn: 341234
      2aa8efc8
    • Frederic Riss's avatar
      Fix a comment to use the correct variable name. · 7f03f3d7
      Frederic Riss authored
      llvm-svn: 341233
      7f03f3d7
    • Charles Davis's avatar
      Export public functions implemented in assembly on Windows. · 805173c8
      Charles Davis authored
      Summary:
      By default, symbols aren't visible outside of the module that defines
      them. To make them visible, they must be exported. The easiest way to do
      that is to embed an `-export:symname` directive into the object file.
      
      Reviewers: mstorsjo, rnk
      
      Subscribers: christof, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51508
      
      llvm-svn: 341232
      805173c8
    • Sterling Augustine's avatar
      Refactor Addlibgcc to make the when and what logic more straightfoward. · 1c04e1f5
      Sterling Augustine authored
      Add Android tests.
      
      llvm-svn: 341231
      1c04e1f5
    • Dean Michael Berris's avatar
      [XRay] Fix FunctionRecord serialization · c1dceee5
      Dean Michael Berris authored
      This change makes the writer implementation more consistent with the way
      fields are written down to avoid assumptions on bitfield order and
      padding. We also fix an inconsistency between the type returned by the
      `delta()` accessor to match the data member it's returning.
      
      This is a follow-up to D51289 and D51210.
      
      llvm-svn: 341230
      c1dceee5
    • Evgeniy Stepanov's avatar
      [hwasan] Fix new[] with zero size. · 5abf7d90
      Evgeniy Stepanov authored
      Fixes "allocator is out of memory trying to allocate 0x0 bytes" by
      always allocating at least one byte.
      
      llvm-svn: 341229
      5abf7d90
    • Alexandre Ganea's avatar
      [DebugInfo] Common behavior for error types · 6a7efef4
      Alexandre Ganea authored
      Following D50807, and heading towards D50664, this intermediary change does the following:
      
      1. Upgrade all custom Error types in llvm/trunk/lib/DebugInfo/ to use the new StringError behavior (D50807).
      2. Implement std::is_error_code_enum and make_error_code() for DebugInfo error enumerations.
      3. Rename GenericError -> PDBError (the file will be renamed in a subsequent commit)
      4. Update custom error messages to follow the same formatting: (\w\s*)+\.
      5. Keep generic "file not found" (ENOENT) errors as they are in PDB code. Previously, there used to be a custom enumeration for that purpose.
      6. Remove a few extraneous LF in log() implementations. Printing LF is a responsability at a higher level, not at the error level.
      
      Differential Revision: https://reviews.llvm.org/D51499
      
      llvm-svn: 341228
      6a7efef4
    • Craig Topper's avatar
      [X86] Add support for turning vXi1 shuffles into KSHIFTL/KSHIFTR. · b7bb9f00
      Craig Topper authored
      This patch recognizes shuffles that shift elements and fill with zeros. I've copied and modified the shift matching code we use for normal vector registers to do this. I'm not sure if there's a good way to share more of this code without making the existing function more complex than it already is.
      
      This will be used to enable kshift intrinsics in clang.
      
      Differential Revision: https://reviews.llvm.org/D51401
      
      llvm-svn: 341227
      b7bb9f00
    • Dean Michael Berris's avatar
      [XRay] Make Trace loading endian-aware · 5b7548c6
      Dean Michael Berris authored
      This change makes the XRay Trace loading functions first use a
      little-endian data extractor, then on failures try a big-endian data
      extractor. Without this change, the trace loading facility will not work
      with data written from a big-endian machine.
      
      Follow-up to D51210 and D51289.
      
      llvm-svn: 341226
      5b7548c6
    • Dean Michael Berris's avatar
      [XRay] Make the FDRTraceWriter Endian-aware · 98717978
      Dean Michael Berris authored
      Before this patch, the FDRTraceWriter would not take endianness into
      account when writing data into the output stream.
      
      This is a follow-up to D51289 and D51210.
      
      llvm-svn: 341223
      98717978
    • Andrea Di Biagio's avatar
      [X86][BtVer2] Remove wrong ReadAdvance from AVX vbroadcast(ss|sd|f128) instructions. · a59ec4ef
      Andrea Di Biagio authored
      The presence of a ReadAdvance for input operand #0 is problematic
      because it changes the input latency of the register used as the base address
      for the folded load.
      
      A broadcast cannot start executing if the load address hasn't been computed yet.
      
      In the llvm-mca example, the VBROADCASTSS is dependent on the address generated
      by the LEAQ.  That means, it cannot start until LEAQ reaches the write-back
      stage. If we apply ReadAdvance, then we wrongly assume that the load can start 3
      cycles in advance.
      
      Differential Revision: https://reviews.llvm.org/D51534
      
      llvm-svn: 341222
      a59ec4ef
  2. Aug 31, 2018