1. May 11, 2018
    • George Burgess IV's avatar
      Add regression test for r331976 · 175400a8
      George Burgess IV authored
      In general, it's difficult to poke the ConstantExpr code in CFLAA, since
      LLVM is so great at eagerly reducing ConstantExprs. :)
      
      Sadly, this only shows a functional difference from before the patch
      because CFLAA has some special logic around taking loads of non-pointers
      into account. Namely, with the broken select behavior, CFLAA will
      completely fail to take note of @g3. Since CFLAA doesn't have any record
      about @g3 when we do an alias query for @g3 and %a, it conservatively
      answers MayAlias. When we properly take @g3 into account with the new
      select logic, we get NoAlias for this query.
      
      I suspect that the aforementioned "special logic" isn't completely
      correct, but this test-case should prevent future wonky aliasing results
      from appearing for these flavors of ConstantExprs, so I think it's still
      worth having.
      
      llvm-svn: 332017
      175400a8
    • Alexey Bataev's avatar
      [OPENMP, NVPTX] Initial support for L2 parallelism in SPMD mode. · bf5c8486
      Alexey Bataev authored
      Added initial support for L2 parallelism in SPMD mode. Note, though,
      that the orphaned parallel directives are not currently supported in
      SPMD mode.
      
      llvm-svn: 332016
      bf5c8486
    • Haicheng Wu's avatar
      [CGP] Split large data structres to sink more GEPs · 0aae2bc2
      Haicheng Wu authored
      Accessing the members of a large data structures needs a lot of GEPs which
      usually have large offsets due to the size of the underlying data structure. If
      the offsets are too large to fit into the r+i addressing mode, these GEPs cannot
      be sunk to their users' blocks and many extra registers are needed then to carry
      the values of these GEPs.
      
      This patch tries to split a large data struct starting from %base like the
      following.
      
      Before:
      BB0:
        %base     =
      
      BB1:
        %gep0     = gep %base, off0
        %gep1     = gep %base, off1
        %gep2     = gep %base, off2
      
      BB2:
        %load1    = load %gep0
        %load2    = load %gep1
        %load3    = load %gep2
      
      After:
      BB0:
        %base     =
        %new_base = gep %base, off0
      
      BB1:
        %new_gep0 = %new_base
        %new_gep1 = gep %new_base, off1 - off0
        %new_gep2 = gep %new_base, off2 - off0
      
      BB2:
        %load1    = load i32, i32* %new_gep0
        %load2    = load i32, i32* %new_gep1
        %load3    = load i32, i32* %new_gep2
      
      In the above example, the struct is split into two parts. The first part still
      starts from %base and the second part starts from %new_base. After the
      splitting, %new_gep1 and %new_gep2 have smaller offsets and then can be sunk to
      BB2 and folded into their users.
      
      The algorithm to split data structure is simple and very similar to the work of
      merging SExts. First, it collects GEPs that have large offsets when iterating
      the blocks. Second, it splits the underlying data structures and updates the
      collected GEPs to use smaller offsets.
      
      Differential Revision: https://reviews.llvm.org/D42759
      
      llvm-svn: 332015
      0aae2bc2
    • Robert Widmann's avatar
      [LLVM-C] Add Accessors for Common DIType and DILocation Properties · 260b5814
      Robert Widmann authored
      Summary:
      - Adds getters for the line, column, and scope of a DILocation
      - Adds getters for the name, size in bits, offset in bits, alignment in bits, line, and flags of a DIType
      
      Reviewers: whitequark, harlanhaskins, deadalnix
      
      Reviewed By: whitequark
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46627
      
      llvm-svn: 332014
      260b5814
    • Sam Clegg's avatar
      [WebAssembly] Add a flag to control merging data segments · 66844767
      Sam Clegg authored
      Merging data segments produces smaller code sizes because each segment
      has some boilerplate. Therefore, merging data segments is generally the
      right approach, especially with wasm where binaries are typically
      delivered over the network.
      
      However, when analyzing wasm binaries, it can be helpful to get a
      conservative picture of which functions are using which data
      segments[0]. Perhaps there is a large data segment that you didn't
      expect to be included in the wasm, introduced by some library you're
      using, and you'd like to know which library it was. In this scenario,
      merging data segments only makes the analysis worse.
      
      Alternatively, perhaps you will remove some dead functions by-hand[1]
      that can't be statically proven dead by the compiler or lld, and
      removing these functions might make some data garbage collect-able, and
      you'd like to run `--gc-sections` again so that this now-unused data can
      be collected. If the segments were originally merged, then a single use
      of the merged data segment will entrench all of the data.
      
      [0] https://github.com/rustwasm/twiggy
      [1] https://github.com/fitzgen/wasm-snip
      
      Patch by Nick Fitzgerald!
      
      Differential Revision: https://reviews.llvm.org/D46417
      
      llvm-svn: 332013
      66844767
    • Nico Weber's avatar
      lld-link: Add --color-diagnostics(={always,never,auto})?, --no-color-diagnostics flags. · cac2b334
      Nico Weber authored
      This is most useful when using lld-link on a non-Win host (but it might become
      useful on Windows too if lld also grows a fansi-escape-codes flag).
      
      Also make the help for --color-diagnostic mention the valid values in ELF and
      wasm, and print the flag name with two dashes in diags, since the one-dash form
      is seen as a list of many one-letter flags in some contexts.
      
      https://reviews.llvm.org/D46693
      
      llvm-svn: 332012
      cac2b334
    • Sam Clegg's avatar
      [WebAssembly] Simplify writing of exports section. NFC. · d6beb320
      Sam Clegg authored
      Differential Revision: https://reviews.llvm.org/D43963
      
      llvm-svn: 332011
      d6beb320
    • Robert Widmann's avatar
      [LLVM-C] Move DIBuilder Bindings For Temporary MDNodes · a428eba8
      Robert Widmann authored
      Summary: Move LLVMTemporaryMDNode and LLVMMetadataReplaceAllUsesWith to the C bindings and add LLVMDeleteTemporaryMDNode for deleting non-RAUW'ed temporary nodes.
      
      Reviewers: whitequark, harlanhaskins, deadalnix
      
      Reviewed By: whitequark
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46632
      
      llvm-svn: 332010
      a428eba8
    • Sam Clegg's avatar
      [WebAssembly] Remove final -wasm component of target triple. NFC. · 262e0901
      Sam Clegg authored
      This has been the default for a while now.
      
      llvm-svn: 332009
      262e0901
    • Sam Clegg's avatar
      [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. · a5908009
      Sam Clegg authored
      Summary: The final -wasm component has been the default for some time now.
      
      Subscribers: jfb, dschuff, jgravelle-google, eraman, aheejin, JDevlieghere, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46342
      
      llvm-svn: 332007
      a5908009
    • Simon Pilgrim's avatar
      [X86][Znver1] Remove unnecessary SchedWritePMULLD InstRW overrides. · b7f274ef
      Simon Pilgrim authored
      llvm-svn: 332006
      b7f274ef
    • Sam Clegg's avatar
      [WebAssembly] Create section start symbols automatically for all sections · b210c64b
      Sam Clegg authored
      These symbols only get included in the output symbols table if
      they are used in a relocation.
      
      This behaviour matches more closely the ELF object writer.
      
      Differential Revision: https://reviews.llvm.org/D46561
      
      llvm-svn: 332005
      b210c64b
    • Chandler Carruth's avatar
      [PM/LoopUnswitch] Avoid pointlessly creating an exit block set. · baf045fb
      Chandler Carruth authored
      This code can just test whether blocks are *in* the loop, which we
      already have a dedicated set tracking in the loop itself.
      
      llvm-svn: 332004
      baf045fb
    • Kamil Rytarowski's avatar
      wrong usages of sem_open in the libFuzzer · aee7b0f2
      Kamil Rytarowski authored
      Summary:
      Fixed two non-standard usages of sem_open in the libFuzzer library and
      one NetBSD-related modification with test script.
      
      
        - The return value to indicate error should be SEM_FAILED instead of
          (void *)-1 (please refer to "RETURN VALUE" section in this [[
          http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html
          | page ]]). Actually, SEM_FAILED != (void *)-1 holds in NetBSD.
      
        - The SharedMemoryRegion::SemName function should return name
          starting with slash. Because the behaviour of name which does not
          start with slash is unspecified as the [[
          http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html
          | "DESCRIPTION" section ]] specified:
      
      > If name does not begin with the <slash> character, the effect is implementation-defined.
      
        - The length of name is limited to 14 in NetBSD, it is suggested to
          reduce the length of equivalence server name in the test script.
      
      Patch by: Yang Zheng
      
      Reviewers: vitalybuka, krytarowski, kcc
      
      Reviewed By: kcc
      
      Subscribers: kcc, #sanitizers, llvm-commits, joerg
      
      Differential Revision: https://reviews.llvm.org/D46622
      
      llvm-svn: 332003
      aee7b0f2
    • Simon Pilgrim's avatar
      [X86][SNB] Fix typo in PEXTRDmr instregex, was missing VPEXTRDmr. · 37fbb7f1
      Simon Pilgrim authored
      llvm-svn: 332002
      37fbb7f1
    • Marshall Clow's avatar
      More notes on Rapperswil issues · d23dc0f0
      Marshall Clow authored
      llvm-svn: 332000
      d23dc0f0
    • Simon Pilgrim's avatar
      [X86] Split... · 38ac0e9c
      Simon Pilgrim authored
      [X86] Split WriteVecALU/WriteVecLogic/WriteShuffle/WriteVarShuffle/WritePSADBW/WritePHAdd scheduler classes
      
      Split off XMM classes from the default (MMX) classes.
      
      llvm-svn: 331999
      38ac0e9c
    • Sanjay Patel's avatar
      [InstCombine] regenerate full checks; NFC · dc4bb3fd
      Sanjay Patel authored
      llvm-svn: 331998
      dc4bb3fd
    • Simon Atanasyan's avatar
      [mips] Accept 32-bit offsets for ld/sd/lld commands · 05db279f
      Simon Atanasyan authored
      This is a follow up to the rL330983. The patch teaches ld, sd, and lld
      commands accept 32-bit memory offsets by replacing `mem_simm16` operand
      to `mem_simmptr`. In fact, these commands should accept 64-bit offsets,
      but so large offsets require another command expanding and will be
      supported by a separate patch.
      
      Differential Revision: https://reviews.llvm.org/D46629
      
      llvm-svn: 331997
      05db279f
    • Simon Atanasyan's avatar
      [mips] Accept 32-bit offsets for lh and lhu commands · ac5f4e05
      Simon Atanasyan authored
      This is a follow up to the rL330983. The patch teaches lh and lhu
      commands accepts 32-bit memory offsets by replacing `mem_simm16` operand
      to `mem_simmptr`.
      
      Differential Revision: https://reviews.llvm.org/D46513
      
      llvm-svn: 331996
      ac5f4e05
  2. May 10, 2018