Skip to content
  1. Jun 23, 2017
    • Erich Keane's avatar
      Add test for 306149, warn on throw from noexcept · 4c2fc126
      Erich Keane authored
      llvm-svn: 306156
      4c2fc126
    • Craig Topper's avatar
      [APInt] Make the single word cases of isMaxSignedValue/isMinSignedValue just... · b6609b62
      Craig Topper authored
      [APInt] Make the single word cases of isMaxSignedValue/isMinSignedValue just compare with the expected value rather than counting bits. NFCI
      
      llvm-svn: 306155
      b6609b62
    • Craig Topper's avatar
      [APInt] Use trailing bit counting methods instead of population count method... · b73646f8
      Craig Topper authored
      [APInt] Use trailing bit counting methods instead of population count method in isAllOnesValue, isMaxSigendValue, and isMinSignedValue. NFCI
      
      The trailing bit methods will early out if they find a bit of the opposite while popcount must always look at all bits. I also assume that more CPUs implement trailing bit counting with native instructions than population count.
      
      llvm-svn: 306154
      b73646f8
    • Craig Topper's avatar
      [APInt] Move the single word cases of countTrailingZeros and countLeadingOnes... · 40516521
      Craig Topper authored
      [APInt] Move the single word cases of countTrailingZeros and countLeadingOnes inline for consistency with countTrailingOnes and countLeadingZeros. NFCI
      
      llvm-svn: 306153
      40516521
    • Craig Topper's avatar
      [CorrelatedValuePropagation] Fix typo in comment sense->since. NFC · 68ed55e0
      Craig Topper authored
      llvm-svn: 306152
      68ed55e0
    • Craig Topper's avatar
      [CorrelatedValuePropagation] Remove comment about iterating switch cases in... · 29cdfe2c
      Craig Topper authored
      [CorrelatedValuePropagation] Remove comment about iterating switch cases in reverse order. This is no longer being done after r298791. NFC
      
      llvm-svn: 306151
      29cdfe2c
    • Zachary Turner's avatar
      [llvm-pdbutil] Show what blocks a stream occupies. · 5f09852d
      Zachary Turner authored
      This is useful when you want to look at a specific chunk of a
      stream or look for discontinuities, and you need to know the
      list of blocks occupied by a stream.
      
      llvm-svn: 306150
      5f09852d
    • Erich Keane's avatar
      Emit warning when throw exception in destruct or dealloc functions which has a · 89fe9c26
      Erich Keane authored
      (possible implicit) noexcept specifier
      
      Throwing in the destructor is not good (C++11 change try to not allow see below).
       But in reality, those codes are exist.
      C++11 [class.dtor]p3:
      
      A declaration of a destructor that does not have an exception-specification is 
      implicitly considered to have the same exception specification as an implicit 
      declaration.
      
      With this change, the application worked before may now run into runtime 
      termination. My goal here is to emit a warning to provide only possible info to 
      where the code may need to be changed.
      
      First there is no way, in compile time to identify the “throw” really throw out 
      of the function. Things like the call which throw out… To keep this simple, 
      when “throw” is seen, checking its enclosing function(only destructor and 
      dealloc functions) with noexcept(true) specifier emit warning.
      
      Here is implementation detail:
      A new member function CheckCXXThrowInNonThrowingFunc is added for class Sema 
      in Sema.h. It is used in the call to both BuildCXXThrow and 
      TransformCXXThrowExpr.
      
      The function basic check if the enclosing function with non-throwing noexcept 
      specifer, if so emit warning for it.
      
      The example of warning message like:
      k1.cpp:18:3: warning: ''~dependent_warn'' has a (possible implicit) non-throwing
      
          noexcept specifier. Throwing exception may cause termination.
              [-Wthrow-in-dtor]
              throw 1;
              ^
      
              k1.cpp:43:30: note: in instantiation of member function
      
              'dependent_warn<noexcept_fun>::~dependent_warn' requested here
      
              dependent_warn<noexcept_fun> f; // cause warning
      
      Differential Revision: https://reviews.llvm.org/D33333
      
      llvm-svn: 306149
      89fe9c26
    • Zachary Turner's avatar
      [llvm-pdbutil] Dump raw bytes of pdb name map. · 6c3e41bb
      Zachary Turner authored
      This patch dumps the raw bytes of the pdb name map which contains
      the mapping of stream name to stream index for the string table
      and other reserved streams.
      
      llvm-svn: 306148
      6c3e41bb
    • Brian Gesiak's avatar
      [opt-viewer] Remove positional arg checks (NFC) · 7e66b6b8
      Brian Gesiak authored
      Summary:
      opt-stats.py and opt-viewer.py's argument parsers both take a positional
      argument 'yaml_files'. Positional arguments in Python's argparse module are
      required by default, so the subsequent checks for `len(args.yaml_files) == 0`
      are unnecessary -- if the length was zero, then the call to
      `parser.parse_args()` would have thrown an error already.
      
      Because there is no way for `len(args.yaml_files)` to be zero at these
      points, removing the code is NFC.
      
      Reviewers: anemet, davidxl
      
      Reviewed By: anemet
      
      Subscribers: llvm-commits, fhahn
      
      Differential Revision: https://reviews.llvm.org/D34567
      
      llvm-svn: 306147
      7e66b6b8
    • Zachary Turner's avatar
      [llvm-pdbutil] Add the ability to dump raw bytes from the file. · 6b124f29
      Zachary Turner authored
      Normally we can only make sense of the content of a PDB in terms
      of streams and blocks, but in some cases it may be useful to dump
      bytes at a specific absolute file offset.  For example, if you
      know that some interesting data is at a particular location and
      you want to see some surrounding data.
      
      llvm-svn: 306146
      6b124f29
    • Krzysztof Parzyszek's avatar
      Revert "[Hexagon] Handle decreasing of stack alignment in frame lowering" · 71702177
      Krzysztof Parzyszek authored
      This breaks passing of aligned function arguments.
      
      llvm-svn: 306145
      71702177
    • Chad Rosier's avatar
      [AArch64] Prefer Bcc to CBZ/CBNZ/TBZ/TBNZ when NZCV flags can be set for "free". · 6db9ff64
      Chad Rosier authored
      This patch contains a pass that transforms CBZ/CBNZ/TBZ/TBNZ instructions into a
      conditional branch (Bcc), when the NZCV flags can be set for "free". This is
      preferred on targets that have more flexibility when scheduling Bcc
      instructions as compared to CBZ/CBNZ/TBZ/TBNZ (assuming all other variables are
      equal). This can reduce register pressure and is also the default behavior for
      GCC.
      
      A few examples:
      
       add w8, w0, w1  -> cmn w0, w1             ; CMN is an alias of ADDS.
       cbz w8, .LBB_2  -> b.eq .LBB0_2           ; single def/use of w8 removed.
      
       add w8, w0, w1  -> adds w8, w0, w1        ; w8 has multiple uses.
       cbz w8, .LBB1_2 -> b.eq .LBB1_2
      
       sub w8, w0, w1       -> subs w8, w0, w1   ; w8 has multiple uses.
       tbz w8, #31, .LBB6_2 -> b.ge .LBB6_2
      
      In looking at all current sub-target machine descriptions, this transformation
      appears to be either positive or neutral.
      
      Differential Revision: https://reviews.llvm.org/D34220.
      
      llvm-svn: 306144
      6db9ff64
    • whitequark's avatar
      [X86] Fix SP adjustment in stack probes emitted on 32-bit Windows. · 00ede4dc
      whitequark authored
      Commit r306010 adjusted the condition as follows:
      
      -  if (Is64Bit) {
      +  if (!STI.isTargetWin32()) {
      
      The intent was to preserve the behavior on all Windows platforms
      but extend the behavior on 64-bit Windows platforms to every
      other one. (Before r306010, emitStackProbeCall only ever executed
      when emitting code for Windows triples.)
      
      Unfortunately,
        if (Is64Bit && STI.isOSWindows())
      is not the same as
        if (!STI.isTargetWin32())
      because of the way isTargetWin32() is defined:
      
        bool isTargetWin32() const {
          return !In64BitMode && (isTargetCygMing() ||
                                  isTargetKnownWindowsMSVC());
        }
      
      In practice this broke the JIT tests on 32-bit Windows, which did not
      satisfy the new condition:
      
          LLVM :: ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
          LLVM :: ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
          LLVM :: ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
          LLVM :: ExecutionEngine/MCJIT/test-loadstore.ll
          LLVM :: ExecutionEngine/OrcMCJIT/2003-01-15-AlignmentTest.ll
          LLVM :: ExecutionEngine/OrcMCJIT/2003-08-15-AllocaAssertion.ll
          LLVM :: ExecutionEngine/OrcMCJIT/2003-08-23-RegisterAllocatePhysReg.ll
          LLVM :: ExecutionEngine/OrcMCJIT/test-loadstore.ll
      
      because %esp was not updated correctly. The failures are only visible
      on a MSVC 2017 Debug build, for which we do not have bots.
      
      llvm-svn: 306142
      00ede4dc
    • Zachary Turner's avatar
      [llvm-pdbutil] Add a function for formatting MSF data. · 0b36c3eb
      Zachary Turner authored
      The goal here is to make it possible to display absolute
      file offsets when dumping byets from an MSF.  The problem is
      that when dumping bytes from an MSF, often the bytes will
      cross a block boundary and encounter a discontinuity.  We
      can't use the normal formatBinary() function for this because
      this would just treat the sequence as entirely ascending, and
      not account out-of-order blocks.
      
      This patch adds a formatMsfData() function to our printer, and
      then uses this function to improve the output of the -stream-data
      command line option for dumping bytes from a particular stream.
      
      Test coverage is also expanded to make sure to include all possible
      scenarios of offsets, sizes, and crossing block boundaries.
      
      llvm-svn: 306141
      0b36c3eb
    • Krzysztof Parzyszek's avatar
      [Hexagon] Remove call to printAndVerify from HexagonPassConfig · c0a102f5
      Krzysztof Parzyszek authored
      It causes an extra pass of the machine verifier to be added to the pass
      manager, and causes test/CodeGen/Generic/llc-start-stop.ll to fail.
      
      llvm-svn: 306140
      c0a102f5
    • Sanjay Patel's avatar
      [x86] fix value types for SBB transform (PR33560) · 3de6bad6
      Sanjay Patel authored
      I'm not sure yet why this wouldn't fail in the simple case,
      but clearly I used the wrong value type with:
      https://reviews.llvm.org/rL306040
      
      ...and the bug manifests with:
      https://bugs.llvm.org/show_bug.cgi?id=33560
      
      llvm-svn: 306139
      3de6bad6
    • Simon Pilgrim's avatar
      [X86][AVX] Regenerate i256 bitcasted store test · 19cee0d5
      Simon Pilgrim authored
      Check on slow/fast unaligned memory targets
      
      llvm-svn: 306138
      19cee0d5
    • Reid Kleckner's avatar
      [MS] Don't statically initialize dllimport member function pointers · 9c980cb5
      Reid Kleckner authored
      We were already applying the same rules to dllimport function pointers.
      David Majnemer added that logic back in r211677 to fix PR20130.  We
      failed to extend that logic to non-virtual member function pointers,
      which are basically function pointers in a struct with some extra
      offsets.
      
      Fixes PR33570.
      
      llvm-svn: 306137
      9c980cb5
    • Reid Kleckner's avatar
      Silence -Wunused-variable warning · 5a7eca52
      Reid Kleckner authored
      llvm-svn: 306135
      5a7eca52
    • Mehdi Amini's avatar
      Fix typo: using && instead of & when evaluating a mask · d16a6e32
      Mehdi Amini authored
      Summary: Reported by coverity, I don't know how to provide a test.
      
      Reviewers: zturner
      
      Subscribers: lldb-commits, emaste
      
      Differential Revision: https://reviews.llvm.org/D34550
      
      llvm-svn: 306134
      d16a6e32
    • Simon Pilgrim's avatar
      Fix Wdocumentation warning. · c26105e3
      Simon Pilgrim authored
      llvm-svn: 306133
      c26105e3
    • Michael Kruse's avatar
      [ScopBuilder] Pass ScopStmts around instead of BasicBlocks. NFC. · 7604d9ad
      Michael Kruse authored
      During the construction of MemoryAccesses in ScopBuilder, BasicBlocks
      were used in function parameters, assuming that the ScopStmt an be
      directly derived from it. This won't be true anymore once we split
      BasicBlocks into multiple ScopStmt. As a preparation for such a change
      in the future, we instead pass the ScopStmt and avoid the use of
      getStmtFor().
      
      There are two occasions where a kind of mapping from BasicBlock to
      ScopStmt is still required.
      
      1. Get the statement representing the incoming block of a `PHINode`
         using `getLastStmtOf`.
      
      2. One statement is required to write a scalar to be readable by those
         which need it. This is most often the statement which contains its
         definition, which we get using `getStmtFor(Instruction*)`.
      
      Differential Revision: https://reviews.llvm.org/D34369
      
      llvm-svn: 306132
      7604d9ad
    • Simon Pilgrim's avatar
      Regenerate extract-store.ll tests · dfa43607
      Simon Pilgrim authored
      llvm-svn: 306131
      dfa43607
    • Peter Collingbourne's avatar
      Fix a misleading indentation warning. · 15ab1720
      Peter Collingbourne authored
      llvm-svn: 306130
      15ab1720
    • Peter Collingbourne's avatar
      30aaa2f3
    • Peter Collingbourne's avatar
      Add parens for python3. · 36d43dd9
      Peter Collingbourne authored
      llvm-svn: 306128
      36d43dd9
    • Yuka Takahashi's avatar
      [GSoC] Add support for CC1 options. · 90caa8ff
      Yuka Takahashi authored
      Summary:
      Add value completion support for options which are defined in
      CC1Options.td, because we only handled options in Options.td.
      
      Reviewers: ruiu, v.g.vassilev, teemperor
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34558
      
      llvm-svn: 306127
      90caa8ff
    • Peter Collingbourne's avatar
      Add a ThinLTO cache policy for controlling the maximum cache size in bytes. · 8d292233
      Peter Collingbourne authored
      This is useful when an upper limit on the cache size needs to be
      controlled independently of the amount of the amount of free space.
      
      One use case is a machine with a large number of cache directories
      (e.g. a buildbot slave hosting a large number of independent build
      jobs). By imposing an upper size limit on each cache directory,
      users can more easily estimate the server's capacity.
      
      Differential Revision: https://reviews.llvm.org/D34547
      
      llvm-svn: 306126
      8d292233
    • Peter Collingbourne's avatar
      38a02dae
    • Krzysztof Parzyszek's avatar
      bb2fcd19
    • Saleem Abdulrasool's avatar
      test: fix negative test case · 9ac7181a
      Saleem Abdulrasool authored
      Add missing -### to the driver to ensure that we dont try to run the
      actual command.  The host may not support the IAS.  Should fix the SCEI
      buildbots.
      
      llvm-svn: 306123
      9ac7181a
    • Zachary Turner's avatar
      Add a BinarySubstreamRef, and a method to read one. · a1dcb85d
      Zachary Turner authored
      This is essentially just a BinaryStreamRef packaged with an
      offset and the logic for reading one is no different than the
      logic for reading a BinaryStreamRef, except that we save the
      current offset.
      
      llvm-svn: 306122
      a1dcb85d
    • Simon Pilgrim's avatar
      Remove trailing whitespace. NFCI. · 6e85e92b
      Simon Pilgrim authored
      llvm-svn: 306121
      6e85e92b
    • Tim Northover's avatar
      GlobalISel: remove G_SEQUENCE instruction. · 4b4eec70
      Tim Northover authored
      It was trying to do too many things. The basic lumping together of values for
      legalization purposes is now handled by G_MERGE_VALUES. More complex things
      involving gaps and odd sizes are handled by G_INSERT sequences.
      
      llvm-svn: 306120
      4b4eec70
    • Tim Northover's avatar
      GlobalISel: convert buildSequence to use non-deprecated instructions. · b57bf2ac
      Tim Northover authored
      G_SEQUENCE is going away soon so as a first step the MachineIRBuilder needs to
      be taught how to emulate it with alternatives. We use G_MERGE_VALUES where
      possible, and a sequence of G_INSERTs if not.
      
      llvm-svn: 306119
      b57bf2ac
    • Jun Bum Lim's avatar
      [InlineCost] Do not take INT_MAX when Cost is negative · 506cfb7a
      Jun Bum Lim authored
      Summary: visitSwitchInst should not take INT_MAX when Cost is negative. Instead of INT_MAX , we also use a valid upperbound cost when overflow occurs in Cost.
      
      Reviewers: hans, echristo, dmgreen
      
      Reviewed By: dmgreen
      
      Subscribers: mcrosier, javed.absar, llvm-commits, eraman
      
      Differential Revision: https://reviews.llvm.org/D34436
      
      llvm-svn: 306118
      506cfb7a
    • Ulrich Weigand's avatar
      [SystemZ] Remove unnecessary serialization before volatile loads · eaf0051b
      Ulrich Weigand authored
      This reverts the use of TargetLowering::prepareVolatileOrAtomicLoad
      introduced by r196905.  Nothing in the semantics of the "volatile"
      keyword or the definition of the z/Architecture actually requires
      that volatile loads are preceded by a serialization operation, and
      no other compiler on the platform actually implements this.
      
      Since we've now seen a use case where this additional serialization
      causes noticable performance degradation, this patch removes it.
      
      The patch still leaves in the serialization before atomic loads,
      which is now implemented directly in lowerATOMIC_LOAD.  (This also
      seems overkill, but that can be addressed separately.)
      
      llvm-svn: 306117
      eaf0051b
    • Rui Ueyama's avatar
      Sort the autocomplete candidates before printing them out. · 5cb4b35b
      Rui Ueyama authored
      Currently, autocompleted options are displayed in the same order as we
      wrote them in .td files. This patch sort them out in clang so that they
      are sorted alphabetically. This should improve usability.
      
      Differential Revision: https://reviews.llvm.org/D34557
      
      llvm-svn: 306116
      5cb4b35b
    • Saleem Abdulrasool's avatar
      Revert "Revert r305164/5/7." · d064e91e
      Saleem Abdulrasool authored
      Restore the `-gz` option to the driver with some minor tweaks to handle
      the additional case for `-Wa,--compress-debug-sections`.
      
      This intends to make the compression of the debug information
      controllable from the driver.  The following is the behaviour:
      
        -gz           enable compression (ambiguous for format, will default to zlib-gnu)
        -gz=none      disable compression
        -gz=zlib-gnu  enable compression (deprecated GNU style zlib compression)
        -gz=zlib      enable compression (zlib based compression)
      
      Although -Wa,-compress-debug-sections works, it should be discouraged
      when using the driver to invoke the assembler.  However, we permit the
      assembler to accept the GNU as style argument --compress-debug-sections
      to maintain compatibility.
      
      Note, -gz/-gz= does *NOT* imply -g.  That is, you need to additionally
      specific -g for debug information to be generated.
      
      llvm-svn: 306115
      d064e91e
Loading