Skip to content
  1. Nov 08, 2018
    • Clement Courbet's avatar
    • Hans Wennborg's avatar
      clang-cl: Add "/clang:" pass-through arg support. · 797004d2
      Hans Wennborg authored
      The clang-cl driver disables access to command line options outside of the
      "Core" and "CLOption" sets of command line arguments. This filtering makes it
      impossible to pass arguments that are interpreted by the clang driver and not
      by either 'cc1' (the frontend) or one of the other tools invoked by the driver.
      
      An example driver-level flag is the '-fno-slp-vectorize' flag, which is
      processed by the driver in Clang::ConstructJob and used to set the cc1 flag
      "-vectorize-slp". There is no negative cc1 flag or -mllvm flag, so it is not
      currently possible to disable the SLP vectorizer from the clang-cl driver.
      
      This change introduces the "/clang:" argument that is available when the
      driver mode is set to CL compatibility. This option works similarly to the
      "-Xclang" option, except that the option values are processed by the clang
      driver rather than by 'cc1'. An example usage is:
      
        clang-cl /clang:-fno-slp-vectorize /O2 test.c
      
      Another example shows how "/clang:" can be used to pass a flag where there is
      a conflict between a clang-cl compat option and an overlapping clang driver
      option:
      
        clang-cl /MD /clang:-MD /clang:-MF /clang:test_dep_file.dep test.c
      
      In the previous example, the unprefixed /MD selects the DLL version of the msvc
      CRT, while the prefixed -MD flag and the -MF flags are used to create a make
      dependency file for included headers.
      
      One note about flag ordering: the /clang: flags are concatenated to the end of
      the argument list, so in cases where the last flag wins, the /clang: flags
      will be chosen regardless of their order relative to other flags on the driver
      command line.
      
      Patch by Neeraj K. Singh!
      
      Differential revision: https://reviews.llvm.org/D53457
      
      llvm-svn: 346393
      797004d2
    • Andrew Savonichev's avatar
      [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension · 3fee3518
      Andrew Savonichev authored
      Summary:
      Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt
      
      Patch by Kristina Bessonova
      
      
      Reviewers: Anastasia, yaxunl, shafik
      
      Reviewed By: Anastasia
      
      Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D51484
      
      llvm-svn: 346392
      3fee3518
    • Anton Korobeynikov's avatar
      [MSP430] Fix encodeInstruction() for big endian hosts · 5eb3d339
      Anton Korobeynikov authored
      Reviewers: asl
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54251
      
      llvm-svn: 346391
      5eb3d339
    • Gil Rapaport's avatar
      [LSR] Combine unfolded offset into invariant register · 7b88bab3
      Gil Rapaport authored
      LSR reassociates constants as unfolded offsets when the constants fit as
      immediate add operands, which currently prevents such constants from being
      combined later with loop invariant registers.
      This patch modifies GenerateCombinations() to generate a second formula which
      includes the unfolded offset in the combined loop-invariant register.
      
      This commit fixes a bug in the original patch (committed at r345114, reverted
      at r345123).
      
      Differential Revision: https://reviews.llvm.org/D51861
      
      llvm-svn: 346390
      7b88bab3
    • Max Kazantsev's avatar
      [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond · 65cb9d79
      Max Kazantsev authored
      We have a lot of various bugs that are caused by misuse of SCEV (in particular in LV),
      all of them can simply be described as "we ask SCEV to prove some fact on invalid IR".
      Some of examples of those are PR36311, PR37221, PR39160.
      
      The problem is that these failues manifest differently (what we saw was failure of various
      asserts across SCEV, but there can also be miscompiles). This patch adds an assert into two
      SCEV methods that strongly rely on correctness of the IR and are involved in known failues.
      This will at least allow us to have a clear indication of what was wrong in this case.
      
      This patch also fixes a unit test with incorrect IR that fails this verification.
      
      Differential Revision: https://reviews.llvm.org/D52930
      Reviewed By: fhahn
      
      llvm-svn: 346389
      65cb9d79
    • whitequark's avatar
      [bindings/go] Add Go bindings to LLVMGetIndices · ac067b93
      whitequark authored
      Summary: This instruction is useful for inspecting extractvalue/insertvalue in IR. Unlike most other operations, indices cannot be inspected using the generic Value.Opcode() function so a specialized function needs to be added.
      
      Reviewers: whitequark, pcc
      
      Reviewed By: whitequark
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53883
      
      llvm-svn: 346388
      ac067b93
    • whitequark's avatar
      [OCaml] Fix incorrect use of CAMLlocal in nested blocks · c07f8c14
      whitequark authored
      Summary:
      The OCaml manual states:
      
      > Local variables of type value must be declared with one of the
      > CAMLlocal macros. [...] These macros must be used at the beginning
      > of the function, not in a nested block.
      
      This patch moves several instances of CAMLlocal macros from nested
      blocks to the function beginning.
      
      Reviewers: whitequark
      
      Reviewed By: whitequark
      
      Subscribers: CodaFi, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53841
      
      llvm-svn: 346387
      c07f8c14
    • whitequark's avatar
      [MergeFuncs] Improve ordering of equal functions · 73cb9784
      whitequark authored
      Summary:
      MergeFunctions currently tries to process strong functions before
      weak functions, because weak functions can simply call strong
      functions, while a strong/weak function cannot call a weak function
      (a backing strong function is needed).
      
      This patch additionally tries to process external functions before
      local functions, because we definitely have to keep the external
      function, but may be able to drop the local one (and definitely
      can if it is also unnamed_addr).
      
      Unfortunately, this exposes an existing bug in the implementation:
      The FnTree and FNodesInTree structures can currently go out of
      sync in the case where two weak functions are merged, because the
      function in FnTree/FNodesInTree is RAUWed. This leaves it behind in
      FnTree (this is intended, as it is the strong backing function which
      should be used for further merges), while it is replaced in
      FNodesInTree (this is not intended).
      
      This is fixed by switching FNodesInTree from using a ValueMap to
      using a DenseMap of AssertingVH.
      
      This exposes another minor issue: Currently FNodesInTree is not
      cleared after MergeFunctions finishes running. Currently, this is
      potentially dangerous (e.g. if something else wants to RAUW a function
      with a non-function), but at the very least it is unnecessary/inefficient.
      After the change to use AssertingVH it becomes more problematic,
      because there are certainly passes that remove functions.
      
      This issue is fixed by clearing FNodesInTree at the end of the pass.
      
      Reviewers: jfb, whitequark
      
      Reviewed By: whitequark
      
      Subscribers: rkruppe, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53271
      
      llvm-svn: 346386
      73cb9784
    • whitequark's avatar
      [MergeFuncs] Call removeUsers() prior to unnamed_addr RAUW · 3580ac61
      whitequark authored
      Summary:
      For unnamed_addr functions we RAUW instead of only replacing direct callers. However, functions in which replacements were performed currently are not added back to the worklist, resulting in missed merging opportunities.
      
      Fix this by calling removeUsers() prior to RAUW.
      
      Reviewers: jfb, whitequark
      
      Reviewed By: whitequark
      
      Subscribers: rkruppe, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53262
      
      llvm-svn: 346385
      3580ac61
    • Thomas Lively's avatar
      [WebAssembly] Add V128 to WebAssemblyInstrInfo::copyPhysReg · 89717190
      Thomas Lively authored
      Reviewers: aheejin, dschuff
      
      Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53872
      
      llvm-svn: 346384
      89717190
    • Nathan Lanza's avatar
      Revert "Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE" · 86923b02
      Nathan Lanza authored
      This reverts commit rL346367 due to test error in compiler-rt.
      
      llvm-svn: 346383
      86923b02
    • Reid Kleckner's avatar
      [sancov] Put .SCOV* sections into the right comdat groups on COFF · b41b3721
      Reid Kleckner authored
      Avoids linker errors about relocations against discarded sections.
      
      This was uncovered during the Chromium clang roll here:
      https://chromium-review.googlesource.com/c/chromium/src/+/1321863#message-717516acfcf829176f6a2f50980f7a4bdd66469a
      
      After this change, Chromium's libGLESv2 links successfully for me.
      
      Reviewers: metzman, hans, morehouse
      
      Differential Revision: https://reviews.llvm.org/D54232
      
      llvm-svn: 346381
      b41b3721
    • David Blaikie's avatar
      NFC: DebugInfo: Track the origin CU rather than just the base address for range lists · c8f7e6c1
      David Blaikie authored
      Turns out knowing more than just the base address might be useful -
      specifically a future change to respect a DICompileUnit flag for the use
      of base address specifiers in DWARF < 5.
      
      llvm-svn: 346380
      c8f7e6c1
    • Jessica Paquette's avatar
      [MachineOutliner][NFC] Only map blocks which have adjacent legal instructions · c4cf775a
      Jessica Paquette authored
      If a block doesn't have any ranges of adjacent legal instructions, then it
      can't have outlining candidates. There's no point in mapping legal isntructions
      in situations like this.
      
      I noticed this reduces the size of the suffix tree in sqlite3 for AArch64 at
      -Oz by about 3%.
      
      llvm-svn: 346379
      c4cf775a
    • Shoaib Meenai's avatar
      [clang] Set CMP0075 to new · bb997f07
      Shoaib Meenai authored
      Make the check_include_file* macros honor CMAKE_REQUIRED_LIBRARIES. This
      shouldn't cause any of the configuration checks to give different
      results, and I verified that a clean configure before and after this
      change resulted in identical CMake caches on my machine. The same change
      was done for LLVM in r346377.
      
      llvm-svn: 346378
      bb997f07
    • Shoaib Meenai's avatar
      [cmake] Set CMP0075 to NEW · 7681abde
      Shoaib Meenai authored
      Make the check_include_file* macros honor CMAKE_REQUIRED_LIBRARIES. This
      shouldn't cause any of the configuration checks to give different
      results (and I did clean configures before and after this change and
      confirmed that the resulting CMake caches were identical, though of
      course that's just one machine). This suppresses a warning when building
      with CMake 3.12 or later.
      
      This doesn't suppress the warning in clang, because clang does its own
      cmake_minimum_required call even when being built in-tree, and that
      resets all policy settings. I'll address that separately.
      
      Differential Revision: https://reviews.llvm.org/D54236
      
      llvm-svn: 346377
      7681abde
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Extend promote alloca vectorization · 6cc8b2fc
      Stanislav Mekhanoshin authored
      Promote alloca can vectorize a small array by bitcasting it to a
      vector type. Extend vectorization for the case when alloca is
      already a vector type. We still want to replace GEPs with an
      insert/extract element instructions in this case.
      
      Differential Revision: https://reviews.llvm.org/D54219
      
      llvm-svn: 346376
      6cc8b2fc
    • Jonas Devlieghere's avatar
      [FileSystem] Add convenience method to check for directories. · 3a58d898
      Jonas Devlieghere authored
      Replace calls to LLVM's is_directory with calls to LLDB's FileSytem
      class. For this I introduced a new convenience method that, like the
      other methods, takes either a path or filespec. This still uses the LLVM
      functions under the hood.
      
      Differential revision: https://reviews.llvm.org/D54135
      
      llvm-svn: 346375
      3a58d898
    • Anton Korobeynikov's avatar
      [MSP430] Add MC layer · 09dff538
      Anton Korobeynikov authored
      Summary:
      This change implements assembler parser, code emitter, ELF object writer
      and disassembler for the MSP430 ISA.  Also, more instruction forms are added
      to the target description.
      
      Reviewers: asl
      
      Reviewed By: asl
      
      Subscribers: pftbest, krisb, mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D53661
      
      llvm-svn: 346374
      09dff538
    • Jessica Paquette's avatar
      [MachineOutliner][NFC] Don't map MBBs that don't contain legal instructions · 267d266c
      Jessica Paquette authored
      I noticed that there are lots of basic blocks that don't have enough legal
      instructions in them to warrant outlining. We can skip mapping these entirely.
      
      In sqlite3, compiled for AArch64 at -Oz, this results in a 10% reduction of
      the total nodes in the suffix tree. These nodes can never be part of a
      repeated substring, and so they don't impact the result at all.
      
      Before this, there were 62128 nodes in the tree for sqlite3. After this, there
      are 56457 nodes.
      
      llvm-svn: 346373
      267d266c
    • Jonas Devlieghere's avatar
      Extend virtual file system with `isLocal` method · cbb5c868
      Jonas Devlieghere authored
      Expose the `llvm::sys::fs::is_local` function through the VFS.
      
      Differential revision: https://reviews.llvm.org/D54127
      
      llvm-svn: 346372
      cbb5c868
    • Jordan Rupprecht's avatar
      [llvm-readobj] Implement LLVM style printer for --notes · 4f36c7ad
      Jordan Rupprecht authored
      Summary:
      Port the GNU style printNotes method to the LLVMStyle subclass.
      
      This is basically just a heavy refactor so that the note parsing/formatting logic from the GNUStyle::printNotes can be shared with LLVMStyle::printNotes.
      
      Reviewers: MaskRay
      
      Reviewed By: MaskRay
      
      Subscribers: dschuff, fedor.sergeev, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D54220
      
      llvm-svn: 346371
      4f36c7ad
    • Rong Xu's avatar
      [PGO] Exit early if all count values are zero · fb4bcc45
      Rong Xu authored
      If all the edge counts for a function are zero, skip count population and
      annotation, as nothing will happen. This can save some compile time.
      
      Differential Revision: https://reviews.llvm.org/D54212
      
      llvm-svn: 346370
      fb4bcc45
    • Fangrui Song's avatar
      Fix -Wimplicit-fallthrough warning · 892bbd3f
      Fangrui Song authored
      Reviewers: EricWF, ldionne, mclow.lists
      
      Reviewed By: ldionne
      
      Subscribers: christof, libcxx-commits
      
      Differential Revision: https://reviews.llvm.org/D54234
      
      llvm-svn: 346369
      892bbd3f
    • Daniel Sanders's avatar
      162da63e
    • Nathan Lanza's avatar
      Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE · 9a9372fd
      Nathan Lanza authored
      Summary:
      Code in config-ix tries to call `PYTHON_EXECUTABLE` to search for some
      python modules but that variable isn't set until the moved chunk of
      code that finds Python is called.
      
      Reorder it so CMake can use PYTHON_EXECUTABLE
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D52763
      
      llvm-svn: 346367
      9a9372fd
  2. Nov 07, 2018
Loading