Skip to content
  1. Jan 19, 2019
    • Chandler Carruth's avatar
      Update the file headers across all of the LLVM projects in the monorepo · 2946cd70
      Chandler Carruth authored
      to reflect the new license.
      
      We understand that people may be surprised that we're moving the header
      entirely to discuss the new license. We checked this carefully with the
      Foundation's lawyer and we believe this is the correct approach.
      
      Essentially, all code in the project is now made available by the LLVM
      project under our new license, so you will see that the license headers
      include that license only. Some of our contributors have contributed
      code under our old license, and accordingly, we have retained a copy of
      our old license notice in the top-level files in each project and
      repository.
      
      llvm-svn: 351636
      2946cd70
    • Rui Ueyama's avatar
      Remove F_modify flag from FileOutputBuffer. · 8e7600dc
      Rui Ueyama authored
      This code is dead. There is no use of the feature in the entire LLVM codebase.
      
      Differential Revision: https://reviews.llvm.org/D56939
      
      llvm-svn: 351613
      8e7600dc
  2. Jan 18, 2019
    • James Henderson's avatar
      Add __[_[_]]Z demangling to new common demangle function · f5356944
      James Henderson authored
      This is a follow-up to r351448. It adds support for other _*Z extensions
      of the Itanium demanling, to the newly available demangle function
      heuristic.
      
      Reviewed by: erik.pilkington, rupprecht, grimar
      
      Differential Revision: https://reviews.llvm.org/D56855
      
      llvm-svn: 351551
      f5356944
    • Pavel Labath's avatar
      [ADT] Add streaming operators for llvm::Optional · 47e9a21d
      Pavel Labath authored
      Summary:
      The operators simply print the underlying value or "None".
      
      The trickier part of this patch is making sure the streaming operators
      work even in unit tests (which was my primary motivation, though I can
      also see them being useful elsewhere). Since the stream operator was a
      template, implicit conversions did not kick in, and our gtest glue code
      was explicitly introducing an implicit conversion to make sure other
      implicit conversions do not kick in :P. I resolve that by specializing
      llvm_gtest::StreamSwitch for llvm:Optional<T>.
      
      Reviewers: sammccall, dblaikie
      
      Reviewed By: sammccall
      
      Subscribers: mgorny, dexonsmith, kristina, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56795
      
      llvm-svn: 351548
      47e9a21d
  3. Jan 17, 2019
    • James Henderson's avatar
      Move demangling function from llvm-objdump to Demangle library · ce5b5b48
      James Henderson authored
      This allows it to be used in an upcoming llvm-readobj change.
      
      A small change in internal behaviour of the function is to always call
      the microsoftDemangle function if the string does not have an itanium
      encoding prefix, rather than only if it starts with '?'. This is
      harmless because the microsoftDemangle function does the same check
      already.
      
      Reviewed by: grimar, erik.pilkington
      
      Differential Revision: https://reviews.llvm.org/D56721
      
      llvm-svn: 351448
      ce5b5b48
  4. Jan 16, 2019
  5. Jan 15, 2019
  6. Jan 14, 2019
    • Amara Emerson's avatar
      Revert "[VFS] Allow multiple RealFileSystem instances with independent CWDs." · e07cdb10
      Amara Emerson authored
      This reverts commit r351079, r351069 and r351050 as it broken the greendragon bots on macOS.
      
      llvm-svn: 351091
      e07cdb10
    • Tom Stellard's avatar
      cmake: Don't install plugins used for examples or tests · d0a76760
      Tom Stellard authored
      Summary:
      This patch drops install targets for LLVMHello.so,
      TestPlugin.so, and BugpointPasses.so.
      
      Reviewers: chandlerc, beanz, thakis, philip.pfaffe
      
      Reviewed By: chandlerc
      
      Subscribers: SquallATF, mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D55965
      
      llvm-svn: 351087
      d0a76760
    • Sam McCall's avatar
      [VFS] Disable unix-assuming VFS test on windows · 62ab1a1a
      Sam McCall authored
      llvm-svn: 351079
      62ab1a1a
    • Sam McCall's avatar
      [VFS] Allow multiple RealFileSystem instances with independent CWDs. · c2b310ae
      Sam McCall authored
      Summary:
      Previously only one RealFileSystem instance was available, and its working
      directory is shared with the process. This doesn't work well for multithreaded
      programs that want to work with relative paths - the vfs::FileSystem is assumed
      to provide the working directory, but a thread cannot control this exclusively.
      
      The new vfs::createPhysicalFileSystem() factory copies the process's working
      directory initially, and then allows it to be independently modified.
      
      This implementation records the working directory path, and glues it to relative
      paths to provide the correct absolute path to the sys::fs:: functions.
      This will give different results in unusual situations (e.g. the CWD is moved).
      
      The main alternative is the use of openat(), fstatat(), etc to ask the OS to
      resolve paths relative to a directory handle which can be kept open. This is
      more robust. There are two reasons not to do this initially:
      1. these functions are not available on all supported Unixes, and are somewhere
         between difficult and unavailable on Windows. So we need a path-based
         fallback anyway.
      2. this would mean also adding support at the llvm::sys::fs level, which is a
         larger project. My clearest idea is an OS-specific `BaseDirectory` object
         that can be optionally passed to functions there. Eventually this could be
         backed by either paths or a fd where openat() is supported.
         This is a large project, and demonstrating here that a path-based fallback
         works is a useful prerequisite.
      
      There is some subtlety to the path-manipulation mechanism:
        - when setting the working directory, both Specified=makeAbsolute(path) and
          Resolved=realpath(path) are recorded. These may differ in the presence of
          symlinks.
        - getCurrentWorkingDirectory() and makeAbsolute() use Specified - this is
          similar to the behavior of $PWD and sys::path::current_path
        - IO operations like openFileForRead use Resolved. This is similar to the
          behavior of an openat() based implementation, that doesn't see changes
          in symlinks.
      There may still be combinations of operations and FS states that yield unhelpful
      behavior. This is hard to avoid with symlinks and FS abstractions :(
      
      The caching behavior of the current working directory is removed in this patch.
      getRealFileSystem() is now specified to link to the process CWD, so the caching
      is incorrect.
      The user who needed this so far is clangd, which will immediately switch to
      createPhysicalFileSystem().
      
      Reviewers: ilya-biryukov, bkramer, labath
      
      Subscribers: ioeric, kadircet, kristina, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D56545
      
      llvm-svn: 351050
      c2b310ae
    • Thomas Preud'homme's avatar
      Add support for prefix-only CLI options · bc5e6ee8
      Thomas Preud'homme authored
      Summary:
      Add support for options that always prefix their value, giving an error
      if the value is in the next argument or if the option is given a value
      assignment (ie. opt=val). This is the desired behavior for the -D option
      of FileCheck for instance.
      
      Copyright:
      - Linaro (changes in version 2 of revision D55940)
      - GraphCore (changes in later versions and introduced when creating
        D56549)
      
      Reviewers: jdenny
      
      Subscribers: llvm-commits, probinson, kristina, hiraditya,
      JonChesterfield
      
      Differential Revision: https://reviews.llvm.org/D56549
      
      llvm-svn: 351038
      bc5e6ee8
  7. Jan 13, 2019
  8. Jan 11, 2019
  9. Jan 09, 2019
    • Hubert Tong's avatar
      [unittests][Support] AIX: Skip sticky bit file tests · ea2ce500
      Hubert Tong authored
      On AIX, attempting (without root) to set the sticky bit on a file with
      the `chmod` utility will give:
      ```
      chmod: not all requested changes were made to <file>
      ```
      
      The same occurs when modifying other permission bits on a file with the
      sticky bit already set.
      
      It seems that the `chmod` function will report success despite failing
      to set the sticky bit.
      
      llvm-svn: 350735
      ea2ce500
  10. Jan 04, 2019
  11. Jan 03, 2019
  12. Dec 28, 2018
    • Diogo N. Sampaio's avatar
      [AArch64] Add command-line option for SB · 9123f82c
      Diogo N. Sampaio authored
      SB (Speculative Barrier) is only mandatory from 8.5
      onwards but is optional from Armv8.0-A. This patch adds a command
      line option to enable SB, as it was previously only possible to
      enable by selecting -march=armv8.5-a.
      
      This patch also moves to FeatureSB the old FeatureSpecRestrict.
      
      Reviewers: pbarrio, olista01, t.p.northover, LukeCheeseman	
      
      Differential Revision: https://reviews.llvm.org/D55921
      
      llvm-svn: 350126
      9123f82c
  13. Dec 21, 2018
  14. Dec 20, 2018
  15. Dec 19, 2018
    • Richard Smith's avatar
      Fix use-after-free with profile remapping. · 0b832095
      Richard Smith authored
      We need to keep the underlying profile reader alive as long as the
      profile data, because the profile data may contain StringRefs referring
      to strings in the reader's name table.
      
      llvm-svn: 349600
      0b832095
  16. Dec 17, 2018
  17. Dec 14, 2018
    • Zachary Turner's avatar
      [ADT] Fix bugs in SmallBitVector. · 1eb3aae2
      Zachary Turner authored
      Fixes:
        * find_last/find_last_unset - off-by-one error
        * Compound assignment ops and operator== when mixing big/small modes
      
      Patch by Brad Moody
      Differential Revision: https://reviews.llvm.org/D54933
      
      llvm-svn: 349173
      1eb3aae2
    • Daniel Sanders's avatar
      [globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate · 629db5d8
      Daniel Sanders authored
      Summary:
      This allows us to register it with the MachineFunction delegate and be
      notified automatically about erasure and creation of instructions. However,
      we still need explicit notification for modifications such as those caused
      by setReg() or replaceRegWith().
      
      There is a catch with this though. The notification for creation is
      delivered before any operands can be added. While appropriate for
      scheduling combiner work. This is unfortunate for debug output since an
      opcode by itself doesn't provide sufficient information on what happened.
      As a result, the work list remembers the instructions (when debug output is
      requested) and emits a more complete dump later.
      
      Another nit is that the MachineFunction::Delegate provides const pointers
      which is inconvenient since we want to use it to schedule future
      modification. To resolve this GISelWorkList now has an optional pointer to
      the MachineFunction which describes the scope of the work it is permitted
      to schedule. If a given MachineInstr* is in this function then it is
      permitted to schedule work to be performed on the MachineInstr's. An
      alternative to this would be to remove the const from the
      MachineFunction::Delegate interface, however delegates are not permitted
      to modify the MachineInstr's they receive.
      
      In addition to this, the observer has three interface changes.
      * erasedInstr() is now erasingInstr() to indicate it is about to be erased
        but still exists at the moment.
      * changingInstr() and changedInstr() have been added to report changes
        before and after they are made. This allows us to trace the changes
        in the debug output.
      * As a convenience changingAllUsesOfReg() and
        finishedChangingAllUsesOfReg() will report changingInstr() and
        changedInstr() for each use of a given register. This is primarily useful
        for changes caused by MachineRegisterInfo::replaceRegWith()
      
      With this in place, both combine rules have been updated to report their
      changes to the observer.
      
      Finally, make some cosmetic changes to the debug output and make Combiner
      and CombinerHelp
      
      Reviewers: aditya_nandakumar, bogner, volkan, rtereshin, javed.absar
      
      Reviewed By: aditya_nandakumar
      
      Subscribers: mgorny, rovka, kristof.beyls, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D52947
      
      llvm-svn: 349167
      629db5d8
  18. Dec 13, 2018
    • Daniel Sanders's avatar
      [globalisel] Add GISelChangeObserver::changingInstr() · d001e0e0
      Daniel Sanders authored
      Summary:
      In addition to knowing that an instruction is changed. It's also useful to
      know when it's about to change. For example, it might print the instruction so
      you can track the changes in a debug log, it might remove it from some queue
      while it's being worked on, or it might want to change several instructions as
      a single transaction and act on all the changes at once.
      
      Added changingInstr() to all existing uses of changedInstr()
      
      Reviewers: aditya_nandakumar
      
      Reviewed By: aditya_nandakumar
      
      Subscribers: rovka, kristof.beyls, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D55623
      
      llvm-svn: 348992
      d001e0e0
  19. Dec 12, 2018
  20. Dec 11, 2018
    • Fedor Sergeev's avatar
      [NewPM] fixing asserts on deleted loop in -print-after-all · a1d95c3f
      Fedor Sergeev authored
      IR-printing AfterPass instrumentation might be called on a loop
      that has just been invalidated. We should skip printing it to
      avoid spurious asserts.
      
      Reviewed By: chandlerc, philip.pfaffe
      Differential Revision: https://reviews.llvm.org/D54740
      
      llvm-svn: 348887
      a1d95c3f
    • Armando Montanez's avatar
      [TextAPI][elfabi] Make SoName optional · 6d6ff2e0
      Armando Montanez authored
      This change makes DT_SONAME treated as an optional trait for ELF TextAPI
      stubs. This change accounts for the fact that shared objects aren't
      guaranteed to have a DT_SONAME entry. Tests have been updated to check
      for correct behavior of an optional soname.
      
      Differential Revision: https://reviews.llvm.org/D55533
      
      llvm-svn: 348817
      6d6ff2e0
    • Aditya Nandakumar's avatar
      [GISel]: Refactor MachineIRBuilder to allow passing additional parameters to build Instrs · cef44a23
      Aditya Nandakumar authored
      https://reviews.llvm.org/D55294
      
      Previously MachineIRBuilder::buildInstr used to accept variadic
      arguments for sources (which were either unsigned or
      MachineInstrBuilder). While this worked well in common cases, it doesn't
      allow us to build instructions that have multiple destinations.
      Additionally passing in other optional parameters in the end (such as
      flags) is not possible trivially. Also a trivial call such as
      
      B.buildInstr(Opc, Reg1, Reg2, Reg3)
      can be interpreted differently based on the opcode (2defs + 1 src for
      unmerge vs 1 def + 2srcs).
      This patch refactors the buildInstr to
      
      buildInstr(Opc, ArrayRef<DstOps>, ArrayRef<SrcOps>)
      where DstOps and SrcOps are typed unions that know how to add itself to
      MachineInstrBuilder.
      After this patch, most invocations would look like
      
      B.buildInstr(Opc, {s32, DstReg}, {SrcRegs..., SrcMIBs..});
      Now all the other calls (such as buildAdd, buildSub etc) forward to
      buildInstr. It also makes it possible to build instructions with
      multiple defs.
      Additionally in a subsequent patch, we should make it possible to add
      flags directly while building instructions.
      Additionally, the main buildInstr method is now virtual and other
      builders now only have to override buildInstr (for say constant
      folding/cseing) is straightforward.
      
      Also attached here (https://reviews.llvm.org/F7675680) is a clang-tidy
      patch that should upgrade the API calls if necessary.
      
      llvm-svn: 348815
      cef44a23
  21. Dec 10, 2018
    • Sam Clegg's avatar
      Fix LLVM_LINK_LLVM_DYLIB build of TapiTests · 58823285
      Sam Clegg authored
      A dependency on TestingSupport was introduced in rL348735 but
      library was not incldued in the LLVM_LINK_LLVM_DYLIB build.
      
      Differential Revision: https://reviews.llvm.org/D55526
      
      llvm-svn: 348803
      58823285
    • JF Bastien's avatar
      APFloat: allow 64-bit of payload · 69f6098e
      JF Bastien authored
      Summary: The APFloat and Constant APIs taking an APInt allow arbitrary payloads,
      and that's great. There's a convenience API which takes an unsigned, and that's
      silly because it then directly creates a 64-bit APInt. Just change it to 64-bits
      directly.
      
      At the same time, add ConstantFP NaN getters which match the APFloat ones (with
      getQNaN / getSNaN and APInt parameters).
      
      Improve the APFloat testing to set more payload bits.
      
      Reviewers: scanon, rjmccall
      
      Subscribers: jkorous, dexonsmith, kristina, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D55460
      
      llvm-svn: 348791
      69f6098e
Loading