Skip to content
  1. Jul 03, 2013
    • Ulrich Weigand's avatar
      · d5ebc626
      Ulrich Weigand authored
      [PowerPC] Always use mfocrf if available
      
      When accessing just a single CR register, it is always preferable to
      use mfocrf instead of mfcr, if the former is available on the CPU.
      
      Current code makes that distinction in many, but not all places
      where a single CR register value is retrieved.  One missing
      location is PPCRegisterInfo::lowerCRSpilling.
      
      To fix this and make this simpler in the future, this patch changes
      the bulk of the back-end to always assume mfocrf is available and
      simply generate it when needed.
      
      On machines that actually do not support mfocrf, the instruction
      is replaced by mfcr at the very end, in EmitInstruction.
      
      This has the additional benefit that we no longer need the
      MFCRpseud hack, since before EmitInstruction we always have
      a MFOCRF instruction pattern, which already models data flow
      as required.
      
      The patch also adds the MFOCRF8 version of the instruction,
      which was missing so far.
      
      Except for the PPCRegisterInfo::lowerCRSpilling case, no change
      in generated code intended.
      
      llvm-svn: 185556
      d5ebc626
    • Jordan Rose's avatar
      [scan-build] Log compiler invocation to stderr, not stdout. · 1187b95b
      Jordan Rose authored
      This is important for preprocessing steps, which may output to stdout.
      
      Also, change ENV accesses using barewords to use string keys instead.
      
      PR16414
      
      llvm-svn: 185555
      1187b95b
    • Rafael Espindola's avatar
      b0fccb22
    • Michael Sartain's avatar
      Symbol prologue code checks if funciton lines up with symbol and uses function... · bf43d1ad
      Michael Sartain authored
      Symbol prologue code checks if funciton lines up with symbol and uses function prologue code with line info if so.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1082
      
      llvm-svn: 185553
      bf43d1ad
    • Rafael Espindola's avatar
      Remove another old test. · 8490bbd1
      Rafael Espindola authored
      It was only passing because 'grep andpd' was not finding any andpd, but
      we don't fail if part of a pipe fails.
      
      llvm-svn: 185552
      8490bbd1
    • Rafael Espindola's avatar
      Remove test for the old EH system. It doesn't parse anymore. · 447dbc38
      Rafael Espindola authored
      llvm-svn: 185551
      447dbc38
    • Rafael Espindola's avatar
    • Ed Maste's avatar
      Update error message; detach-keeps-stopped is also not on FreeBSD · 1875776e
      Ed Maste authored
      llvm-svn: 185549
      1875776e
    • Jordan Rose's avatar
      With CLANG_ENABLE_STATIC_ANALYZER=0, link clang properly and skip clang-check. · b8859f67
      Jordan Rose authored
      Previously, the CMake build still tried to link clang against the static
      analyzer libraries, even if CLANG_ENABLE_STATIC_ANALYZER was off.
      Furthermore, clang-check depends on the analyzer, so it should be disabled
      (in both CMake and configure builds).
      
      In theory, clang-check could be made to conditionally include analyzer
      support (like clang itself), but for now this at least gets a CMake ALL_BUILD
      working.
      
      Patch by Stephen Kelly, modified by me.
      
      llvm-svn: 185548
      b8859f67
    • Rafael Espindola's avatar
      Add support for gnu archives with a string table and no symtab. · 88ae7dd2
      Rafael Espindola authored
      While there, use early returns to reduce nesting.
      
      llvm-svn: 185547
      88ae7dd2
    • Rafael Espindola's avatar
      Make llvm-nm return 1 on error. · 8b82a4d3
      Rafael Espindola authored
      This is a small compatibility improvement with gnu nm and makes llvm-nm more
      useful as a testing tool.
      
      llvm-svn: 185546
      8b82a4d3
    • Bill Schmidt's avatar
      Fix PR16454: Don't #include altivec.h when preprocessing assembly. · b3b804e4
      Bill Schmidt authored
      When the -maltivec flag is present, altivec.h is auto-included for the
      compilation.  This is not appropriate when the job action is to
      preprocess a file containing assembly code.  So don't do that.
      
      I was unable to convert the test in the bug report into a regression
      test.  The original symptom was exposed with:
      
        % touch x.S
        % ./bin/clang -target powerpc64-unknown-linux-gnu -maltivec -S -o - x.S
      
      I tried this test (and numerous variants) on a PPC64 system:
      
      ----------------------------------------------------------------------------
      // RUN: touch %t
      // RUN: %clang -maltivec -S %t -o - | FileCheck %s
      
      // Verify that assembling an empty file does not auto-include altivec.h.
      
      // CHECK-NOT: static vector
      ----------------------------------------------------------------------------
      
      However, this test passes for some reason even on a clang built
      without the fix.  I'd be happy to add a test case but at this point
      I'm not able to figure one out, and I don't want to hold up the patch
      unnecessarily.  Please let me know if you have ideas.
      
      Thanks,
      Bill
      
      llvm-svn: 185544
      b3b804e4
    • Serge Pavlov's avatar
      Test case for PR7887 - failed with asm("") · f432f857
      Serge Pavlov authored
      llvm-svn: 185543
      f432f857
    • Ulrich Weigand's avatar
      · 47e9328a
      Ulrich Weigand authored
      [PowerPC] Remove dead code from PPCDAGToDAGISel::SelectSETCC
      
      The subroutine getCRIdxForSetCC has a parameter "Other" and comment:
      
        If this returns with Other != -1, then the returned comparison
        is an or of two simpler comparisons.
      
      However for at least the last five years this routine has never
      returned a value of Other != -1; these cases are now handled
      differently to begin with.
      
      This patch removes the parameter and the code in SelectSETCC that
      attempted to handle the Other != -1 case.
      
      llvm-svn: 185541
      47e9328a
    • Craig Topper's avatar
      Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid... · 31ee5866
      Craig Topper authored
      Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
      
      llvm-svn: 185540
      31ee5866
    • Craig Topper's avatar
      Fix regular expression used by 'make update' to only look for 'I' and '?' at... · 1b7cfb70
      Craig Topper authored
      Fix regular expression used by 'make update' to only look for 'I' and '?' at the start of svn info results and to check for spaces after 'I' instead of just after '?'.
      
      Previously it was able to match 'I' anywhere in the filenames of the svn info results instead of just files that where ignored or unknown to svn. This would cause 'make update' to infinitely recurse if a file was modified with I anywhere in its name since svn info would return a Path pointing to the llvm root for those files.
      
      llvm-svn: 185539
      1b7cfb70
    • Evgeniy Stepanov's avatar
      [msan] Unpoison stack allocations and undef values in blacklisted functions. · dc6d7eb8
      Evgeniy Stepanov authored
      This changes behavior of -msan-poison-stack=0 flag from not poisoning stack
      allocations to actively unpoisoning them.
      
      llvm-svn: 185538
      dc6d7eb8
    • Rafael Espindola's avatar
      We don't need to know the OpenSUSE version, so don't parse it. · 10a63c2f
      Rafael Espindola authored
      Patch by Johannes Obermayr.
      
      llvm-svn: 185537
      10a63c2f
    • Sergey Matveev's avatar
      22614e5e
    • Edwin Vane's avatar
      cpp11-migrate: Add Replace-AutoPtr Transform · 5ee61108
      Edwin Vane authored
      Add a new transform to replace uses of 'std::auto_ptr' by 'std::unique_ptr'.
      Copy-ctor and assign-operator are wrapped with a call to 'std::move()'.
      
      Note that until header modification is ready it is not that useful, that's why
      it's marked as (EXPERIMENTAL) in the command line description and a "Known
      Limitations" section is present in the transform documentation.
      
      Author: Guillaume Papin <guillaume.papin@epitech.eu>
      llvm-svn: 185535
      5ee61108
    • Rui Ueyama's avatar
    • Ulrich Weigand's avatar
      · 9d2e202d
      Ulrich Weigand authored
      [PowerPC] Make specialized AltiVec patterns isCodeGenOnly
      
      A couple of AltiVec patterns are just specialized forms of the
      generic instruction pattern, and should therefore be marked
      isCodeGenOnly to avoid confusing the asm parser:
      VCFSX_0, VCTUXS_0, VCFUX_0, VCTSXS_0, and V_SETALLONES.
      
      Noticed by inspection of the generated PPCGenAsmMatcher.inc.
      
      llvm-svn: 185533
      9d2e202d
    • Ulrich Weigand's avatar
      · ae9cf582
      Ulrich Weigand authored
      [PowerPC] Support mtspr/mfspr in the asm parser
      
      This adds support for the generic forms of mtspr/mfspr
      for the asm parser.  The compiler will continue to use
      the specialized patters for mtlr etc. since those are
      needed to correctly describe data flow.
      
      llvm-svn: 185532
      ae9cf582
    • Daniel Jasper's avatar
      Prevent error message when formatting an empty file. · 09573741
      Daniel Jasper authored
      This fixes llvm.org/PR16514.
      
      llvm-svn: 185531
      09573741
    • Daniel Jasper's avatar
      Don't insert confusing line breaks in comparisons. · 7ae41cdd
      Daniel Jasper authored
      In general, clang-format breaks after an operator if the LHS spans
      multiple lines. Otherwise, this can lead to confusing effects and
      effectively hide the operator precendence, e.g. in
      
      if (aaaaaaaaaaaaaa ==
              bbbbbbbbbbbbbb && c) { ...
      
      This patch removes this rule for comparisons, if the LHS is not a binary
      expression itself as many users were wondering why clang-format inserts
      an unnecessary linebreak.
      
      Before:
      if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) >
          5) { ...
      
      After:
      if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) > 5) { ...
      
      In the long run, we might:
      - Want to do this for other binary expressions as well.
      - Do this only if the RHS is short or even only if it is a literal.
      
      llvm-svn: 185530
      7ae41cdd
    • Richard Sandiford's avatar
      [SystemZ] Fold more spills · ed1fab6b
      Richard Sandiford authored
      Add a mapping from register-based <INSN>R instructions to the corresponding
      memory-based <INSN>.  Use it to cut down on the number of spill loads.
      
      Some instructions extend their operands from smaller fields, so this
      required a new TSFlags field to say how big the unextended operand is.
      
      This optimisation doesn't trigger for C(G)R and CL(G)R because in practice
      we always combine those instructions with a branch.  Adding a test for every
      other case probably seems excessive, but it did catch a missed optimisation
      for DSGF (fixed in r185435).
      
      llvm-svn: 185529
      ed1fab6b
    • Mihai Popa's avatar
      This corrects the implementation of Thumb ADR instruction. There are three issues: · d36cbaa4
      Mihai Popa authored
      1. it should accept only 4-byte aligned addresses
      2. the maximum offset should be 1020
      3. it should be encoded with the offset scaled by two bits
      
      llvm-svn: 185528
      d36cbaa4
    • Tim Northover's avatar
      ARM: relax the atomic release barrier to "dmb ishst" on Swift · 36b2417f
      Tim Northover authored
      Swift cores implement store barriers that are stronger than the ARM
      specification but weaker than general barriers. They are, in fact, just about
      enough to provide the ordering needed for atomic operations with release
      semantics.
      
      This patch makes use of that quirk.
      
      llvm-svn: 185527
      36b2417f
    • Richard Sandiford's avatar
      [SystemZ] Rename mapping table fields · df313ff6
      Richard Sandiford authored
      Rename Function->DispKey and PairType->DispSize.  I'd originally used
      "Function" because I thought it might be useful for other InstMappings.
      However, it turns out that having two very similar instructions with the
      same Function makes it pretty useless for anything other than the displacement
      size key.  Other InstMappings will want the key to be defined for only one
      instruction in the pair.
      
      No behavioural change intended.
      
      llvm-svn: 185526
      df313ff6
    • Richard Sandiford's avatar
      [SystemZ] Fix caller-allocated save slot FIXME · db39b4a2
      Richard Sandiford authored
      Get rid of some old code (and associated FIXME) for handling the
      caller-allocated register save area.  No behavioural change intended.
      
      llvm-svn: 185525
      db39b4a2
    • Rui Ueyama's avatar
      Guard a test that fails on a Release build. · 92492223
      Rui Ueyama authored
      llvm-svn: 185524
      92492223
    • Eric Christopher's avatar
      Remove unused field. · 98341b8d
      Eric Christopher authored
      llvm-svn: 185523
      98341b8d
    • Pavel Labath's avatar
      [analyzer] Improve handling of noreturn destructors · f77e7368
      Pavel Labath authored
      Summary:
      The analyzer incorrectly handled noreturn destructors which were hidden inside
      function calls. This happened because NoReturnFunctionChecker only listened for
      PostStmt events, which are not executed for destructor calls. I've changed it to
      listen to PostCall events, which should catch both cases.
      
      Reviewers: jordan_rose
      
      CC: cfe-commits
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1056
      
      llvm-svn: 185522
      f77e7368
    • Rui Ueyama's avatar
      [PECOFF][Writer] Separate AtomChunk from SectionChunk. · 18c67a15
      Rui Ueyama authored
      The optional data directory header contains addresses to some atoms such
      as the import address table in data section. Such fields can naturally
      be set by relocation if we make the optional data driectory as an atom.
      
      Currently we assume that atoms are always in a section, so we can't create
      a file header with atoms. This patch separates section chunk from atom
      chunk, to allow atom-based file header.
      
      llvm-svn: 185521
      18c67a15
    • Eric Christopher's avatar
      Constify a few functions. · c665af77
      Eric Christopher authored
      llvm-svn: 185520
      c665af77
    • Richard Osborne's avatar
      [XCore] Whitespace fixes, no functionality change. · 756233ef
      Richard Osborne authored
      llvm-svn: 185519
      756233ef
    • Richard Osborne's avatar
      [XCore] Add ISel pattern for LDWCP · a1cff61d
      Richard Osborne authored
      Patch by Robert Lytton.
      
      llvm-svn: 185518
      a1cff61d
    • Rui Ueyama's avatar
      Add "explicit" to ctors where appropriate. · 6c7ac572
      Rui Ueyama authored
      llvm-svn: 185517
      6c7ac572
    • Rui Ueyama's avatar
      [PECOFF] Handle hint field in Hint/Name table in the import library. · afa4844d
      Rui Ueyama authored
      A hint is an index of the export pointer table in a DLL, at which
      PE/COFF loader starts looking for a symbol name. The import library
      comes with hints and symbol pairs, and as long as hints are in sync
      with the actual symbol table in DLL, the symbols will be resolved
      quickly. So, we shouldn't ignore hints but propagate them to an output.
      
      llvm-svn: 185516
      afa4844d
    • Rui Ueyama's avatar
      4b862775
Loading