1. May 19, 2017
    • Artur Pilipenko's avatar
      46c4e0a4
    • Dmitry Preobrazhensky's avatar
      [AMDGPU][MC] Fixed bugs in export instruction · 9321e8fc
      Dmitry Preobrazhensky authored
      See Bugs 33019, 33056:
        https://bugs.llvm.org//show_bug.cgi?id=33019
        https://bugs.llvm.org//show_bug.cgi?id=33056
      
      Reviewers: artem.tamazov, vpykhtin
      
      Differential Revision: https://reviews.llvm.org/D33288
      
      llvm-svn: 303423
      9321e8fc
    • Francis Ricci's avatar
      Use write instead of read permissions to check for global sections on mac · dd592ff4
      Francis Ricci authored
      Summary:
      The LINKEDIT section is very large and is read-only. Scanning this
      section caused LSan on darwin to be very slow. When only writable sections
      are scanned for global pointers, performance improved by a factor of about 25x.
      
      Reviewers: alekseyshl, kubamracek
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D33322
      
      llvm-svn: 303422
      dd592ff4
    • Guy Blank's avatar
      [X86][AVX512] Make i1 illegal in the CodeGen · 548e22a1
      Guy Blank authored
      This patch defines the i1 type as illegal in the X86 backend for AVX512.
      For DAG operations on <N x i1> types (build vector, extract vector element, ...) i8 is used, and should be truncated/extended.
      This should produce better scalar code for i1 types since GPRs will be used instead of mask registers.
      
      Differential Revision: https://reviews.llvm.org/D32273
      
      llvm-svn: 303421
      548e22a1
    • Tobias Grosser's avatar
      [ScopDetection] Allow detection of full functions · d8945baa
      Tobias Grosser authored
      This is useful when only analyzing functions.
      
      llvm-svn: 303420
      d8945baa
    • Krzysztof Parzyszek's avatar
      8b9897ff
    • Daniel Sanders's avatar
      [globalisel][tablegen] Demote OptForSize/OptForMinSize/ForCodeSize to per-function predicates. · a1b2db79
      Daniel Sanders authored
      Summary:
      This causes them to be re-computed more often than necessary but resolves
      objections that were raised post-commit on r301750.
      
      Reviewers: qcolombet, ab, t.p.northover, rovka, kristof.beyls
      
      Reviewed By: qcolombet
      
      Subscribers: igorb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D32861
      
      llvm-svn: 303418
      a1b2db79
    • Amara Emerson's avatar
      Fix vector pass-through value being unused in IRBuilder::CreateMaskedGather · 4d33c863
      Amara Emerson authored
      Also s/0/nullptr in the call site in LV.
      
      llvm-svn: 303416
      4d33c863
    • Krasimir Georgiev's avatar
      [clang-format] Handle trailing comment sections in import statement lines · a1c30937
      Krasimir Georgiev authored
      Summary:
      This patch updates the handling of multiline trailing comment sections in
      import statement lines to make it more consistent with the case in general.
      This includes updating the parsing logic to collect the trailing comment
      sections and the formatting logic to not insert escaped newlines at the end of
      comment lines in import statement lines.
      
      Specifically, before this patch this code:
      ```
      #include <a> // line 1
                   // line 2
      ```
      will be turned into two unwrapped lines, whereas this code:
      ```
      int i; // line 1
             // line 2
      ```
      is turned into a single unwrapped line, enabling reflowing across comments.
      
      An example where the old behaviour is bad is when partially formatting the lines
      3 to 4 of this code:
      ```
      #include <a> // line 1
                   // line 2
      
      int i;
      ```
      which gets turned into:
      ```
      #include <a> // line 1
                   // line 2
      
                   int i;
      ```
      because the two comment lines were independent and the indent was copied.
      
      Reviewers: djasper
      
      Reviewed By: djasper
      
      Subscribers: cfe-commits, klimek
      
      Differential Revision: https://reviews.llvm.org/D33351
      
      llvm-svn: 303415
      a1c30937
    • NAKAMURA Takumi's avatar
      CodeGenFunction::EmitPointerWithAlignment(): Prune a \param in r303358,... · 76f93869
      NAKAMURA Takumi authored
      CodeGenFunction::EmitPointerWithAlignment(): Prune a \param in r303358, possibly obsolete. [-Wdocumentation]
      
      llvm-svn: 303414
      76f93869
    • Volkan Keles's avatar
      [GlobalISel] IRTranslator: Translate ConstantStruct · 6a36c647
      Volkan Keles authored
      Reviewers: qcolombet, ab, t.p.northover, aditya_nandakumar, dsanders
      
      Reviewed By: qcolombet
      
      Subscribers: rovka, kristof.beyls, javed.absar, igorb, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D33317
      
      llvm-svn: 303412
      6a36c647
    • Craig Topper's avatar
      [APInt] Use b.negate() in place of b = -std::move(b). NFCI · 796d5ffa
      Craig Topper authored
      llvm-svn: 303411
      796d5ffa
    • Zachary Turner's avatar
      Fix compilation failure. · bdc16ed0
      Zachary Turner authored
      llvm-svn: 303410
      bdc16ed0
    • Zachary Turner's avatar
      Revert "[CodeView] Provide a common interface for type collections." · 1dfcf8d9
      Zachary Turner authored
      This is a squash of ~5 reverts of, well, pretty much everything
      I did today.  Something is seriously broken with lit on Windows
      right now, and as a result assertions that fire in tests are
      triggering failures.  I've been breaking non-Windows bots all
      day which has seriously confused me because all my tests have
      been passing, and after running lit with -a to view the output
      even on successful runs, I find out that the tool is crashing
      and yet lit is still reporting it as a success!
      
      At this point I don't even know where to start, so rather than
      leave the tree broken for who knows how long, I will get this
      back to green, and then once lit is fixed on Windows, hopefully
      hopefully fix the remaining set of problems for real.
      
      llvm-svn: 303409
      1dfcf8d9
    • Zachary Turner's avatar
      Don't crash if someone tries to visit an empty type stream. · 47fdc737
      Zachary Turner authored
      llvm-svn: 303408
      47fdc737
    • Zachary Turner's avatar
      [CodeView] Reduce memory usage in TypeSerializer. · 59ab6a38
      Zachary Turner authored
      We were using a BumpPtrAllocator to allocate stable storage for
      a record, then trying to insert that into a hash table.  If a
      collision occurred, the bytes were never inserted and the
      allocation was unnecessary.  At the cost of an extra hash
      computation, check first if it exists, and only if it does do
      we allocate and insert.
      
      llvm-svn: 303407
      59ab6a38
    • Davide Italiano's avatar
      [NewGVN] Delete the old store when we find congruent to a load. · ee49f494
      Davide Italiano authored
      (or non-store, more in general). Fixes PR33086. Caught by the
      store verifier.
      
      llvm-svn: 303406
      ee49f494
    • Tobias Grosser's avatar
      [ScopInfo] Fix typo in documentation · 97715848
      Tobias Grosser authored
      llvm-svn: 303405
      97715848
    • Tobias Grosser's avatar
      [ScopInfo] Gracefully handle long compile times · 45e9fd18
      Tobias Grosser authored
      The following test case tried to compute the lexicographic minimum of the
      following set during alias analysis, which caused very long compile time:
      
      [p_0, p_1, p_2, p_3, p_4, p_5] -> { MemRef0[i0] : (517p_3 >= 70944 - 298p_2 and
      256i0 >= -71199 + 298p_2 + 517p_3 and 256i0 <= -70944 + 298p_2 + 517p_3) or
      (409p_4 >= 57120 - 298p_2 and 256i0 >= -57375 + 298p_2 + 409p_4 and 256i0 <=
      -57120 + 298p_2 + 409p_4) or (104p_4 >= 17329 + 149p_2 - 50p_3 and 128i0 >=
      17328 + 149p_2 - 50p_3 - 104p_4 and 128i0 <= 17455 + 149p_2 - 50p_3 - 104p_4) or
      (104p_4 <= 17328 + 149p_2 - 50p_3 and 128i0 >= 17201 + 149p_2 - 50p_3 - 104p_4
      and 128i0 <= 17328 + 149p_2 - 50p_3 - 104p_4) or (409p_4 <= 57119 - 298p_2 and
      256i0 >= -57120 + 298p_2 + 409p_4 and 256i0 <= -56865 + 298p_2 + 409p_4) or
      (517p_3 <= 70943 - 298p_2 and 256i0 >= -70944 + 298p_2 + 517p_3 and 256i0 <=
      -70689 + 298p_2 + 517p_3) or (p_1 >= 2 + 2p_0 and 298p_5 >= 70944 - 517p_3 and
      256i0 >= -71199 + 517p_3 + 298p_5 and 256i0 <= -70944 + 517p_3 + 298p_5) or (p_1
      >= 2 + 2p_0 and 298p_5 >= 57120 - 409p_4 and 256i0 >= -57375 + 409p_4 + 298p_5
      >and 256i0 <= -57120 + 409p_4 + 298p_5) or (p_1 >= 2 + 2p_0 and 149p_5 <= -17329
      >+ 50p_3 + 104p_4 and 128i0 >= 17328 - 50p_3 - 104p_4 + 149p_5 and 128i0 <=
      >17455 - 50p_3 - 104p_4 + 149p_5) or (p_1 >= 2 + 2p_0 and 149p_5 >= -17328 +
      >50p_3 + 104p_4 and 128i0 >= 17201 - 50p_3 - 104p_4 + 149p_5 and 128i0 <= 17328
      >- 50p_3 - 104p_4 + 149p_5) or (p_1 >= 2 + 2p_0 and 298p_5 <= 57119 - 409p_4 and
      >256i0 >= -57120 + 409p_4 + 298p_5 and 256i0 <= -56865 + 409p_4 + 298p_5) or
      >(p_1 >= 2 + 2p_0 and 298p_5 <= 70943 - 517p_3 and 256i0 >= -70944 + 517p_3 +
      >298p_5 and 256i0 <= -70689 + 517p_3 + 298p_5) }
      
      We now guard the potentially expensive functions in Polly's scop analysis to
      gracefully bail out in case of overly long compilation times.
      
      llvm-svn: 303404
      45e9fd18
    • Zachary Turner's avatar
      Fix a broken test. · 27ac223a
      Zachary Turner authored
      Similar to my previous fix, it turns out llvm-pdbdump has been
      printing an incorrect value since the beginning of time, but
      we didn't know it was incorrect.  Specifically, we were interpreting
      a TypeIndex as referencing a type from the TPI stream when it
      actually should come from the IPI stream.  So we were printing a
      string that looked like a valid string, but was just from the
      wrong place.
      
      llvm-svn: 303403
      27ac223a
    • Adam Nemet's avatar
      Revert "[ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC)." · 89676720
      Adam Nemet authored
      This reverts commit r303383.
      
      This breaks the modules-enabled macOS build with:
      
      lib/Support/LockFileManager.cpp:86:7: error: declaration of 'gethostuuid' must be imported from module 'Darwin.POSIX.unistd' before it is required
      
      llvm-svn: 303402
      89676720
    • Richard Smith's avatar
      When a type-id is unexpectedly given a name, assume that the name is unrelated · 74639b19
      Richard Smith authored
      syntax unless we have a reason to think otherwise.
      
      This improves error recovery in a couple of cases.
      
      llvm-svn: 303398
      74639b19
    • Zachary Turner's avatar
      Fix crasher in CodeView test. · 8f1d87a7
      Zachary Turner authored
      Apparently this was always broken, but previously we were more
      graceful about it and we would print "unknown udt" if we couldn't
      find the type index, whereas now we just segfault because we
      assume it's valid.  But this exposed a real bug, which is that
      we weren't looking in the right place.  So fix that, and also
      fix this crash at the same time.
      
      llvm-svn: 303397
      8f1d87a7
    • Matthias Braun's avatar
      LiveIntervalAnalysis: Fix missing case in pruneSubRegValues() · d6e75ed9
      Matthias Braun authored
      pruneSubRegValues() needs to remove subregister ranges starting at
      instructions that later get removed by eraseInstrs(). It missed to check
      one case in which eraseInstrs() would remove an instruction.
      
      Fixes http://llvm.org/PR32688
      
      llvm-svn: 303396
      d6e75ed9
    • Matthias Braun's avatar
      Fix typo · 8700684a
      Matthias Braun authored
      llvm-svn: 303395
      8700684a
    • Zachary Turner's avatar
      Fix another warning. · 613c29e4
      Zachary Turner authored
      llvm-svn: 303394
      613c29e4
    • Davide Italiano's avatar
      [NewGVN] Break infinite recursion in singleReachablePHIPath(). · eab0de2b
      Davide Italiano authored
      We can have cycles between PHIs and this causes singleReachablePhi()
      to call itself indefintely (until we run out of stack). The proper
      solution would be that of computing SCCs, but it's not worth for
      now, so just keep a visited set and give up when we find a cycle.
      Thanks to Dan for the discussion/help with this.
      
      Fixes PR33014.
      
      llvm-svn: 303393
      eab0de2b
    • Vitaly Buka's avatar
      [compiler-rt] Replace ifs with switch statement in IsHandledDeadlySignal · 1cfc81f1
      Vitaly Buka authored
      Reviewers: eugenis
      
      Subscribers: kubamracek, llvm-commits, dberris
      
      Differential Revision: https://reviews.llvm.org/D33158
      
      llvm-svn: 303392
      1cfc81f1
    • Zachary Turner's avatar
      Fix some build errors and warnings. · 7b62d7cc
      Zachary Turner authored
      llvm-svn: 303391
      7b62d7cc
    • Zachary Turner's avatar
      [CodeView] Raise the source to ID map out of the TypeStreamMerger. · b32ec02b
      Zachary Turner authored
      This map will be needed to rewrite symbol streams after re-writing
      the corresponding type streams.
      
      llvm-svn: 303390
      b32ec02b
    • Zachary Turner's avatar
      [llvm-pdbdump] Add the ability to merge PDBs. · 8fb441ab
      Zachary Turner authored
      Merging PDBs is a feature that will be used heavily by
      the linker.  The functionality already exists but does not
      have deep test coverage because it's not easily exposed through
      any tools.  This patch aims to address that by adding the
      ability to merge PDBs via llvm-pdbdump.  It takes arbitrarily
      many PDBs and outputs a single PDB.
      
      Using this new functionality, a test is added for merging
      type records.  Future patches will add the ability to merge
      symbol records, module information, etc.
      
      llvm-svn: 303389
      8fb441ab
    • Zachary Turner's avatar
      [CodeView] Provide a common interface for type collections. · 0c60f269
      Zachary Turner authored
      Right now we have multiple notions of things that represent collections of
      types. Most commonly used are TypeDatabase, which is supposed to keep
      mappings from TypeIndex to type name when reading a type stream, which
      happens when reading PDBs. And also TypeTableBuilder, which is used to
      build up a collection of types dynamically which we will later serialize
      (i.e. when writing PDBs).
      
      But often you just want to do some operation on a collection of types, and
      you may want to do the same operation on any kind of collection. For
      example, you might want to merge two TypeTableBuilders or you might want
      to merge two type streams that you loaded from various files.
      
      This dichotomy between reading and writing is responsible for a lot of the
      existing code duplication and overlapping responsibilities in the existing
      CodeView library classes. For example, after building up a
      TypeTableBuilder with a bunch of type records, if we want to dump it we
      have to re-invent a bunch of extra glue because our dumper takes a
      TypeDatabase or a CVTypeArray, which are both incompatible with
      TypeTableBuilder.
      
      This patch introduces an abstract base class called TypeCollection which
      is shared between the various type collection like things. Wherever we
      previously stored a TypeDatabase& in some common class, we now store a
      TypeCollection&.
      
      The advantage of this is that all the details of how the collection are
      implemented, such as lazy deserialization of partial type streams, is
      completely transparent and you can just treat any collection of types the
      same regardless of where it came from.
      
      Differential Revision: https://reviews.llvm.org/D33293
      
      llvm-svn: 303388
      0c60f269
    • Sanjay Patel's avatar
      [InstCombine] add more tests for xor-of-icmps; NFC · 86bf0a87
      Sanjay Patel authored
      llvm-svn: 303387
      86bf0a87
    • Michael Kruse's avatar
      [ScopInfo] Fix r302231 to use logical or (||). NFC. · 960c0d0b
      Michael Kruse authored
      
      
      In r302231 we mistakenly use bitwise or (|) instead of logical
      or (||). This patch fixes that.
      
      Contributed-by: default avatarSameer AbuAsal <sabuasal@codeaurora.org>
      
      Differential Revision: https://reviews.llvm.org/D33337
      
      llvm-svn: 303386
      960c0d0b
    • Davide Italiano's avatar
      [NewGVN] Replace predicate info leftovers. · a76e5fa1
      Davide Italiano authored
      This time with an additional fix, i.e. we remove the dead
      @llvm.ssa.copy instruction.
      
      llvm-svn: 303385
      a76e5fa1
    • Rafael Espindola's avatar
      Use linker script commands in writeMapFile. · a46f688e
      Rafael Espindola authored
      This converts the last (chronologically) user of OutputSections to use
      the linker script commands instead.
      
      The idea is to convert all uses after fabricateDefaultCommands, so
      that we have a single representation.
      
      llvm-svn: 303384
      a46f688e
    • Eugene Zelenko's avatar
      795de8a7
    • Martin Probst's avatar
      clang-format: [JS] for await, and fix a crash with for loops. · a050f41c
      Martin Probst authored
      Summary:
      The syntax is actually `for await (const x of y)` (d'oh).
      This also fixes a crash for `for` tokens not followed by additional tokens.
      
      Reviewers: djasper
      
      Subscribers: cfe-commits, klimek
      
      Differential Revision: https://reviews.llvm.org/D33329
      
      llvm-svn: 303382
      a050f41c
    • Sanjay Patel's avatar
      [InstCombine] add helper to foldXorOfICmps(); NFCI · 5e456b94
      Sanjay Patel authored
      Also, fix the old-style capitalization of the related functions
      and move them to the 'private' section of the class since they
      are just helpers of the visit* functions.
      
      As shown in the post-commit comments for D32143, we are missing
      folds for xor-of-icmps. 
      
      llvm-svn: 303381
      5e456b94
    • Kostya Kortchinsky's avatar
      [scudo] lower quarantine default sizes · 432b8dd8
      Kostya Kortchinsky authored
      Summary:
      After discussing the current defaults with a couple of parties, the consensus
      is that they are too high. 1Mb of quarantine has about a 4Mb impact on PSS, so
      memory usage goes up quickly.
      This is obviously configurable, but the default value should be more
      "approachable", so both the global size and the thread local size are 1/4 of
      what they used to be.
      
      Reviewers: alekseyshl, kcc
      
      Reviewed By: alekseyshl
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D33321
      
      llvm-svn: 303380
      432b8dd8